2020 Jun 30 9:45 AM
I have added a selection screen in the program and every time i hit the exit button the program just executes, I want to go back to the original screen when I hit the exit button.

is there logic for that?
2020 Jun 30 10:46 AM
Hello catienza11
Here's an example of how you can handle it.
TABLES:
sscrfields.
PARAMETERS: p_test TYPE char1.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.
PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',
p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF SCREEN 500.
START-OF-SELECTION.
WRITE 'Report executed'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN '0500'.
" do some specific actions
WHEN '1000'.
CASE sscrfields-ucomm.
WHEN 'ONLI'.
PERFORM show_subscreen.
IF sy-subrc = 0.
" do nothing, proceed with logic.
ELSE.
CLEAR sscrfields-ucomm.
ENDIF.
ENDCASE.
ENDCASE.
FORM show_subscreen.
title = 'Enter Local Price'.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
ENDFORM.As always, I encourage to search and read the SAP Help documentation on the topic. It describes the meaning of SY-SUBRC:
Kind regards,
MateuszHello catienza11
Here's an example of how you can handle it.
TABLES:
sscrfields.
PARAMETERS: p_test TYPE char1.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.
PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',
p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF SCREEN 500.
START-OF-SELECTION.
WRITE 'Report executed'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN '0500'.
" do some specific actions
WHEN '1000'.
CASE sscrfields-ucomm.
WHEN 'ONLI'.
PERFORM show_subscreen.
IF sy-subrc = 0.
" do nothing, proceed with logic.
ELSE.
CLEAR sscrfields-ucomm.
ENDIF.
ENDCASE.
ENDCASE.
FORM show_subscreen.
title = 'Enter Local Price'.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
ENDFORM.As always, I encourage to search and read the SAP Help documentation on the topic. It describes the meaning of SY-SUBRC:
Kind regards,
Mateusz2020 Jun 30 9:51 AM
Hello catienza11
Please provide additional information.
How do you call the screen? How do you handle the buttons being pressed?
Kind regards,
Mateusz2020 Jun 30 10:09 AM
I called the screen when a specific radio button is pressed, I am calling it before the function of the radio button. I just created an additional selection screen and called it.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.
PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',
p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF SCREEN 500.
FORM 1920_mbew_data_pricing.
title = 'Enter Local Price'.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
2020 Jun 30 10:46 AM
Hello catienza11
Here's an example of how you can handle it.
TABLES:
sscrfields.
PARAMETERS: p_test TYPE char1.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.
PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',
p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF SCREEN 500.
START-OF-SELECTION.
WRITE 'Report executed'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN '0500'.
" do some specific actions
WHEN '1000'.
CASE sscrfields-ucomm.
WHEN 'ONLI'.
PERFORM show_subscreen.
IF sy-subrc = 0.
" do nothing, proceed with logic.
ELSE.
CLEAR sscrfields-ucomm.
ENDIF.
ENDCASE.
ENDCASE.
FORM show_subscreen.
title = 'Enter Local Price'.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
ENDFORM.As always, I encourage to search and read the SAP Help documentation on the topic. It describes the meaning of SY-SUBRC:
Kind regards,
Mateusz| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |