2009 Mar 26 10:33 AM
Hi,
i am using BAPI_SALESORDER_CREATEFROMDAT2 to create an order with ref(Quotation number).
and i am passing
bapi_head-DOC_TYPE = 'ZORD'.
bapi_head-sales_org = '1000'.
bapi_head-distr_chan = '10'.
bapi_head-division = '20'.
bapi_head-REF_DOC = '0020000002'.
bapi_head-REFDOC_cat = 'B'.
bapi_item-material = 'T0001' .
bapi_item-TARGET_QTY = '20.000'.
bapi_item-REF_DOC = '0020000002'.
bapi_item-REF_DOC_IT = '000020'.
bapi_item-ref_doc_ca = 'B'.
append bapi_item.
bapi_ordpart-partn_role = 'AG'.
bapi_ordpart-partn_numb = '0000000011'.
append bapi_ordpart.
it is created successfully..but quantity is not stored in the table, as well in the transaction.
Can anybody help me...?
Are you filiiing ITEMX structure of BAPI and passing the same to BAPI.
Pass both below tables in bapi:
ORDER_ITEMS_IN STRUCTURE BAPISDITM OPTIONAL
ORDER_ITEMS_INX STRUCTURE BAPISDITMX OPTIONAL
2009 Mar 26 10:38 AM
Hi Mr.A,
after that bapi call BAPI_TRANSACTION_COMMIT.
it will work
Regards,
Chinna
2009 Mar 26 10:38 AM
Are you filiiing ITEMX structure of BAPI and passing the same to BAPI.
Pass both below tables in bapi:
ORDER_ITEMS_IN STRUCTURE BAPISDITM OPTIONAL
ORDER_ITEMS_INX STRUCTURE BAPISDITMX OPTIONAL
2009 Mar 26 10:40 AM
Pass the item number (posnr ) and quantity in ORDER_SCHEDULES_IN ( ITM_NUMBER and REQ_QTY fileds). then quantity will reflect in ur tansaction.
regards,
aswin.
2009 Mar 26 10:48 AM
Hi aswin,
But how do i get line item numbers prior to the execution of BAPI,
2009 Mar 26 11:26 AM
Try this way
Get the details of the Quotation using BAPI BAPISDORDER_GETDETAILEDLIST
Give Importing Parameter I_BAPI_VIEW = 'X' ( for all views )
In Table Parameters SALES_DOCUMENTS = QUOTATION NUMBER
This will return all the quotation details. Use this details to pass to FM BAPI_SALESORDER_CREATEFROMDAT2 to create Sales order
Hope this helps...
2009 Mar 26 10:42 AM
hi ,
Did you missed append bapi_head.
check if useful.
Aditya Shrivastava
2009 Mar 26 10:48 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |