Application Development and Automation 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: 
Read only

Credit memo using BAPI

Former Member
0 Likes
694

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.

3 REPLIES 3
Read only

Former Member
0 Likes
583

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.

Read only

0 Likes
583

Great answer! Indeed, BAPI_SALESDOCU_CREATEFROMDATA1 works for a CM request and BAPI_SALESDOCU_CREATEFROMDATA2 does not work.

Read only

Former Member
0 Likes
583

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.