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: 

Showing/Hiding icons in Module Pool

Former Member
0 Kudos
1,057

Hi,

I have the requirement to dynamically show/hide an icon (based on conditions) on the module pool screen. Please let me know as to how this can be done.

Regards,

Divya.

5 REPLIES 5

Former Member
0 Kudos
189

Hi,

You can do it in the PBO event,

IF xxxxxx " Write your condition

LOOP AT SCREEN.

IF SCREEN-NAME = 'xxxx'. " Screen field name

SCREEN-ACTIVE = 0.

SCREEN -INVISIBLE = 1.

Modify SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Please close the Duplicate threads

Regards

Sudheer

0 Kudos
189

Hi Sudheer,

I want to hide the icon and I don't see any representation for the icon in Element List. So how do I get to know the name of the icon on the screen?

Regards,

Divya.

Former Member
0 Kudos
189

Hi

Try like this

parameters :

table1(30) type c,

input(30) type c.

data w_flag type i.

at selection-screen output.

if w_flag eq 1.

clear w_flag.

loop at screen.

if screen-name = 'INPUT'.

%_INPUT_%_APP_%-TEXT = TABLE1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

at selection-screen.

w_flag = 1.

start-of-selection.

write input.

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos
189

Hi,

Use GET PF-STATUS to Gets the current GUI status.

Syntax

GET PF-STATUS <f> [PROGRAM <prog>] [EXCLUDING <itab>].

Returns the name of the current GUI status (the same as SY-PFKEY) into the variable <f>. The PROGRAM addition writes the name of the ABAP program to which the status belongs into the variable <prog>. The EXCLUDING addition returns a list of all currently inactive function codes into the internal table <itab>.

Then use SET PF-STATUS Sets the GUI status

Syntax

SET PF-STATUS <stat> [EXCLUDING <f>|<itab>]

[IMMEDIATELY] [OF PROGRAM <prog>].

Sets the GUI status <stat> for the subsequent screens. The EXCLUDING addition allows you to deactivate functions dynamically. The IMMEDIATELY addition sets the GUI status of the list currently displayed. The OF PROGRAM addition allows you to use a GUI status from another program.

Here you can use the Excluding option to exclude the ICONS

Regards

Sudheer

0 Kudos
189

Hi,

Sorry if I was not putting it clear across. This icon is not a standard icon on the Application toolbar. This is to be displayed on the tabs of a tabstrip. Based on a condition it is to be shown/hidden.

Regards,

Divya.

Message was edited by:

divya rajendiran