2008 Jun 28 10:47 AM
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
2008 Jun 28 11:03 AM
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.
2008 Jun 28 11:03 AM
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.
2008 Jun 28 11:23 AM
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
2008 Jun 28 11:30 AM
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.