Page tree
Skip to end of metadata
Go to start of metadata


This page aims to provide short debugging guide to the BAPI Function ARBCIG_BAPI_PO_CREATE1.


The BAPI Function responsible for creating Ariba Purchase Orders in ECC is the ARBCIG_BAPI_PO_CREATE1. Similarly to the BAPI_PO_CREATE1, the function is enabled to track and capture FBGENDAT test data. During the runtime of the BAPI, the internal table LT_RETURN collects all the information of the BAPI-progress under the message ARBCIG_MESSAGE 010. A proxy response is being sent back to Ariba about the process at the end of the Purchase Order creation.

Debugging Guide

The BAPI Function starts with an authorization check. The class cl_arbcig_common_util, method authorization_check will check the 'RFC_TYPE' ,  'RFC_NAME' , and the activity 'ACTVT' '16'.

ARBCIG_BAPI_PO_CREATE1 is enabled for capturing test data

Throughout the entire BAPI-run, the internal table 'lt_return' will collect the messages about the progress. A sample of the return table can be found below:

1 I ARBCIG_MESSAGE 010 Start of RFC Authorization Check
2 I ARBCIG_MESSAGE 010 Start Execution of Business Logic
3 I ARBCIG_MESSAGE 010 Start of BADI Execution
4 I ARBCIG_MESSAGE 010 End of BADI Execution
5 I ARBCIG_MESSAGE 010 Start of BAPI PO Create Execution

The method SERVICE_PO_CREATE is responsible for Service item creation. 
Based on table arbcig_pohistory the system then will check whether any duplicates exist and fill the variable 'duplicate' accordingly. Afterwards the function fills the PO structures.

When done, the Business Add-In ARBCIG_BUY_PURCHORD_BADI Definition is called. If any active implementation exists, the CALL BADI l_badi→publish_po_create statement will run the BAdI-code.

If no error found so far, then a call to the BAPI-Function 'BAPI_PO_CREATE1' takes place. In case the system finds no errors, the actual saving of data happens in the function 'BAPI_TRANSACTION_COMMIT'.

Finally, in order to update back the Ariba-side, a proxy response is sent by the include LARBCIG_PO_RFCF01, FORM send_response which in turn will call the Function 'ARBCIG_SAP_RESPONSE_TO_P2P'.

Related Content

Related Documents

How to create Test data ?

Related SAP Notes/KBAs

SAP Knowledge Base Article 2895421 - How to Capture a Test Data for Ariba Programs and Function Modules

  • No labels