ā2014 Dec 01 4:59 AM
Hi friends ,
I m using BAPI_SALESORDER_CREATEFROMDATA to upload sales orders type ZO23 & ZO24 .......while uploading the profit center is automatically taking ......but user wants to enter it manually in the excel........but there is no field in the BAPI.....so please help me out how to fetch it ....!!!! Helpful answers will be rewarded........!
Regards,
Suresh
ā2014 Dec 01 6:14 AM
ā2014 Dec 01 6:23 AM
Hi,
Are you able to specify the profit centre when you create a Sales Order manually, through the standard transaction?
If YES, put a breakpoint in BAPI_SALESORDER_CREATEFROMDATA and see how it passes the profit centre in as a parameter.
If NO, you are out of luck.
cheers
Paul
ā2014 Dec 01 6:45 AM
Hi Suresh.
Use this BAPI instead. -'BAPI_SALESORDER_CREATEFROMDAT2
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = it_header order_header_inx = it_headerx
int_number_assignment = 'X'
IMPORTING
salesdocument = g_vbeln
TABLES
return = it_return
order_items_in = it_item
order_items_inx = it_itemx
order_partners = it_partner
wa_item-profit_ctr = wa_itab-prftcnt.
wa_itemx-profit_ctr = 'X'.
APPEND wa_item TO it_item.
APPEND wa_itemx TO it_itemx.
The internal tables order_items_in has profit center field, and it must be checked in the checkbox field for profit center in order_items_inx = it_itemx
ā2014 Dec 01 7:03 AM
Hi Susmitha,
I tried with BAPI_SALESORDER_CREATEFROMDAT2 for the type ZO23 & ZO24 it is throwing Some error BUS2032 is not possible category 'L'...thats why im using BAPI_SALESORDER_CREATEFROMDATA .
Regards,
Suresh