cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug an erroneous purchasing documents viz SC,PO in SRM

Former Member
0 Kudos

Dear SRM Experts,

I need some technical documentation that how to debug a failed shopping cart/PO in SRM,how the debugging helps to find the fault?. i am  novice in SRM technical.\ and I am in the process of learning.any book recommendation would be helpful regarding this.

Thanks in advance.

Regards,

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Kiran,

depending on error.

Usually help breakpoint in BADI realization for BBP_DOC_CHECK_BADI, BBP_DOC_CHANGE_BADI.

Also you can set the breakpoints in PDO classes, for example /SAPSRM/CL_PDO_BO_SC_ADV.

As working with web-interface, you have to use external breakpoints.

Regards

Konstantin

Answers (3)

Answers (3)

Former Member
0 Kudos

apologies all for the delayed comeback

I have used the inputs that you all suggested, I tried to analyze an erroneous SC, classic scenario

attached screen shot

when I executed debugging giving all the inputs, the result ended as in above screen shot, how to analyze the error?

Regards,

kiran

0 Kudos

Hello Kiran,

I would suggest to create and save the SC (Do not order). Then follow the procedure mentioned earlier to enable creation of test data in ERP. Use the SC guid and execute FM "BBP_PROCDOC_TRANSFER". It will create test data in ERP. Then using this test data, you can debug in ERP.

Can you post the screenshot of RZ20. If there is no issue on SRM side and the error is due to wrong data being sent or processing from ERP side then procedure mentioned above will help.

Regards,

Arun

0 Kudos

Hello Kiran,

If you are trying to analyze an extended classic purchase order which has gone into status "Error in Process" then following should help.

Most of such issues are due to issues on the ERP side or sending the wrong data to ERP which is acceptable in SRM. Look at following places:

1. RZ20 and see if any errors are listed.

2. SLG1 (Object: BBP, SubObject: Replication)

3. On ERP side, check ST22

These three will give an idea. If you cannot find a dump on ERP side, you can straighaway go to the following procedure:

1.

a) If backend checks in are not enabled in SPRO settings, you can enable it (SRM 700 or higher). You can also set warnings being thrown by ERP as errors.

b) Put a breakpoint in function module B46B_DPO_TRANSFER on SRM side and debug. This fucntion module will be called when you click on button "Check".

2. If you want another way.

a) Create a copy of PO whose replication is failing and save it. Do not order.

b) Logon to SAP GUI. And get the GUID of the PO.

c) Find the RFC user for the ERP.

d) Logon to ERP and ensure that the FBGENDAT flag is set to true for this user.

e) Run the report "FBGEDAT" on ERP and input the FM name as "BAPI_PO_CREATE1". Select relevant options (self-explanory).

f) Go to SRM and run FM " BBP_PD_PO_TRANSFER_EXEC_V2" by keying in the guid as input. Execute it.

This will create a test data on ERP. Your PO will still go to "Error in Process" but now you have a test data in ERP. Now, you can directly go to the FM "BAPI_PO_CREATE1" on ERP and debug.

Do not forget to run the report FBGENDAT and turn off the creation of test data otherwise all efforts to create a PO in ERP from SRM system will fail.

* I am referring to SAP SRM where not explicitely specified. I do not have access to SAP systems as of now. I have tried to mention the name of flags and FM correctly. Sorry for any mistakes.

Best Regards,

Arun Singh

Former Member
0 Kudos

Hi Kiran,

Debugging will help you find out the reason for erroneous documnets. You can execute the FM - BBP_REQREQ_TRANSFER in debug mode to figure out the document error. For example, provide a erroneous SC object id for REQNO of the FM BBP_REQREQ_TRANSFER and start executing it in debug mode to analyze further.

Regards,

Vela