Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

The COMMIT WORK processing must not be interrupted.

Former Member
0 Likes
4,503

During the Storage location change, I'm using the BAPI 'BAPI_PRODORD_CHANGE'. After execute, this error is coming 'The COMMIT WORK processing must not be interrupted' and the program is getting dump.when i'm running separately, it is working fine. but when i;m using in another program, it is getting dump. Please help.

I'm writing my code here.

DATA: P_NUMBER LIKE BAPI_ORDER_KEY OCCURS 0 WITH HEADER LINE,

       P_ORDERDATA LIKE BAPI_PP_ORDER_CHANGE OCCURS 0 WITH HEADER LINE,

       P_ORDERDATAX LIKE BAPI_PP_ORDER_CHANGEX OCCURS 0 WITH HEADER LINE,

       MAIN_BAPI_RET LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,

       COMMIT_BAPI_RET LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

ITAB-AUFNR = '4100000007'.

ITAB-LGORT1 = '110'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

   EXPORTING

     input        = ITAB-AUFNR

  IMPORTING

    OUTPUT        = ITAB-AUFNR

           .

P_NUMBER-ORDER_NUMBER = ITAB-AUFNR.

APPEND P_NUMBER.

P_ORDERDATA-STORAGE_LOCATION = ITAB-LGPRO1.

APPEND P_ORDERDATA.

P_ORDERDATAX-STORAGE_LOCATION = 'X'.

APPEND P_ORDERDATAX.

CALL FUNCTION 'BAPI_PRODORD_CHANGE'

   EXPORTING

     NUMBER      = P_NUMBER

     ORDERDATA   = P_ORDERDATA

     ORDERDATAX  = P_ORDERDATAX

   IMPORTING

     RETURN      = MAIN_BAPI_RET.

   IF MAIN_BAPI_RET-TYPE = 'E'.

     MESSAGE MAIN_BAPI_RET-MESSAGE TYPE 'E'.

   ELSE.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

       IMPORTING

         RETURN = COMMIT_BAPI_RET.

     ENDIF.

7 REPLIES 7
Read only

Former Member
0 Likes
2,605

Are you getting this error when you are processing just one record?

Where exactly are you getting the dump?

Thanks,
Shambu

Read only

0 Likes
2,605

I'm trying it in Development server. It is processing one record.

The error is coming while it is in the BAPI

call function 'bapi_prodord_change'

Read only

Former Member
0 Likes
2,605

Hi Kingshuk Barua,

your passing the Order number :

ITAB-AUFNR = '4100000007'.

ITAB-LGORT1 = '110'.

Is the AUFNR = '4100000007' avialbule in AFKO table ?

The Bapi only do change the existing record. If the order number is not avilable in the data base table.

Bapi through the error return parameter.

Thanks & Regards,

Suresh M

Read only

0 Likes
2,605

It is available in the AFKO table....

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,605

Hello Kingshuk,

It's clearly mentioned in the BAPI documentation not to issue a COMMIT WORK after the BAPI call.

Update Control


The method independently triggers the update to the database. After the method has been called you must not execute a COMMIT WORK again.

Please make it a habit to read the BAPI documentation (if available ) before using it!

BR,

Suhas

Read only

Former Member
0 Likes
2,605

Hello Suhas,

Already tried with or without commit work. when i'm using this bapi independently, it is working for both the cases....while using in another program, it is not working (with or without).

Read only

Former Member
0 Likes
2,605

Runtime Error         SYSTEM_ON_COMMIT_INTERRUPTED

ABAP PROGRAM  SAPLCOZV

Application Component     PP-SFC