Skip to Content

dump during creation of sales order wit output type

We are created one program to create child sales order and it is working fine in SD70AV1A.

Now we are defined as new output type and use special function to call z program from va02 and

va01, but we unable to call z program from new output type and getting below dump.

“Invalid COMMIT WORK in an update function module.”

1 FUNCTION BAPI_TRANSACTION_COMMIT.

2 *"----------------------------------------------------------------------

3 *"*"Lokale Schnittstelle:

4 *" IMPORTING

5 *" VALUE(WAIT) LIKE BAPITA-WAIT OPTIONAL

6 *" EXPORTING

7 *" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2

8 *"----------------------------------------------------------------------

9

10 IF WAIT EQ SPACE.

11 COMMIT WORK.

12 ELSE.

>> COMMIT WORK AND WAIT.

14 IF SY-SUBRC NE 0.

15 CALL FUNCTION 'BALW_BAPIRETURN_GET2'

16 EXPORTING

17 TYPE = 'E'

18 CL = 'S&'

19 NUMBER = '150'

20 IMPORTING

21 RETURN = RETURN.

22 ENDIF.

23 ENDIF.

Output type Config

sm13.jpg (73.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 10 at 01:32 PM

    Commit work can't be called from an update task as it is also specified in the dump. Please remove call to BAPI_TRANSACTION_COMMIT and check. It should work without commit.

    Add comment
    10|10000 characters needed characters exceeded