08-22-2007 10:54 AM
This is my program.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
.
.
.
commit work.
.
.
.
CALL TRANSACTION 'KKF2' USING bdcdata MODE 'E' UPDATE 'S'
MESSAGES INTO MESSTAB.
The BAPI and tcode KKF2 will use the same ORDER_ID to do some jobs...but when the program run to the tcode KKF2...It said "*****(me) is modifying ******(ORDER_ID) now"
Why it still said that when I have used commit work?
Even I add:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
and
CALL FUNCTION 'ENQUE_SLEEP'
The program still said I am modifying the ORDER_ID....
Please help me,thanks .
08-22-2007 11:00 AM
Hi,
use commit like this:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
importing
wait = 'X'.
Regards,
Sooness
08-22-2007 11:01 AM
sorry, i meant :
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
Regards,
Sooness
08-22-2007 11:14 AM
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' still does not make it work....
I have add all the commit code I know...
Is this error is called with the reason that my bapi is return the error message to the program?For some reason my BAPI can't run right,so it will return the error message.Is the error message returned by bapi call the fail of commit work?
08-22-2007 11:09 AM
Hi,
instead of going for MODE 'E' go for MODE 'N' and also check the return structure of the bapi function module..If u have any error messages.When u go for error mode it will stop at that screen where there is error.
Regards,
nagaraj
08-22-2007 11:23 AM
Hi,
absolutely if u r getting error message then it won't be committed..plz chek the error message and pass the data correctly.....
Regards,
nagaraj
08-22-2007 11:26 AM
use this code for bapi commit.
use your internal table and field to check wether the database is updated or not ??
SY-SUBRC = 4.
WHILE SY-SUBRC <> 0.
<b> SELECT SINGLE * FROM ADRC WHERE ADDRNUMBER = IT_ADATA-</b> IF SY-SUBRC <> 0.
WAIT UP TO 1 SECONDS .
ENDIF.
ENDWHILE.