External purchasing documents (from Ariba or SRM systems) can create or change ECC documents by remote function call (RFC). Purchase Orders or Requisitions can be transferred by RFC-call via BAPI functions. Sometimes to clarify the root cause of a problem or a backend error, we need to catch the test data in the interface (BAPI) between Ariba/SRM and MM. The interface can be for example :
- BAPI_PO_CREATE1, ARBCIG_BAPI_PO_CREATE1
- BAPI_PO_CHANGE, ARBCIG_BAPI_PO_CHANGE
- BAPI_PO_GETDETAIL
User settings:
- On Ariba/SRM side, you need to check the user which is used to connect to the back-end system (RFC-User). To check it please use transaction code SM59 -> Double click in the connection (Example: S71CLNT300) and check the name of the user
On the ECC back-end side, check in the transaction SU01 whether this RFC-user has the parameter FBGENDAT = X, if not, please add the parameter "FBGENDAT":
- After this you can create test data for the specific user according to note 539978
FBGENDAT
The FBGENDAT report can be executed in order to activate the Test data generation for a specific BAPI:
- In the transaction SE38 -> FBGENDAT -> Execute: enter the BAPI you are looking for, like BAPI_PO_CREATE1
- Choose Mode B ("Write test data and continue normally"), activate this entry (should be deactivated after test data have been executed)
- Go back to Ariba/SRM, start the problematic process again. In SRM you can also re-transfer the PO > new PO or an existent PO using the Function BBP_PD_PO_TRANSFER_EXEC
- Then deactivate the above setting in the SE38 -> FBGENDAT (ECC side)
- Go back to your back-end system: transaction SE37 -> BAPI_PO_CREATE1 or BAPI_PO_CHANGE -> Execute, then press "Test Data" button to check the created record
IMPORTANT
- We generally DO NOT generate test data using the option 'A' in productive environments
- Option 'A' could be also problematic in productive systems, as whenever the BAPI_PO_CREATE1 is excuted a dump is generated
- However, in order to debug the PO creation correctly (in quality or development systems), the support prefers to receive the test data written in option 'A' (with option 'B' an example PO is already created)
- Please remove the user setting and delete the entries in report FBGENDAT when the test is finished
Related Content
Related SAP Notes/KBAs
SAP Note 539978 - Automatic generation of BAPI test data directory
SRM Purchase Order MM Purchasing SRM Shopping Cart