Application Development and Automation 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: 
Read only

Make fields invisible based on selection in module pool screen

Former Member
0 Likes
803

I have a several fields in my module pool screen.

There i have a box called Ref Obj.

Inside the box i have fields a b c d e f.

suppose my input has parameter 1.

I need to show only fielda a and b inside the box

suppose my input has parameter 2.

I need to show only fielda c and d inside the box

suppose my input has parameter 3.

I need to show only fielda e and f inside the box

suppose my input has parameter 4.

I should not show any fields and box should be invisible.

I would appreciate if any one could help me regarding this

Thanks in advance

4 REPLIES 4
Read only

Former Member
0 Likes
630

Hi,

In the PAI of the screen flow, depending on the parameter selected, set flags..

In the PBO, LOOP AT SCREEN. and depending on which flag is set, set screen-invisible = 1.

PBO:

LOOP AT SCREEN.

IF w_1 EQ 'X'.

IF screen-name NE 'A'

OR screen-name NE 'B'.

screen-invisible = 1.

modify screen.

endif.

elseif w_2 EQ 'X'.

....

ENDLOOP.

PAI.

IF p_par1 EQ 'X'.

w_1 = 'X'.

........

ENDIF.

Thanks and Best Regards,

Vikas Bittera.

Read only

Former Member
0 Likes
630

hi,

go through this code, and make the required changes according to u'r requirement but the logic is same.

TABLES: mara , lfa1.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: p_matnr LIKE mara-matnr DEFAULT 'M633640000' MODIF ID m1,

p_ersda LIKE mara-ersda DEFAULT '30.06.2004' MODIF ID m2,

p_aenam LIKE mara-aenam DEFAULT 'DOVIND' MODIF ID m3,

p_matkl LIKE mara-matkl DEFAULT '0000' MODIF ID m4,

p_meins LIKE mara-meins DEFAULT 'ST' MODIF ID m5,

p_mbrsh LIKE mara-mbrsh DEFAULT 'M' MODIF ID m6,

p_vpsta LIKE mara-vpsta DEFAULT 'KV' MODIF ID m7.

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.

PARAMETERS: p_lifnr LIKE lfa1-lifnr DEFAULT 5070001063 MODIF ID s1 ,

p_land1 LIKE lfa1-land1 DEFAULT 'FR' MODIF ID s1,

p_name1 LIKE lfa1-name1 DEFAULT 'HONDA' MODIF ID s3,

p_ort01 LIKE lfa1-ort01 DEFAULT 'PARIS' MODIF ID s4.

SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'M1' .

screen-input = 0.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M2' .

screen-invisible = 1.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M3' .

screen-intensified = 1.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M5' .

screen-length = 10.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M6' .

screen-active = 0.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M7' .

screen-display_3d = 1.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'M4' .

screen-output = 0.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'S1' AND

screen-name = 'P_LIFNR'.

screen-values_in_combo = 1.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'S1' AND

screen-name = 'P_LAND1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

<b>please reward points if helpfull.</b>

with regards,

radhika kolluru.

Read only

0 Likes
630

These fields are not selection screen fields.

These are module screen fields designed from SE51

Read only

0 Likes
630

I was able to get this functionality