Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.22 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  Z_DYNPRO_REPORT
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *&
  6. *&
  7. *&---------------------------------------------------------------------*
  8.  
  9. REPORT  z_dynpro_report.
  10.  
  11. INCLUDE z_dynpro_report_inc.
  12.  
  13. DATA: l_o_screen_configuration_1 TYPE REF TO lcl_dynpro_handler,
  14.       l_o_screen_configuration_2 TYPE REF TO lcl_dynpro_handler.
  15. DATA: v_carrid TYPE scarr-carrid.
  16.  
  17. PARAMETERS: r_opt_1 RADIOBUTTON GROUP opt USER-COMMAND option_selected.
  18. PARAMETERS: p_carrid TYPE scarr-carrid.
  19. PARAMETERS: r_opt_2 RADIOBUTTON GROUP opt.
  20. SELECT-OPTIONS: s_carrid FOR v_carrid.
  21.  
  22. INITIALIZATION.
  23.   " The initial state of selection screen is loaded (just as the screen is declared)
  24.   CREATE OBJECT:
  25.   l_o_screen_configuration_1 TYPE lcl_dynpro_handler,
  26.   l_o_screen_configuration_2 TYPE lcl_dynpro_handler.
  27.  
  28.   " Configuration of screen state 1
  29.   CALL METHOD l_o_screen_configuration_1->set_input
  30.     EXPORTING
  31.       im_field_name = 'P_CARRID'
  32.       im_input_mode = abap_true.
  33.   CALL METHOD l_o_screen_configuration_1->set_input
  34.     EXPORTING
  35.       im_field_name = 'S_CARRID-LOW'
  36.       im_input_mode = abap_false.
  37.   CALL METHOD l_o_screen_configuration_1->set_input
  38.     EXPORTING
  39.       im_field_name = 'S_CARRID-HIGH'
  40.       im_input_mode = abap_false.
  41.   " Configuration of screen state 2
  42.   CALL METHOD l_o_screen_configuration_2->set_input
  43.     EXPORTING
  44.       im_field_name = 'P_CARRID'
  45.       im_input_mode = abap_false.
  46.   CALL METHOD l_o_screen_configuration_2->set_input
  47.     EXPORTING
  48.       im_field_name = 'S_CARRID-LOW'
  49.       im_input_mode = abap_true.
  50.   CALL METHOD l_o_screen_configuration_2->set_input
  51.     EXPORTING
  52.       im_field_name = 'S_CARRID-HIGH'
  53.       im_input_mode = abap_true.
  54.   " Default configuration
  55.   CALL METHOD l_o_screen_configuration_1->commit_screen.
  56.  
  57. AT SELECTION-SCREEN OUTPUT.
  58.   IF r_opt_1 = 'X'.
  59.     " Apply configuration 1
  60.     CALL METHOD l_o_screen_configuration_1->commit_screen.
  61.   ENDIF.
  62.   IF r_opt_2 = 'X'.
  63.     " Apply configuration 2
  64.     CALL METHOD l_o_screen_configuration_2->commit_screen.
  65.   ENDIF.
  66.  
  67. START-OF-SELECTION.
  68.   " Here the important part which you will need to worry...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement