filmov
tv
Selection Screen dynamic Modification in SAP ABAP
Показать описание
This video is for creating the selction screen with dynamic input control. How we can create dynamic selection screen with different way. This has been explained nicely.
Code:
REPORT zpktest1.
TABLES mara.
PARAMETERS: p_rad RADIOBUTTON GROUP a USER-COMMAND Z.
SELECT-OPTIONS: s_scr1 FOR mara-matnr MODIF ID a.
SELECT-OPTIONS: s_scr2 FOR mara-entar MODIF ID b.
SELECT-OPTIONS: s_scr3 FOR mara-aeklk MODIF ID c.
PARAMETERS: p_rad1 RADIOBUTTON GROUP a .
SELECT-OPTIONS: s_scr4 FOR mara-/vso/r_stack_no MODIF ID a1.
SELECT-OPTIONS: s_scr5 FOR mara-/bev1/luldegrp MODIF ID b1.
SELECT-OPTIONS: s_scr6 FOR mara-/bev1/luleinh MODIF ID c1.
PARAMETERS: p_input TYPE mara-/bev1/luldegrp MODIF ID P1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad = 'X'.
IF screen-group1 = 'A1'
OR screen-group1 = 'B1'
OR screen-group1 = 'C1'
OR screen-group1 = 'P1' .
* OR screen-name CS 'p_rad1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF p_rad1 = 'X'.
IF screen-GROUP1 = 'A'
OR screen-GROUP1 = 'B'
OR screen-GROUP1 = 'C'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
*
* LOOP AT SCREEN.
* IF p_rad = 'X'.
* IF screen-name CS 'S_SCR4'
* OR screen-name CS 'S_SCR5'
* OR screen-name CS 'S_SCR6'
* OR screen-name CS 'P_INPUT' .
** OR screen-name CS 'p_rad1'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
* ENDIF.
*
* IF p_rad1 = 'X'.
* IF screen-name CP '*S_SCR1*'
* OR screen-name CP '*S_SCR2*'
* OR screen-name CP '*S_SCR3*'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
* ENDIF.
*
* ENDLOOP.
Code:
REPORT zpktest1.
TABLES mara.
PARAMETERS: p_rad RADIOBUTTON GROUP a USER-COMMAND Z.
SELECT-OPTIONS: s_scr1 FOR mara-matnr MODIF ID a.
SELECT-OPTIONS: s_scr2 FOR mara-entar MODIF ID b.
SELECT-OPTIONS: s_scr3 FOR mara-aeklk MODIF ID c.
PARAMETERS: p_rad1 RADIOBUTTON GROUP a .
SELECT-OPTIONS: s_scr4 FOR mara-/vso/r_stack_no MODIF ID a1.
SELECT-OPTIONS: s_scr5 FOR mara-/bev1/luldegrp MODIF ID b1.
SELECT-OPTIONS: s_scr6 FOR mara-/bev1/luleinh MODIF ID c1.
PARAMETERS: p_input TYPE mara-/bev1/luldegrp MODIF ID P1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad = 'X'.
IF screen-group1 = 'A1'
OR screen-group1 = 'B1'
OR screen-group1 = 'C1'
OR screen-group1 = 'P1' .
* OR screen-name CS 'p_rad1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF p_rad1 = 'X'.
IF screen-GROUP1 = 'A'
OR screen-GROUP1 = 'B'
OR screen-GROUP1 = 'C'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
*
* LOOP AT SCREEN.
* IF p_rad = 'X'.
* IF screen-name CS 'S_SCR4'
* OR screen-name CS 'S_SCR5'
* OR screen-name CS 'S_SCR6'
* OR screen-name CS 'P_INPUT' .
** OR screen-name CS 'p_rad1'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
* ENDIF.
*
* IF p_rad1 = 'X'.
* IF screen-name CP '*S_SCR1*'
* OR screen-name CP '*S_SCR2*'
* OR screen-name CP '*S_SCR3*'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
* ENDIF.
*
* ENDLOOP.
Комментарии