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

PBO module code for field diable/hide not working

jogeswararao_kavala
Active Contributor
0 Likes
2,997

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,256

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.

15 REPLIES 15
Read only

Former Member
0 Likes
2,256

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

Read only

Former Member
0 Likes
2,256

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.

Read only

Former Member
0 Likes
2,256

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

Read only

0 Likes
2,256

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

Read only

0 Likes
2,256

Hi,

Is there some condition on which you wish to hide the field?

Like some user input?

Read only

0 Likes
2,256

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..

Read only

0 Likes
2,256

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 ZXQQMO03

You 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

Read only

0 Likes
2,256

Yes SAP_WIZ,

I've tried withat too for a long time.

Regards

Jogeswara Rao

Read only

Former Member
0 Likes
2,257

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.

Read only

0 Likes
2,256

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

Read only

0 Likes
2,256

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..

Read only

0 Likes
2,256

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

Read only

0 Likes
2,256

Hi,

You need to make sure you have selected screen box and all the fields and assigned them to the same group.

Read only

0 Likes
2,256

That's it.

I did that.

Thanks to SAP_wiz and Dhina DMD.

Closing the thread now.

Regards

Jogeswara Rao

Read only

0 Likes
2,256

Hi,

Please mark the thread as answered if your problem is solved.