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

Modify screen

Former Member
0 Likes
1,188

Hello,

I want to know how i can make a field not appear or apear but only one at a time not in a group. I used screen-active =0 but that disapears the whole screen. Thanks

13 REPLIES 13
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,150

use modif id for each screen inputs and then do

if screen-group1 = 'ABC'.

modify screen.

endif.

Read only

Former Member
0 Likes
1,150

Hi David.

Try like this.

Loop at screen .

if screen-name = field-low.

screen-active = 0.

endif.

Modify screen.

End loop.

Regards,

vijay

Read only

Former Member
Read only

former_member229729
Active Participant
0 Likes
1,150

Hi,

Try to give GROUP ID for every elements of your screen using MODIF-ID.

And using the event:

AT SELECTION-SCREEN OUTPUT.
Loop at screen.
If screen-group1 = <>.
  Screen-invisible = 1.
  MODIFY SCREEN.
Endif.

Endloop.

Also refer the URL: http://help.sap.com/abapdocu/en/ABENSCREEN.htm

Rgds,

Ramani N

Edited by: Ramani Nagarajan on Jul 8, 2009 4:16 PM

Read only

Former Member
0 Likes
1,150

you can do this w/ or w/o screen groups (1 to 4).

look at at the structure 'screen'. one of the field in it is for the Field name - 'Screen - Name'. so the pseudo code is;

loop at screen.

if (screen-name EQ field-you-want-to-mess-with)

set screen-flag values.

endif.

modify screen.

endloop.

screen groups can be used if multiple fields get on/off readonly/editable etc. at the same time. in that case, you can do above but with screen-group1(to 4.) to keep the code simple.

Read only

0 Likes
1,150

Hi ,

Yes that is waht i need but, I am having trouble in the code. The field name is txt. this the code I have can you please help?

Thanks.

loop at screen.

if screen-name = 'TXT'.

screen-active = 0.

endif.

modify screen.

endloop.

Read only

0 Likes
1,150

try placing the modify statement inside the condition

Read only

0 Likes
1,150

Hi,

Use the SCREEN field INVISIBLE instead of ACTIVE. The code looks like below.

loop at screen.

  if screen-name = 'TXT'.
    screen-invisible = 'X'.
  endif.
  modify screen.

endloop.

Read only

0 Likes
1,150

Hi,



loop at screen.

if screen-name = 'TXT'.
screen-active = 0.
modify screen. "Here is the change
endif.
endloop.

Read only

0 Likes
1,150

Hi,

Try this code.

LOOP AT SCREEN.
IF screen-name = u2018TXTu2019.
Screen-Input = 0.
Screen-Invisible = 1.
Modify Screen.
ENDIF.
ENDLOOP.

This will make the field invisible.

Thanks,

Sri.

Read only

0 Likes
1,150

Put a breakpoint and go thru all the screen elements. Based on how is screen defined, the description and the actual filed will be different. best thing is to look at screen 1000 (standard selection screen) by going for this report to get all names. Use SE80, not se38 to see the selection screen. remember not to change anything in screen or pai/pbo since it is auto generated.

Read only

Former Member
0 Likes
1,150

Hi,

In your Select-option or Parameters define MODIF ID xyz, then call Loop at screen

parameters: p_XXX TYPE XXX *MODIF ID xyz*.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF screen-name = u2018XYZu2019.
Screen-Input = 0.
Screen-Invisible = 1.
Modify Screen.
ENDIF.
ENDLOOP.

Regards,

Sandhya

Edited by: Sandhyap on Jul 9, 2009 7:18 AM

Read only

Former Member
0 Likes
1,150

Hi David,

if you want do the Modifications of the SCREEN,

you want write the code undre below EVENT and you want write the Screen MODIFY GROUP..

AT SELECTION-SCREEN OUTPUT.

For Example , Code should like below :

SELECT-OPTIONS NAME FOR SY-REPID MODIF ID 'GROUP'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'GROUP'.

SCREEN-ACTIVE = '0'.

MODIFY SCREEN.

ENDLOOP.

Best Regards,

Vijay.