‎2008 Mar 20 6:29 AM
Hi,
I have a parameter P1 on the selection screen.When i am entering some value in that field some more field should be displayed below it on the selection screen.For ex. when i am entering 1 P2,P3,P4 should come.Whe i am entering 2 P3,P4,P5 should come.I also need a validation that the user cannot execute without pressing enter after entering the value in P1.
Mukesh Kumar
‎2008 Mar 20 6:33 AM
Hi Mukesh,
I can suggest one solution. Instead of taking selection screen directly take a screen generated thru screen painter and call it in place of selection screen. Here u can get the remaining paramters displayed by setting the properties in the PAI block.
awrd points if useful
Bhupal
‎2008 Mar 20 6:35 AM
Hi,
Check this out.
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETER : p1 type < > USER-COMMAND change,
PARAMETER : p2 type < > MODIF ID m3,
p3 type < > MODIF ID m3,
p4 type < > MODIF ID m3,
p5 type < > MODIF ID m4,
p6 type < > MODIF ID m4.
SELECTION-SCREEN:END OF BLOCK blk2.
AT SELECTION-SCREEN OUTPUT.
check p1 is not initial.
LOOP AT SCREEN.
if p1 = '1'.
IF screen-group1 = 'M3'.
screen-INPUT = 1.
ELSE.
screen-INPUT = 0.
screen-invisible = 1.
ENDIF.
endif.
if p1 = '2'.
IF screen-group1 = 'M4'.
screen-INPUT = 1.
ELSE.
screen-INPUT = 0.
screen-invisible = 1.
ENDIF.
endif.
MODIFY SCREEN.
ENDLOOP.
For validation for pressing enter, check sy-ucomm.
Reward if helpful.
Regards,
Ramya
.
‎2008 Mar 20 6:45 AM
Hi,
Please declare all the P2,P3.P4.P5 in the select-options.Make all the all the fields except P1 as screen-visible = '0'.
Now if user enter anything put the corresponding logic in AT selection-screen output saying if P1 = 1 then make LOOP at SCREEN with name as P2,P3,p5 and make VISIBLE = '1'.
Suppose user directly executes then code at selection screen if P1 = 1 the LOOP at screen for P2 and check if it si still invisible if so throw message saying "Please enter after making entry in P1 field".
Regards,
Prakash