01-17-2009 7:38 AM
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
01-17-2009 8:04 AM
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
01-17-2009 7:46 AM
01-17-2009 7:54 AM
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
01-17-2009 8:04 AM
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
01-17-2009 8:48 AM
Dear IFF,
You can use Screen Variant also.
TCode : SHD0
Best regards,
Shahid Malayil
01-17-2009 8:56 AM
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
01-17-2009 9:02 AM
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!
01-17-2009 9:06 AM
Dear IFF,
I hope these links will help you
http://www.mortenhjorthnielsen.dk/Security/transactionvariants.htm
http://help.sap.com/erp2005_ehp_04/helpdata/EN/7d/f63a0d015111d396480000e82de14a/frameset.htm
Best regards,
Shahid Malayil
01-31-2009 6:36 AM