Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report Z_DYNPRO_REPORT
- *&
- *&---------------------------------------------------------------------*
- *&
- *&
- *&---------------------------------------------------------------------*
- REPORT z_dynpro_report.
- INCLUDE z_dynpro_report_inc.
- DATA: l_o_screen_configuration_1 TYPE REF TO lcl_dynpro_handler,
- l_o_screen_configuration_2 TYPE REF TO lcl_dynpro_handler.
- DATA: v_carrid TYPE scarr-carrid.
- PARAMETERS: r_opt_1 RADIOBUTTON GROUP opt USER-COMMAND option_selected.
- PARAMETERS: p_carrid TYPE scarr-carrid.
- PARAMETERS: r_opt_2 RADIOBUTTON GROUP opt.
- SELECT-OPTIONS: s_carrid FOR v_carrid.
- INITIALIZATION.
- " The initial state of selection screen is loaded (just as the screen is declared)
- CREATE OBJECT:
- l_o_screen_configuration_1 TYPE lcl_dynpro_handler,
- l_o_screen_configuration_2 TYPE lcl_dynpro_handler.
- " Configuration of screen state 1
- CALL METHOD l_o_screen_configuration_1->set_input
- EXPORTING
- im_field_name = 'P_CARRID'
- im_input_mode = abap_true.
- CALL METHOD l_o_screen_configuration_1->set_input
- EXPORTING
- im_field_name = 'S_CARRID-LOW'
- im_input_mode = abap_false.
- CALL METHOD l_o_screen_configuration_1->set_input
- EXPORTING
- im_field_name = 'S_CARRID-HIGH'
- im_input_mode = abap_false.
- " Configuration of screen state 2
- CALL METHOD l_o_screen_configuration_2->set_input
- EXPORTING
- im_field_name = 'P_CARRID'
- im_input_mode = abap_false.
- CALL METHOD l_o_screen_configuration_2->set_input
- EXPORTING
- im_field_name = 'S_CARRID-LOW'
- im_input_mode = abap_true.
- CALL METHOD l_o_screen_configuration_2->set_input
- EXPORTING
- im_field_name = 'S_CARRID-HIGH'
- im_input_mode = abap_true.
- " Default configuration
- CALL METHOD l_o_screen_configuration_1->commit_screen.
- AT SELECTION-SCREEN OUTPUT.
- IF r_opt_1 = 'X'.
- " Apply configuration 1
- CALL METHOD l_o_screen_configuration_1->commit_screen.
- ENDIF.
- IF r_opt_2 = 'X'.
- " Apply configuration 2
- CALL METHOD l_o_screen_configuration_2->commit_screen.
- ENDIF.
- START-OF-SELECTION.
- " Here the important part which you will need to worry...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement