2007 Dec 11 6:30 PM
hi gurus,
i have a salesorder already created.The order type is ZTR.
now I have to create another sales order with reference to the above order and the order type of the newly created order is 'KB'.For this I am using BAPI_SALESDOCUMENT_COPY which is returning me a sales order no but this sales order no is not getting created in database though I have called bapi_transaction_commit after bapi_salesdocument_copy.
Can anyone tell me that why the sales order is not getting created in database and also which bapi should I use in the above scenario?
Any help is appreciated.
2007 Dec 13 10:49 AM
In your case, I think there is being a problem during the update of orders data in database. Because, before the complete update, the number is generated as a number range by the function module. After generating it, the various tables are updated.
Could you please try the function module 'BAPI_SALESDOCU_CREATEFROMDATA1' let me know the result? I have used it and its working fine.
Please reward, If helpful.
Regards,
Chiranjit
2007 Dec 13 11:51 AM
hi,
Don't use : BAPI_SALESORDER_CREATEFROMDAT1 this bapi this is absolote....
Try to use this bapi : BAPI_SALESORDER_CREATEFROMDAT2
Bofore this try to get details from VBAK , VBAP, KNOV and kna1 tables.
Regards,
Sagun Desai....