Recently there was an issue in ECC while updating records to infotypes. Third party sends data to PI and PI in return calls ECC via a RFC enabled FM. I was not sure whether data received by ECC was right and I had to depend on PI to get the payload and simulate it in ECC.
In this blog, I am going to explain how to create test data directory programmatically so that you dont need to depend on other middlewares for your analysis.
1. Find the RFC user which will call your FM/BAPI. Usually maintained by basis in SM59
2. Request your security team to add parameter id FBGENDAT as X in user master (Transaction SU01)
3. Execute report FBGENDAT.
4. Enter the name of the FM/BAPI which you wish to create test data directory and execute the report. The options used are self explanatory and is available in report. Option C is meant to debug using process(Transaction SM50)
5. In your FM/BAPI, write below lines of code. Certain SAP Standard FM/BAPI already have below code in them. Example BAPI_PO_CHANGE.
SET EXTENDED CHECK OFF.
SET EXTENDED CHECK ON.
Request your thirdparty or middle ware to send data to SAP.
1. Goto SE37, enter the FM/BAPI and press execute.
2. Click on test data directory button on the tool bar
You will observe that new enty will be present with date, time and user. You can use this to analyse your FM/BAPI.
Once your are done with your analysis, you can execute report FBGENDAT and delete the required entries. This will deactivate creation of test data directories for future requests.