Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamically Activate and Deactivate Selection Screen

Hi Guys,

Can anybody tell me how to activate and deactive the Selectrion screen.

My Req is I have 4 Blocks.

in 1st BLOCK 3 Check boxes are there based on these 3 Check Boxes i have to Activate and Deactivate the other 3 Blocks which are B2 , B3 and B4.

i tried to write the code but it doesn't working even after usinf User Command sattements for these3 check Boxes

Code is Below

SELECTION-SCREEN: BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETER: p_MIP AS CHECKBOX DEFAULT 'X' USER-COMMAND ABC.

SELECTION-SCREEN COMMENT 2(65) TEXT-002 for field p_MIP.

SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETER: p_PFT AS CHECKBOX DEFAULT 'X' USER-COMMAND BCA.

SELECTION-SCREEN COMMENT 2(65) TEXT-003 for field p_PFT.

SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETER: p_ISD AS CHECKBOX DEFAULT 'X' USER-COMMAND CAB.

SELECTION-SCREEN COMMENT 2(65) TEXT-004 for field p_ISD.

SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN END OF BLOCK bk1.

SELECTION-SCREEN BEGIN OF BLOCK bk2 WITH FRAME TITLE text-005.

PARAMETER: p_MiIP AS CHECKBOX DEFAULT 'X' MODIF ID P1,

p_payme AS CHECKBOX DEFAULT 'X' MODIF ID P1,

p_vend AS CHECKBOX DEFAULT 'X' MODIF ID P1.

SELECTION-SCREEN END OF BLOCK bk2.

SELECTION-SCREEN BEGIN OF BLOCK bk3 WITH FRAME TITLE text-006.

*

PARAMETER: p_MiIP1 AS CHECKBOX DEFAULT 'X' MODIF ID P2,

p_payme1 AS CHECKBOX DEFAULT 'X' MODIF ID P2,

p_vend1 AS CHECKBOX DEFAULT 'X' MODIF ID P2.

SELECTION-SCREEN END OF BLOCK bk3.

SELECTION-SCREEN BEGIN OF BLOCK bk4 WITH FRAME TITLE text-007.

PARAMETER: p_MiIP2 AS CHECKBOX DEFAULT 'X' MODIF ID P3,

p_payme2 AS CHECKBOX DEFAULT 'X' MODIF ID P3,

p_vend2 AS CHECKBOX DEFAULT 'X' MODIF ID P3.

SELECTION-SCREEN END OF BLOCK bk4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF P_MIP EQ 'X'." AND SCREEN-GROUP1 = 'P1'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

Endif.

IF p_PFT EQ 'X' ."AND SCREEN-GROUP1 = 'P2'.

SCREEN-GROUP1 = 'P2'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

Endif.

IF p_ISD EQ 'X' ."AND SCREEN-GROUP1 = 'P3'.

*SCREEN-GROUP1 = 'P1'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

Endif.

MODIFY SCREEN.

ENDLOOP.

Thanks,

Gopi.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question