‎2007 Jan 29 6:20 AM
Hi
Can any one send me a sample program to change the selection screen fields dynamically.
i have three fields viz:
Resource Type : M / U
Material :
Utility :
Requirement: based on the entry in resource type
i have to activate the field.
For e.g. If resource type = M
Materail field input enabled
& Utility field input disabled.
If resource type = U
Materail field input disabled
& Utility field input enabled.
If resource type = blank
Materail field input enabled
& Utility field input enabled.
kind help will be much appreciated and rewarded.
Thanks
‎2007 Jan 29 6:38 AM
hi
you can use the PBO of the selection screen, with the event AT SELECTION-SCREEN OUTPUT.
but you need to triger the event by hitting an enter key or something once you enter your value in the first field.
you can get more details on
http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/frameset.htm
-
Santosh
Message was edited by:
Santosh T G
‎2007 Jan 29 6:23 AM
Hi,
Use the MODIF ID and Loop screen...
LOOP AT SCREEN.
IF screen-group1 = 'ABC'. "#CCE
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards
Subramanian
‎2007 Jan 29 6:26 AM
hi,
chk this.
SELECT-OPTIONS : s_kunnr for kna1-kunnr.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if (SCREEN-NAME EQ 'S_KUNNR-HIGH') OR (SCREEN-NAME EQ 'S_KUNNR-LOW').
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDLOOP.Rgds
Anver
‎2007 Jan 29 6:31 AM
at selection-screen output.
if p_rtyp = 'M'.
loop at screen.
if screen-name = 'PUTILITY'.
screen-input = '0'.
modify screen.
endif.
endloop.
elseif p_rtyp = 'U'.
loop at screen.
if screen-name = 'PMATNR'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
NB here all the fields are parameters only if you are using select-option you have to specify screen name SMATNR-LOW or SMATNR-high.
regards
shiba dutta
‎2007 Jan 29 6:32 AM
Hi,
Try this code:
At Selection-Screen output.
if resource type = M.
loop at screen.
if screeen-name = 'Material'.
screen-input = 1.
else if screen-name = 'Utility'.
screen-input = 0.
endif.
modify screen.
endloop.
elseif resource type = U.
loop at screen.
if screeen-name = 'Material'.
screen-input = 0.
else if screen-name = 'Utility'.
screen-input = 1.
endif.
modify screen.
endloop.
else.
loop at screen.
if screeen-name = 'Material' or
screen-name = 'Utility'..
screen-input = 1.
endif.
modify screen.
endloop.
endif.
Regards,
Ramesh.
*Reward points if found helpful
‎2007 Jan 29 6:38 AM
hi
you can use the PBO of the selection screen, with the event AT SELECTION-SCREEN OUTPUT.
but you need to triger the event by hitting an enter key or something once you enter your value in the first field.
you can get more details on
http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/frameset.htm
-
Santosh
Message was edited by:
Santosh T G
‎2007 Jan 29 6:39 AM
parameters: p_type type c,
p_matnr like mara-matnr modif id 'MAT',
p_ut(4) type c modif id 'UTL'.
at selection-screen output.
loop at screen.
if screen-group1 = 'MAT'.
if p_type = 'M'.
screen-input = 1.
else.
screen-input = 0.
endif.
elseif screen-group1 = 'UTL'.
if p_type = 'U'.
screen-input = 1.
else.
screen-input = 0.
endif.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
‎2007 Jan 29 6:39 AM
Hi Syed,
Check the code below
REPORT ZEX33 .
parameter : ResType,
Material(18) modif id md1,
Utility(15) modif id md2.
at selection-screen output.
if ResType = 'M'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MD1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
elseif ResType = 'U'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MD2'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
endif.
start-of-selection.