Skip to Content
avatar image
Former Member

Question of commit work

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 .

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Aug 22, 2007 at 10:00 AM

    Hi,

    use commit like this:

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    importing

    wait = 'X'.

    Regards,

    Sooness

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?

  • avatar image
    Former Member
    Aug 22, 2007 at 10: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 10: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded