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: 

Hide a Text field

Former Member
0 Kudos
1,303

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

former_member188685
Active Contributor
0 Kudos
271

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.

Former Member
0 Kudos
271

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.

0 Kudos
271

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

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

0 Kudos
271

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

Regards,

Valter Oliveira.

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos
271

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.

Former Member
0 Kudos
271

hi,

write like this.

Loop at screen.

if screen-name = 'P9003-PURCHASE'.

SCREEN-INVISIBLE = '1'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Former Member
0 Kudos
271

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.

Former Member
0 Kudos
271

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.

0 Kudos
271

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