Help regarding BAPI_SALESORDER_CREATEFROMDAT2
I am using BAPI_SALESORDER_CREATEFROMDAT2 to create new sales order. Everything is working fine except for the Order quantity which is not getting populated from the second item and as a result the schedule line is not getting created from the second item onwards
Any clues on why the BAPI is behaving in this way?
Thanks in advance
John Jakabcsin replied
As you loop thru the items to create the Items_IN table, you will have the line number (VBAP-POSNR).
Place that value VBAP-POSNR into the each Sched_IN entry that you are creating.
Make sure to set the Sched_INX-req_qty as well for each sched line.