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

ScreenPainter Properties in ABAP code

Former Member
0 Likes
1,227

Hi all that's my first post here & i have a "Big" question can we use a screen painter element Properties in an ABAP code

Exemple:

in a input/output Field i want to change the text color after a some conditions

Help please

Regards.

MEHDI

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,082

Hello,

There would some functionality that can be attained by coding in ABAP. Say for instance you want the text in an input box to be changed in color upon clicking a puchbutton.

Say TEXT is the name of the input box and OK is the function code of the button, then if you write the code similar to the following in the PBO of the screen, the color change can be attained


if sy-ucomm = 'OK'.
  loop at screen.
    if screen-name = 'TEXT'.
      screen-intensified = '1'.
      modify screen.
    endif.
  endloop.
endif.

Similarly using screen-invisible, screen-input etc can be used to hide or disable the input box at runtime.

Regards,

Sachin

8 REPLIES 8
Read only

Former Member
0 Likes
1,082

Hi,

There are some properties like enable and disable or greyed out the fields you can manage

using the SCREEN internal table but not all functionalities.

Some of them need to be set at property level in se51.

Regards and Best wishes.

Read only

Former Member
0 Likes
1,082

What can and cannot be?

[Properties of screen painter in ABAP|http://help.sap.com/saphelp_nw70/helpdata/en/d1/801c3a454211d189710000e8322d00/content.htm]

Read only

0 Likes
1,082

How to use those properties in my abap code ??

Read only

0 Likes
1,082

Thats a pretty vast question. If you have any requirement put it. Anyways you can google or go for F1 help.

Read only

Former Member
0 Likes
1,083

Hello,

There would some functionality that can be attained by coding in ABAP. Say for instance you want the text in an input box to be changed in color upon clicking a puchbutton.

Say TEXT is the name of the input box and OK is the function code of the button, then if you write the code similar to the following in the PBO of the screen, the color change can be attained


if sy-ucomm = 'OK'.
  loop at screen.
    if screen-name = 'TEXT'.
      screen-intensified = '1'.
      modify screen.
    endif.
  endloop.
endif.

Similarly using screen-invisible, screen-input etc can be used to hide or disable the input box at runtime.

Regards,

Sachin

Read only

0 Likes
1,082

Thx i'll try it

regards.

Medix

Read only

0 Likes
1,082

That solved My Question thx a lot

regards.

Medix

Read only

Former Member
0 Likes
1,082

Moderator message - Unfortunately, this forum is not a place to learn ABAP. I suggest that you get one of the good ABAP books that are out there and maybe join an internet forum that caters to beginners Please also read and before posting Rob