To design selection screen: ********************************************************** PARAMETERS: p_create TYPE c RADIOBUTTON GROUP rb1 DEFAULT 'X' USER-COMMAND sel, p_change TYPE c RADIOBUTTON GROUP rb1 . SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. SELECT-OPTIONS s_route FOR trolz-route MODIF ID m1. PARAMETER: p_kunwe TYPE vawk-kunwe MODIF ID m1. PARAMETER: p_giday TYPE cacsdayweek MODIF ID m1. PARAMETER: p_gitime LIKE sy-uzeit DEFAULT '200000' MODIF ID m1. SELECTION-SCREEN END OF BLOCK b1. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-008. SELECT-OPTIONS : s_vkorg FOR vbak-vkorg MODIF ID m2, s_kunwe FOR vawk-kunwe MODIF ID m2. PARAMETER : p_ktokd type kna1-ktokd MODIF ID m2. SELECTION-SCREEN END OF BLOCK b2. *AT SELECTION-SCREEN OUTPUT AT SELECTION-SCREEN OUTPUT . LOOP AT SCREEN. IF screen-name = 'P_GITIME'. screen-input = '0'. MODIFY SCREEN. ENDIF. ENDLOOP. IF p_create = 'X'. LOOP AT SCREEN. IF screen-group1 = 'M2'. screen-input = 0. screen-active = 0. ENDIF. IF screen-group1 = 'M2'. screen-input = 0. screen-active = 1. ENDIF. MODIFY SCREEN. ENDLOOP. ENDIF. IF p_change = 'X'. LOOP AT SCREEN. IF screen-group1 = 'M1'. screen-input = 0. screen-active = 0. ENDIF. IF screen-group1 = 'M1'. screen-input = 0. screen-active = 1. ENDIF. MODIFY SCREEN. ENDLOOP. ENDIF. ******************************************************************* SELECTION-SCREEN:BEGIN OF BLOCK sales_area WITH FRAME TITLE text-001. PARAMETERS: p_vkorg LIKE vbak-vkorg OBLIGATORY. SELECT-OPTIONS:p_vbeln FOR vbak-vbeln, p_audat FOR vbak-audat OBLIGATORY, p_auart FOR vbak-auart, p_kunnr FOR vbak-kunnr, p_ernam FOR vbak-ernam, p_vbtyp FOR vbak-vbtyp, p_kschl FOR konh-kschl NO INTERVALS, p_pstyv FOR vbap-pstyv NO INTERVALS. SELECTION-SCREEN: END OF BLOCK sales_area. SELECTION-SCREEN:BEGIN OF BLOCK price_cond WITH FRAME TITLE text-032. PARAMETERS:p_ovrrd AS CHECKBOX USER-COMMAND flg1 DEFAULT gcf_x, p_fchar AS CHECKBOX USER-COMMAND flg2 DEFAULT gcf_x, p_disp AS CHECKBOX USER-COMMAND flg3 . SELECTION-SCREEN:END OF BLOCK price_cond. SELECTION-SCREEN:BEGIN OF BLOCK grid_disp WITH FRAME TITLE text-036. PARAMETERS:p_grid AS CHECKBOX. SELECTION-SCREEN:END OF BLOCK grid_disp. ************************************************************** Authority check * inquiry authority of sales area AUTHORITY-CHECK OBJECT lcf_vbak_vko ID lcf_vkorg FIELD p_vkorg ID lcf_vtweg FIELD ldf_vtweg ID lcf_spart FIELD ldf_spart ID lcf_actvt FIELD lcf_03. IF sy-subrc <> 0. *You are not authorized to execute processing [contact the system administrator] MESSAGE : e101(zev0101) WITH p_vkorg. ENDIF. ENDIF. ENDFORM. " CHECK_AUTH ********************************************************************
Tuesday, 6 September 2011
Dynamic selection screen
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment