‎2006 May 23 8:38 PM
Hi,
In transaction VA01 we are able to create credit adjustment (Custom order type) with order category K (credit memo). Is this possible to create this order using "BAPI_SALESORDER_CREATEFROMDAT2" function module.?
If we try to excute using this function module, following return message is appearing. "Unpermitted combination of business object BUS2032 and sales doc. category K". Any one please give me solution.
Thanks in advance,
Adithan S.
‎2006 May 23 8:50 PM
You cannot create credit memo using that BAPI. There is a hardcoded check for sales order business object in that BAPI. Use BAPI_SALESDOCU_CREATEFROMDATA1 instead.
‎2006 Jun 22 2:11 PM
Great answer! Indeed, BAPI_SALESDOCU_CREATEFROMDATA1 works for a CM request and BAPI_SALESDOCU_CREATEFROMDATA2 does not work.
‎2006 May 23 9:32 PM
Or you can clone BAPI BAPI_SALESORDER_CREATEFROMDAT2 into a Z- BAPI and change the hard-coded business object.
We did this about a year ago for one of our requirements.