Application Development 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: 

Hiding Fields in the screen

Former Member
0 Kudos

Hi Experts,

I have an requirement to hide the fields on the screens if the fileds are not populated with the values .

I need to completely hide the fileds,not disabling the fields.

How to go about it.

Thanks in Advance.

Regards,

IFF

1 ACCEPTED SOLUTION

faisal_altaf2
Active Contributor
0 Kudos

Hi, IFF

Try the following code it will definitely Solve out your problem

PARAMETERS: ppernr LIKE pa0001-pernr.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF ppernr IS INITIAL.
      IF ( screen-name = 'PPERNR' or screen-name = '%_PPERNR_%_APP_%-TEXT' ).
        screen-active = '0'.
        screen-invisible = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

INITIALIZATION.
  ppernr = '00000001'. " if you comment this line it will hide it :)

Please Reply if still any Issue,

Kind Regards,

Faisal

8 REPLIES 8

Former Member
0 Kudos

Hi IFF,

Refer to this link:

in that before to display to the sceen check the filed initiality.

if not initial show your field

else not display.


"code is there in above link

Thanks!!

faisal_altaf2
Active Contributor
0 Kudos

Hi, IFF

First of all to find the Screen Field name follow the steps bellow.

1. --> Display the Screen With all the fields

2. --> Place you Muse Courser on the Field you want to hide using the Loop at Screen

3. --> Press 'F1' Key and on the display Window

4. --> From the Tool bar select the Technical Information Button

and after finding the name of the fied follow the following code for example here i am hiding some fields using their name.

AT SELECTION-SCREEN OUTPUT.
  BREAK-POINT.
  LOOP AT SCREEN.
    IF (
*       screen-name = '%BYB1005_BLOCK_1000'
       screen-name = '%FYTI007_1000'
     or  screen-name = '%FBIS010_1000'
     or  screen-name = 'PYVW0_0'
 
     or  screen-name = '%_PYPERNR_%_APP_%-TEXT'
     or  screen-name = 'PYPERNR-LOW'
     or  screen-name = '%_PYPERNR_%_APP_%-VALU_PUSH'
 
        ).
      screen-active = '0'.
      screen-invisible = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Please Reply if any Issue,

Kind Regards,

Faisal

faisal_altaf2
Active Contributor
0 Kudos

Hi, IFF

Try the following code it will definitely Solve out your problem

PARAMETERS: ppernr LIKE pa0001-pernr.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF ppernr IS INITIAL.
      IF ( screen-name = 'PPERNR' or screen-name = '%_PPERNR_%_APP_%-TEXT' ).
        screen-active = '0'.
        screen-invisible = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

INITIALIZATION.
  ppernr = '00000001'. " if you comment this line it will hide it :)

Please Reply if still any Issue,

Kind Regards,

Faisal

shahid_malayil1
Explorer
0 Kudos

Dear IFF,

You can use Screen Variant also.

TCode : SHD0

Best regards,

Shahid Malayil

0 Kudos

Hi Shaid,

Can you pleae provide me the step wise procedure for the transaction SHD0 as I am doing it for the first time.

Thanx in Advance.

Regards,

IFF

0 Kudos

Hi IFF,

refer to this link:

procedure for screen variant Maintenance

http://help.sap.com/saphelp_nw70/helpdata/EN/7d/f639fb015111d396480000e82de14a/frameset.htm

hope it helps you.

Thanks!

Former Member
0 Kudos

answered by experts