cancel
Showing results for 
Search instead for 
Did you mean: 

POWL: Rendering column as ICON source or text

Former Member
0 Kudos

Hi everybody,

I am quite familar with the POWL development but I am confrontated with follwing requirement/problem:

I want to define a POWL column which content that should be displayed as ICON or as DATUM Link.

Is it possible to render it depending on the content?

Like e.G.

- activity does not exist, display create Icon with linkage

- activity available, display the date with link

- activity is completed, display check icon

I am not sure if it is possible to render it as link and also as text, depends on content.

The Icon solution looks like:

ls_fieldcat-colid = 'ACT_ICON'.

ls_fieldcat-display_type = 'LA'.

ls_fieldcat-icon_src_ref = 'ACT_ICON'.

ls_fieldcat-width = '4'.

ls_fieldcat-h_align = 'C'.

ls_fieldcat-icon_first = 'X'.

DDIC ACT_ICON is from type STRING.

In GET_OBJECTS:

Loop...

ls_result-act_icon = 'ICON_GREEN_LIGHT'. "as example

append...

end loop.

Is someone familar with that topic?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Lets try this.

Add one more field in your fieldcat called 'ENABLE'.

And set COL_VISIBLE for this fields as ABAP_FALSE.

And modify your code for Link to action as

ls_fieldcat-colid = 'ACT_ICON'.

ls_fieldcat-display_type = 'LA'.

ls_fieldcat-icon_src_ref = 'ACT_ICON'.

ls_fieldcat-width = '4'.

ls_fieldcat-h_align = 'C'.

ls_fieldcat-icon_first = 'X'.

ls_fieldcat-ENABLE_REF = 'ENABLE'.

In GET_OBJECTS.

When we want it to display it as a link we will set the value for 'ENABLE' as abap_true

and when we want to display it as check icon only we will set value as abap_false.

Let me know if this is what you looking for.