cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging BAPI_PO_CREATE1 / Badi BBP_CREATE_BE_PO_NEW or BBP_CREATE_PO_BACK

Former Member
0 Kudos

Hi there,

We are running SRM 5.0 and are running ECC 6.0 in the backend. We are NOT using the extended classic scenario, only the classic scenario.

We are creating shopping carts in SRM with reference to a contract and then the system tries to create the PO in the backend system but fails because the contract reference does not exist in R/3 (message 06 019 in transaction RZ20.....).

What I am wanting to know is I need to debug this scenario much better. I have debugged the shopping cart save function module and realise alot of the work is done in UPDATE TASKS etc. I have turned on "update debugging" but it is still a very lengthy process to get to the route cause of this......

I have implemented BOTH the BADI's BBP_CREATE_BE_PO_NEW and BBP_CREATE_PO_BACK and they are definetly ACTIVE. I then set an ENDLESS LOOP in ALL the method calls so that I may be able to debug the process from SM50 but it never breaks in the code. I have also implemented an enhancement spot in BAPI_PO_CREATE1 that also hase an endless loop in it so that I might be able to also debug in SM50 on the ECC side of things.....but it still doesn't break!!

As I mentioned earlier I can see shopping cart monitor details in transaction RZ20 that say "Document XXXYYZZ does not exist" (I think message 06 019). But I would assume also that that error message would come back from the BAPI_PO_CREATE1 function module......but obvioulsy there must be some "pre checks" in ECC before the function module is called.

While I was debugging I found a MAPPING TABLE called BBP_FUNCTION_MAP that seemed pretty promising....

So my question is: why do those IMPLEMENTED and ACTIVE BADI's not break at all? And why does the endless loop never run in BAPI_PO_CREATE1 ? Do they only work in the EXTENDED classic scenario? Are other function modules called in the classic scenario?

PLEASE help me, I am really battling on this......;-)

Thanks in advance

Lynton

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hello,

My question is  similar to this , I  am  creating  the PO from accepted bid  ( we are on classic scenario )  because of the account assignment error the PO struck in XML in ECC system  , we want to put a validation for the FM BAPI_PO_CREATE1 saying if the PO is getting created from Bid system  should not validate the account assignment not sure how to  achieve this technically  .

Any pointers is highly appreciated.

Thank you

Regards

Srinivas G

peter_novoth
Employee
Employee
0 Kudos

Hi Lynton,

please see the SAP Community document for the transfer debugging:

http://wiki.sdn.sap.com/wiki/display/SRM/Shoppingcarttransfer

Regards,

Peter

Former Member
0 Kudos

Hi,

Refer the following OSS note to automatically create test data for bapi_po_create1.

0000539978 Automatic generation of BAPI test data directory

Hope this helps.

Cheers, Renga

***Award points for usefull answers ***

Former Member
0 Kudos

Hi there,

I am note wanting to generate test data for this at all, all I am wanting to do is be able to debug either BAPI_PO_CREATE1 or those Badi's I mentioned.....I just don't understand why even though I have endless loops in the ACTIVE Badi's etc the process never shows up in SM50 when I create a shopping cart and it tries to create a PO in the backend. I do know that it goes to ECC 6.0 and comes back because I get message 06 019 (Document XYZ does not exist) - and that message class does not exist in SRM.

I just assume that some other function module is called before BAPI_PO_CREATE1 just to do validation etc.....but them again BAPI_PO_CREATE1 does validation......mmmm

I will keep digging.....thanks for the help anyway

Lynton

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Debuging bapi_po_create1 is the subject of your post. Your question is confusing.

Bapi_po_create1 is called by BBP_PO_INBOUND in ECC.

Generating test data is the easiest way to debug RFC functions. Use the note mentioned above for generating test data in bbp_po_inbound.

Other way, set the user defined in RFC connection as dialog user and you can debug all process from SRM.

You can use bbp_reqreq_transfer in SRM with a SC in approval process. This function will lead you to the RFC call in ECC.

Rgds,

Pierre

Former Member
0 Kudos

Hello,

I agree with Pierre, The methods which was described in this post is the traditional way of debuggiing the backend data creation.

if you research new way, please update, i wish to learn that as well.

Cheers,Renga

Former Member
0 Kudos

Hi there,

Cool, I will have a look at what you guys mentioned......and if I come to an easier way I will let you know....

Thanks again

Lynton

Former Member
0 Kudos

hello lynton,

i am also having difficulty in debugging PO creation in backend with classic scenario.

please refer to this thread [;

would really appreciate your help.

many thanks,

kezia

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Depending on you backend system version, you can generate test data for bapi.

Set the parameter FBGENDAT to X in the user master data of the rfc user in the backend.

In the backend run the report FBGENDAT ad activate the test data generation for bapi_po_create1.

Rgds,

Pierre