Selection Screen dynamic Modification in SAP ABAP

preview_player
Показать описание
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.
Рекомендации по теме
Комментарии
Автор

Thank you very much ! Love ❤️ from India

samiulllask
Автор

My sap SI is saying: you should not modify the tabs and fields in SaP t-code screens.. they are also saying you can not change the text of fields in standard SAP screens. And can not change f4 help in in fields which do not have it. Please clarify it if possible.

vinodkumarPrajapativnd
Автор

Thanks sir.
I didn't understand the difference between cs and cp in loop on screen..

MdSajid-jwtl
Автор

Is it possible to read query selection screen in ABAP and do some checks before executing report??

va-runvlogs
Автор

Hi pankaj, when i execute this code event is not triggered in my program
Loop at screen.
If p_com = 'x'. x is showing in red color but in ur program it showing in green color
After this line screen-group1 = 'A1' is also showing in red color what is the problem can u explain.

sharabupullarao
Автор

Hey R u providing personal tutoring for the abap on Hana?

pateljaimin