2012 Oct 09 5:50 AM
Hi All,
We are using BAPI_PRODORDCONF_CREATE_TT for confirmation and goods movement of SFG materials. While doing this, we will get one material document number generated and updated in DB Table.
And we are having a select query to fetch the newly generated material number from AUFM table. Now the issue is, our select query is fetching previous generated material document instead of fetching new one. And we are executing this select query after the execution of BAPI_TRANSACTION_COMMIT.
We guessed, the problem is because of time taken to update records in SAP DB Tables. So we used a statement WAIT UP TO 10 SECONDS before our select query and now it is fetching a newly generated material document.
Now our concern is, while executing our RFC, it is taking more time. Can anyone suggest better/correct way to fetch latest updated record from DB Table or to improve execution time of RFC ?
How can we get the status of lock set to update DB table released or not?
Thanks in advance,
Aravinth
Hi All,
We are using BAPI_PRODORDCONF_CREATE_TT for confirmation and goods movement of SFG materials. While doing this, we will get one material document number generated and updated in DB Table.
And we are having a select query to fetch the newly generated material number from AUFM table. Now the issue is, our select query is fetching previous generated material document instead of fetching new one. And we are executing this select query after the execution of BAPI_TRANSACTION_COMMIT.
We guessed, the problem is because of time taken to update records in SAP DB Tables. So we used a statement WAIT UP TO 10 SECONDS before our select query and now it is fetching a newly generated material document.
Now our concern is, while executing our RFC, it is taking more time. Can anyone suggest better/correct way to fetch latest updated record from DB Table or to improve execution time of RFC ?
How can we get the status of lock set to update DB table released or not?
Thanks in advance,
Aravinth
2012 Oct 09 6:21 AM
Hi,
There is an import parameter in function module BAPI_TRANSACTION_COMMIT pass value of wait = 'X', so this will call synchronous update in database hence you need not to call wait statement.
Regards,
Gagan
2012 Oct 09 6:33 AM
Hi Gagan,
We are passing wait = 'X' only. But still it is taking previous record. Because of that only I am using WAIT statement
Regards,
Aravinth
2012 Oct 09 6:49 AM
strange, you can try another approach like in return parameter of BAPI you can get document number generated by that function module so you can think a logic based on newly generated document number returning by BAPI, are you using "Commit on update task" either through subroutine or function module because if that is the case then it will execute at the end of LUW.
2012 Oct 09 7:03 AM
Hi,
We are not getting material document number in BAPI Return. All we are getting is this message Confirmation of order <order number> saved in BAPI Return.
And other than BAPI_TRANSACTION_COMMIT, we are not using any other commit statements.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |