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

Call transaction problem

Former Member
0 Likes
289

Hello,

My problem is with a report that displays a ALV Grid.

At click on a field in that alv it calls another transaction. Everything is ok until, inside that transaction, at some points there are several "COMMIT WORK" lines. After the first commit work line, it leaves the called transaction and return to the caller report without executing the code remained after the "COMMIT WORK" line.

How can i tell the report to call that transaction without returning after every commit?

Thanks in advance,

Andrei

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
263

Hi ,

Try this code,

FORM user_command USING ucomm LIKE sy-ucomm sel TYPE slis_selfield .
  DATA : v_repid LIKE sy-repid.

  v_repid = sy-repid.

  DATA: lv_ucomm TYPE sy-ucomm,
  v_ebeln1 TYPE ekko-ebeln.


  lv_ucomm = sy-ucomm.

***REFRESH T_SER.
***REFRESH IT_SER03.
***REFRESH IT_OBJK.


  CASE ucomm.

    WHEN '&IC1'.


      IF sel-fieldname = 'EBELN'.
        v_ebeln1 = sel-value.

*       READ TABLE it_final INTO wa_final WITH KEY ebeln1 = sel-value.
        READ TABLE itab  WITH KEY ebeln = sel-value.
        unpack v_ebeln1 to v_ebeln1.
        SET PARAMETER ID 'BES' FIELD v_ebeln1.
        CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

      ENDIF.
  ENDCASE.
ENDFORM.                    "USER_COMMAND

*ENDFORM.

Regards,

S.Nehru

1 REPLY 1
Read only

Former Member
0 Likes
264

Hi ,

Try this code,

FORM user_command USING ucomm LIKE sy-ucomm sel TYPE slis_selfield .
  DATA : v_repid LIKE sy-repid.

  v_repid = sy-repid.

  DATA: lv_ucomm TYPE sy-ucomm,
  v_ebeln1 TYPE ekko-ebeln.


  lv_ucomm = sy-ucomm.

***REFRESH T_SER.
***REFRESH IT_SER03.
***REFRESH IT_OBJK.


  CASE ucomm.

    WHEN '&IC1'.


      IF sel-fieldname = 'EBELN'.
        v_ebeln1 = sel-value.

*       READ TABLE it_final INTO wa_final WITH KEY ebeln1 = sel-value.
        READ TABLE itab  WITH KEY ebeln = sel-value.
        unpack v_ebeln1 to v_ebeln1.
        SET PARAMETER ID 'BES' FIELD v_ebeln1.
        CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

      ENDIF.
  ENDCASE.
ENDFORM.                    "USER_COMMAND

*ENDFORM.

Regards,

S.Nehru