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

Hide a Text field

Former Member
0 Likes
2,605

Hi,

I have created a custom infotype. I want to hide one text field.

In PBO i wrote the following code to hide the screen but when I am checkng my infotype in PA30 the text field is not still visible.

Loop at screen.

if screen-name = P9003-PURCHASE.

SCREEN-INVISIBLE = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Kindly Assist.

9 REPLIES 9
Read only

Former Member
0 Likes
1,573

you mean screen text still visible..?

do like this.. Use CS

Loop at screen.
if screen-name CS P9003-PURCHASE.
SCREEN-INVISIBLE = '1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Read only

Former Member
0 Likes
1,573

Hi,

I replaced '=' with 'CS' and activated the screen .

But now entire screen of my infotype becomes invisible.I can just see my infotype header rest all below screen is blank.

Read only

0 Likes
1,573

what is there in this field P9003-PURCHASE..?

and do you have any other fields on the screen or only one field.

Read only

0 Likes
1,573

Use: if screen-name = 'P9003-PURCHASE'.

Regards,

Valter Oliveira.

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,573

Hi Palak,

CS will hide teh whole screen but if you find out the screen-name for the text element you want to hide , you can specify that and it will hide teh same .

Loop at screen.

if screen-name = 'Text name'.

SCREEN-INVISIBLE = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,573

hi,

write like this.

Loop at screen.

if screen-name = 'P9003-PURCHASE'.

SCREEN-INVISIBLE = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,573

My infotype have many fields .

P9003-PURCHASE is text field

So I want to hide this text field and just want to display the input/output field of it.

whereas I want to display other text field of the screen.

Read only

Former Member
0 Likes
1,573

Hi Anil,Valter and Sandeep,

I tried all of your options but the text field is still visible.

Loop at screen.

if screen-name = P9003-PURCHASE''.

SCREEN-INVISIBLE = '1'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

0 Likes
1,573

Loop at screen.
  CHECK screen-name = 'P9003-PURCHASE'.
  screen-active = '0'.
  MODIFY SCREEN.
ENDLOOP.