Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding selection screen fields upon clicking a button

Former Member
0 Kudos

Hi .

I have a requirement like we need to hide and bring back the selection screen fields upon clicking a button( Expand and collapse in the same button) .

in ABAP Query,we can maintain this, for the variant we created.

We need this functionality on the selection-screen presently.

How to achieve this in the selection -screen?

Valuale pointers are desparately needful.

Regards,

SSR.

2 REPLIES 2

Former Member
0 Kudos

hi

use loop at screen

Cheers

Snehi

former_member70391
Contributor
0 Kudos

Hi,

-


SELECTION SECREEN (P_) Parameter

(S_) Select Options

-


SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001,

BEGIN OF LINE,

COMMENT (26) C1 MODIF ID XYZ.

SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID XYZ NO-EXTENSION .

SELECTION-SCREEN : END OF LINE,

BEGIN OF LINE,

COMMENT (26) C2 MODIF ID XYZ.

SELECT-OPTIONS : S_MATKL FOR MARA-MATKL MODIF ID XYZ NO-EXTENSION .

SELECTION-SCREEN : END OF LINE.

PARAMETERS : R_MATNR RADIOBUTTON GROUP RAD1 DEFAULT 'X'

MODIF ID ABC USER-COMMAND MAT,

R_MATKL RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN END OF BLOCK blk1.

-


INITIALIZATION.

-


C1 = 'Product Code'.

c2 = 'Product Group'.

-


AT SELECTION-SCREEN OUTPUT.

-


LOOP AT SCREEN.

IF SCREEN-NAME0(7) = 'S_MATNR' OR SCREEN-NAME0(7) = 'S_MATKL'.

SCREEN-INPUT = '0'.

SCREEN-INVISIBLE = '1'.

ENDIF.

CASE SCREEN-NAME+0(7).

WHEN 'S_MATNR'.

IF R_MATNR = 'X'.

SCREEN-INPUT = '1'.

SCREEN-INVISIBLE = '0'.

ENDIF.

WHEN 'S_MATKL'.

IF R_MATKL = 'X'..

SCREEN-INPUT = '1'.

SCREEN-INVISIBLE = '0'.

ENDIF.

ENDCASE.

IF R_MATNR = 'X'.

IF SCREEN-NAME = 'C1'.

C1 = 'Product code'.

C2 = SPACE.

ENDIF.

ENDIF.

IF R_MATKL = 'X'.

IF SCREEN-NAME = 'C2'.

C2 = 'Product Group'.

C1 = SPACE.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Hope it helps.

best regards,

Nagaraj Kalbavi