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

Icon changed dynamically

Former Member
0 Likes
498

Hi. Is there some possilbility to control dynamically which icon appears in the SCREEN? Or maybe there is some way to set icon which was added to the SCREEN invisible depending on some conditions? Greetings. P.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
458

Hello,

Please see the example provided by SAP in abapdocu

run abapdocu ->ABAP user dialogs ->screens -> Complex screen elements ->

status icons on screens (REPORT demo_dynpro_status_icons.)

This standard example will give youa detail idea on the use of icons and thier use on screens''

Hope it served your purpose

Reward if helpful

Regards

Byju

3 REPLIES 3
Read only

Former Member
0 Likes
458

Hi,

First, create the button on the screen. Give a name like 'THISBUTTON' in the name field of the button(not the text field), click the OUTPUT Only checkbox. Now, in your ABAP program, define a field for this button that you created and set the value of the icon in the PBO.

  • In this sample program, there is a button on screen 100

  • which has the name of THISBUTTON, and is set as output

  • only.

report zkiran_0001.

<b>type-pools: icon.

data: thisbutton(30) Type c.</b>

call screen 100.

&----


*& Module status_0100 OUTPUT

&----


  • text

----


module status_0100 output.

<b>write icon_green_light as icon to thisbutton.

concatenate thisbutton 'This is the button' into thisbutton

separated by space.</b>

endmodule. " status_0100 OUTPUT

&----


*& Module user_command_0100 INPUT

&----


  • text

----


module user_command_0100 input.

leave program.

endmodule. " user_command_0100 INPUT

Regards

Read only

0 Likes
458

The usual recommendation is to call the ICON_CREATE function module module to define your icons - this gives you extra functionality such as being able to specify the quickinfo for it at runtime... have a read through:

http://help.sap.com/saphelp_46c/helpdata/en/59/348efa61c611d295750000e8353423/content.htm

as this gives a lot more info, and an example.

cheers

Jonathan

Read only

Former Member
0 Likes
459

Hello,

Please see the example provided by SAP in abapdocu

run abapdocu ->ABAP user dialogs ->screens -> Complex screen elements ->

status icons on screens (REPORT demo_dynpro_status_icons.)

This standard example will give youa detail idea on the use of icons and thier use on screens''

Hope it served your purpose

Reward if helpful

Regards

Byju