2011 Sep 23 2:44 PM
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
2011 Sep 23 2:54 PM
Hi
You should use the SUBMIT statament:
SUBMIT RM07IDIF.......AND RETURN.
Shouldn't you?
Max
2011 Sep 23 2:54 PM
Hi
You should use the SUBMIT statament:
SUBMIT RM07IDIF.......AND RETURN.
Shouldn't you?
Max
2011 Sep 23 3:01 PM
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
2011 Sep 23 3:13 PM
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
2011 Sep 23 3:27 PM
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
2011 Sep 23 3:31 PM
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
2011 Sep 23 3:39 PM
2011 Sep 23 2:57 PM
Hi
Check whether the return statement is used with Submit.
SUBMIT REPORT1 USING SELECTION-SCREEN '1100'
AND RETURN.
Shiva