2012 Apr 09 10:35 AM
Hello Guys,
I have business requirement to generate PO while saving sales order in VA01. I have called the Bapi (bapi_po_create1) in user exit
User_save_document and generated PO successfully but i am not able to capture account assignment category into PO..When i tried to pass Category
i got error saying Sales Doc number is deleted or archived. after analysis i found out reason of error cause sales Doc no which is generated in VA01 but not committed in Table during exit...I tired both option also by calling Bapi in 1. Perform XXX ON Commit 2. FM in Update Task..but still getting error..
Kindly suggest any other logic if any one has worked on same issue?
Hello Guys,
I have business requirement to generate PO while saving sales order in VA01. I have called the Bapi (bapi_po_create1) in user exit
User_save_document and generated PO successfully but i am not able to capture account assignment category into PO..When i tried to pass Category
i got error saying Sales Doc number is deleted or archived. after analysis i found out reason of error cause sales Doc no which is generated in VA01 but not committed in Table during exit...I tired both option also by calling Bapi in 1. Perform XXX ON Commit 2. FM in Update Task..but still getting error..
Kindly suggest any other logic if any one has worked on same issue?
2012 Apr 09 10:45 AM
Use the BTE 00501014: ( Sales order was created, changed, deleted ) for your purpose. The sample interface is available in function SAMPLE_INTERFACE_00501014( which you can copy to your Z function & wrap the bapi in it ). Please search in SCN for details of how to use BTE and activate it through FIBF.This function is an update function which gets called in the end.You can try calling the bapi in background task inside this.
2012 Apr 09 10:58 AM
Hi
Call bapi_po_create1 in background .
cal bapi_po_create1 in background task.
2012 Apr 09 12:05 PM
Another option would be create Z function module inside it call bapi_po_create1. Put wait statement in Z function module for few seconds to make sure sales order is saved in database. And then call this Z FM in background task.
2012 Apr 09 12:33 PM
Hi
Use below user-exit to create PO which will trigger after SO creation.
ZXVEDU06
Thanks,
Chandra
2012 Apr 09 12:45 PM
I think you can still use FORM USEREXIT_SAVE_DOCUMENT in the include MV45AFZZ.
Create a z- update FM . Put your code to create the PO. and try calling this FM in update task.
If it doesn't work Call the FM in bacground task. Put some wait in loop to check if the sale order is commited to db and procedd to create PO
2012 Apr 09 12:45 PM
I think you can still use FORM USEREXIT_SAVE_DOCUMENT in the include MV45AFZZ.
Create a z- update FM . Put your code to create the PO. and try calling this FM in update task.
If it doesn't work Call the FM in bacground task. Put some wait in loop to check if the sale order is commited to db and procedd to create PO
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |