Application Development 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: 

Submitting screen elements to standard Program MI20

Jagadish_ac
Explorer
0 Kudos
235

Hi

I am designing custom selection screen and submitting custom elements to MI20 standard program

It is working fine but when i click back button from output screen it is going to standard program Selection scree.

How to avoid this please help me in this.

Regards

Jagadish

1 ACCEPTED SOLUTION

Former Member
0 Kudos
133

Hi

You should use the SUBMIT statament:

SUBMIT RM07IDIF.......AND RETURN.

Shouldn't you?

Max

7 REPLIES 7

Former Member
0 Kudos
134

Hi

You should use the SUBMIT statament:

SUBMIT RM07IDIF.......AND RETURN.

Shouldn't you?

Max

0 Kudos
133

I am doing same.

But when i click back button from my output screen it is going to Standard Selection screen after clicking back button it is coming to my selection screen

0 Kudos
133

Hi

I've checked the code of the standard program RM07IDIF:

After coming out from ALV function is called the routine NEUSTART:

FORM neustart USING x_selection_screen TYPE c.

  DATA: l_rsparams LIKE STANDARD TABLE OF rsparams WITH HEADER LINE.

  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
       EXPORTING
            CURR_REPORT     = g_f_repid                     "n627513

       TABLES
            selection_table = l_rsparams
       EXCEPTIONS
            not_found       = 1
            no_report       = 2
            OTHERS          = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
*   Programm neu starten mit den vorhandenen Selektionskriterien
    IF x_selection_screen IS INITIAL.
      SUBMIT (g_f_repid) WITH SELECTION-TABLE L_RSPARAMS.   "n627513
    ELSE.
      SUBMIT (g_f_repid) VIA SELECTION-SCREEN               "n627513
                      WITH SELECTION-TABLE l_rsparams.
    ENDIF.
  ENDIF.
ENDFORM.                               " NEUSTART

Here it seems the report callis itself again, that routine is skipped only if the user presses the button for the exit (Shift+F3)

IF g_exit_by_user-exit = x.  "This is returned by ALV 
    LEAVE PROGRAM.                     "<----Leave the program, so it can go to your selection-screen
  ENDIF.

  IF sy-batch IS INITIAL.
  PERFORM neustart USING x.        "<----Here it calls itself, so it goes to selection.screen of RM07IDIF
  ENDIF.

I believe you need to change RM07IDIF, try to check how to skip the routine NEUSTART

Max

0 Kudos
133

Dear Max

Is there is no other way. because it is big program i need to copy everything to Z program.

It is complicated i guess.

Regards

Jagadish

0 Kudos
133

Hi

You can create an Implicit enhancement at the beginning of the routine NEUSTART:

FORM neustart USING x_selection_screen TYPE c.
"Insert an Implicit enhacement here
IF SY-TCODE = <.my transaction>. EXIT ENDIF.  "<--You can add a piece of code like that

  DATA: l_rsparams LIKE STANDARD TABLE OF rsparams WITH HEADER LINE.

  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
       EXPORTING
            CURR_REPORT     = g_f_repid                     "n627513

       TABLES
            selection_table = l_rsparams
       EXCEPTIONS
            not_found       = 1
            no_report       = 2
            OTHERS          = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
*   Programm neu starten mit den vorhandenen Selektionskriterien
    IF x_selection_screen IS INITIAL.
      SUBMIT (g_f_repid) WITH SELECTION-TABLE L_RSPARAMS.   "n627513
    ELSE.
      SUBMIT (g_f_repid) VIA SELECTION-SCREEN               "n627513
                      WITH SELECTION-TABLE l_rsparams.
    ENDIF.
  ENDIF.
ENDFORM.                               " NEUSTART

Max

0 Kudos
133

Thank you MAX

Let me try this code.

Former Member
0 Kudos
133

Hi

Check whether the return statement is used with Submit.

SUBMIT REPORT1 USING SELECTION-SCREEN '1100'

AND RETURN.

Shiva