Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Using BAPI to create a Credit/Debit Memo

Former Member
0 Kudos

I would like to use a BAPI to create a credit/debit memo but the BAPI_SALESORDER_CREATEFROMDAT2 BAPI is hard coded for BUS2032. I need to create a credit/debit memo which is BUS2096. Has anyone ever copied the bapi to a zbapi* and used a different Business Object? Or do you all have any other suggestions?

Thanks,

Mike

2 REPLIES 2

Former Member
0 Kudos

Mike,

If you can't find a BAPI which provides there are several options:

-Use CALL TRANSACTION (if youre programming in ABAP)

-Create your own BAPI that calls a CALL TRANSACTION

-Post an IDOC to create the debit or credit memo

Either way you loose the possibility to do a roll back of the LUW. If roll back of the LUW is a problem you might consider executing the creation of the debet/credit document last (if possible).

I don't recommend copying a BAPI due to version upgrates, notes and hotpackages.

Best regards,

Harald

Former Member

Mike, I rewrote one of our custom programs using BAPI's to create debet/credit memo's successfully. You have to use 2 BAPI's actually:

BAPI_SALESDOCU_CREATEFROMDATA

FOR CREATING BASIC ORDER WITHOUT HEADER TEXT

AND PRICING CONDITIONS

BAPI_SALESORDER_CHANGE

FOR ADDING THE HEADER TEXT AND PRICING

CONDITIONS.

You also get related info from OSS note 93091.

Best regards,

Harold