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: 

Bapi for debit/credit memo creation

Former Member
0 Kudos
496

Dear all,

I am using the BAPI_SALESORDER_CREATEFROMDAT2 for creating a credit/debit memo, the following error is displayed.

"Unpermitted Combination of Business object BUS2032 & Sales Doc Category type K"

Could you please provide me a solution and let me know if there are any BAPIs to create credit/debit memos.

Thanks in Advance.

Regards,

Raj

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos
347

Raj you can try with these also:

use...
'BAPI_CRED_MEMO_CREATEFROMDAT2'

data: con_cr_memo_bus_obj like BAPIUSW01-OBJTYPE value 'BUS2094'.

CALL FUNCTION 'ZBAPI_CRED_MEMO_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = bapi_hdr
business_object = con_cr_memo_bus_obj
convert = 'X'
IMPORTING
SALESDOCUMENT = bapi_salesdoc
TABLES
return = bapi_ret_tbl
ORDER_ITEMS_IN = bapi_itm
ORDER_PARTNERS = bapi_prtnr
ORDER_ITEMS_inx = bapi_itm_out
order_schedules_in = bapi_schd_lin
order_text = bapi_text.

AND in the cloned ZBAPI above in SE37/80, add this Importing parameter: BUSINESS_OBJECT LIKE BAPIUSW01-OBJTYPE
Please have a look in older topics:
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="95866"></a>
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="82006"></a>

Also:

Did you try BAPI_INCOMING_INVOICE_CREATE with DOC_TYPE (CREDIT MEMO) field in BAPI_INCINV_CREATE_HEADER.

Amit.

3 REPLIES 3

former_member181995
Active Contributor
0 Kudos
348

Raj you can try with these also:

use...
'BAPI_CRED_MEMO_CREATEFROMDAT2'

data: con_cr_memo_bus_obj like BAPIUSW01-OBJTYPE value 'BUS2094'.

CALL FUNCTION 'ZBAPI_CRED_MEMO_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = bapi_hdr
business_object = con_cr_memo_bus_obj
convert = 'X'
IMPORTING
SALESDOCUMENT = bapi_salesdoc
TABLES
return = bapi_ret_tbl
ORDER_ITEMS_IN = bapi_itm
ORDER_PARTNERS = bapi_prtnr
ORDER_ITEMS_inx = bapi_itm_out
order_schedules_in = bapi_schd_lin
order_text = bapi_text.

AND in the cloned ZBAPI above in SE37/80, add this Importing parameter: BUSINESS_OBJECT LIKE BAPIUSW01-OBJTYPE
Please have a look in older topics:
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="95866"></a>
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="82006"></a>

Also:

Did you try BAPI_INCOMING_INVOICE_CREATE with DOC_TYPE (CREDIT MEMO) field in BAPI_INCINV_CREATE_HEADER.

Amit.

0 Kudos
347

Hi Amit,

Thanks for your reply..

But our's is of 4.6c version in which both bapis which you have mentioned are not there..can you please tell any other soultion to solve the problem..

regards,

Raj

0 Kudos
347

Raj,

you can also look at:

BAPI_SALESDOCU_CREATEFROMDATA                                      
BAPI_SALESORDER_CHANGE         Sales order: Change Sales Order     
BAPI_SALESORDER_CONFIRMDELVRY                                      
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order     
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order

Amit.