10-29-2007 5:14 PM
I have a selection screen 1000 which contains fields, execute button and a custom buttom FC01. When I click on the button FC01, it takes me to another screen 200. When I go back to selection screen from screen using BACK button, I am not able to hit the execute button to run report.
This is what I am doing for flow of screen 200.
case save_ok.
when 'BACK': call selection-screen 1000. leave to screen 1000.
I have also tried
when 'BACK': set screen 1000. leave screen.
Both do nothing the first time I press execute button, the second time I press it they give out errors. It seems after I press the BACK button from the screen 200 to move into selection screen 1000. The flow is still in screen 200 as when I check sy-dynnr .. its still equals 200. I need to be able to go back to the selection screen 1000 from screen 200 and still retain the input that was entered by user. Please advise
10-29-2007 6:13 PM
Hello Megan,
This works for me, please try this code:
It retains the values from the second selection screen 200.
In the second screen, you need to press the run button to go back to the main selection screen.
REPORT ZTEST_NP.
TABLES SSCRFIELDS.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: P_NUM1 TYPE I.
SELECTION-SCREEN FUNCTION KEY 5.
SELECTION-SCREEN: BEGIN OF SCREEN 200.
PARAMETERS: P_NUM2 TYPE I.
SELECTION-SCREEN: END OF SCREEN 200.
INITIALIZATION.
functxt-quickinfo = 'Screen 200'.
functxt-icon_text = 'Screnn 200'.
sscrfields-functxt_05 = functxt.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-ucomm.
WHEN 'FC05'.
CALL selection-SCREEN 200 starting at 10 10.
ENDCASE.
START-OF-SELECTION.
WRITE: / 'num1', P_NUM1,
/ 'num2', P_NUM2.
Regards,
Naimesh Patel
10-29-2007 6:13 PM
Hello Megan,
This works for me, please try this code:
It retains the values from the second selection screen 200.
In the second screen, you need to press the run button to go back to the main selection screen.
REPORT ZTEST_NP.
TABLES SSCRFIELDS.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: P_NUM1 TYPE I.
SELECTION-SCREEN FUNCTION KEY 5.
SELECTION-SCREEN: BEGIN OF SCREEN 200.
PARAMETERS: P_NUM2 TYPE I.
SELECTION-SCREEN: END OF SCREEN 200.
INITIALIZATION.
functxt-quickinfo = 'Screen 200'.
functxt-icon_text = 'Screnn 200'.
sscrfields-functxt_05 = functxt.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-ucomm.
WHEN 'FC05'.
CALL selection-SCREEN 200 starting at 10 10.
ENDCASE.
START-OF-SELECTION.
WRITE: / 'num1', P_NUM1,
/ 'num2', P_NUM2.
Regards,
Naimesh Patel