‎2011 Jun 22 2:33 AM
Dear Experts,
I have been struggling to hide an input field in a custom screen area, with a code like this, in the PBO module of a screen-exit.
LOOP AT SCREEN.
IF SCREEN-NAME = 'VIQMEL-ZZ_DLY'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Several alternative codes tried with the help of many SDN threads (also to hide field), but no influence on the field above.
Request your kind help.
Regards
Jogeswara Rao
‎2011 Jun 22 9:43 AM
hi,
in PBO module, where r u writing this code for hiding? i mean between loop and endloop? can u pls paste ur code?
and you can also try once again
loop at screen.
if screen-name = 'your field name'.
screen-active = '0'
screen-invisible = '1'.
endif.
modify screen.
endloop.
‎2011 Jun 22 5:53 AM
Hi,
to hide the field, screen-output must be set to '0' too. You can screen-active to '0'. That sets both screen-input and screen-output to '0'.
Regards,
Klaus
‎2011 Jun 22 6:07 AM
Hi Jogeswara Rao,
Try like this,
LOOP AT SCREEN.
IF SCREEN-NAME = 'VIQMEL-ZZ_DLY'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Hope this will work.
Regards,
Chandu.
‎2011 Jun 22 6:28 AM
Hi,
Screen-input = 0 just makes the screen disabled for input.
If you intend to make the field hidden, try using :
LOOP AT SCREEN.
IF SCREEN-NAME = 'VIQMEL-ZZ_DLY'.
SCREEN-INVISIBLE = 1.
SCREEN-ACTIVE= 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Also, you should post it in UI programming forum for better responses.
Edited by: sap_wiz on Jun 22, 2011 10:58 AM
‎2011 Jun 22 6:32 AM
Thank you all for the replies.
As I said in my post, every code suggested above was there among my trials last few days, without any success.
It is not the syntax, something else is missing, which I am not able to understand being basically from fucnctional background.
Thank you SAP_Wiz for your suggestion to post in other forum, but the moderator terminates such efforts by saying that 'a duplicate post'
Regards
Jogeswara Rao
‎2011 Jun 22 6:40 AM
Hi,
Is there some condition on which you wish to hide the field?
Like some user input?
‎2011 Jun 22 6:41 AM
Hi,
Your using the code in screen exit right. type Break-point inside the loop and check whether the coding is triggering or not?
Regards,
Dhina..
‎2011 Jun 22 6:47 AM
Dear Experts,
I've got some clue.
In fact I was not attracted towards a message displayed in the Status Bar while checking the syntax, because it was displayed in green. (After this message there is no problem in generating active object.)
The message reads:
There is no main program for include ZXQQMO03You may please guide me now.
(I am having a module in PAI also, where the code is working without any such message)
Regards
Jogeswara Rao
‎2011 Jun 22 7:49 AM
Yes SAP_WIZ,
I've tried withat too for a long time.
Regards
Jogeswara Rao
‎2011 Jun 22 9:43 AM
hi,
in PBO module, where r u writing this code for hiding? i mean between loop and endloop? can u pls paste ur code?
and you can also try once again
loop at screen.
if screen-name = 'your field name'.
screen-active = '0'
screen-invisible = '1'.
endif.
modify screen.
endloop.
‎2011 Jun 22 10:53 AM
Medha,
My code is there in my first post.
Thank you all for replying
The problem is solved. As i wrote there is no syntax error. It started working with the same code after I deleted the screen (0103)
and recreated (SE51). Used the same code.
Tried both disabling and hiding codes, both are working.
But with the disabling code, the fields are filled with ******.
Is there any way to hide entire screen-area (0103)
Regards
Jogeswara Rao
‎2011 Jun 22 11:51 AM
Hi,
we can do it in the way use group option in the screen.
better create one group for all the screen elements ref the group 'G1' and write the code.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
hope its helpful.
Regards,
Dhina..
‎2011 Jun 22 12:09 PM
Thank you for response.
But I am using exactly the same code at present which does not hide the screen area, but hides all the fields belonging to this grooup.
The screen Box and Text Headings remain.
Regards
Jogeswara Rao
‎2011 Jun 22 12:11 PM
Hi,
You need to make sure you have selected screen box and all the fields and assigned them to the same group.
‎2011 Jun 22 12:31 PM
That's it.
I did that.
Thanks to SAP_wiz and Dhina DMD.
Closing the thread now.
Regards
Jogeswara Rao
‎2011 Jun 22 12:34 PM
Hi,
Please mark the thread as answered if your problem is solved.