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

Selection Screen

Former Member
0 Likes
632

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
604

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

7 REPLIES 7
Read only

Former Member
0 Likes
604

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

Read only

anversha_s
Active Contributor
0 Likes
604

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

Read only

Former Member
0 Likes
604

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

Read only

learnsap
Active Participant
0 Likes
604

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

Read only

Former Member
0 Likes
605

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

Read only

Former Member
0 Likes
604

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.

Read only

Former Member
0 Likes
604

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.