cancel
Showing results for 
Search instead for 
Did you mean: 

Adding icon to ALV Coulmn in powerlists (POWL)

Former Member
0 Kudos

Hi Experts,

I have one requirement in POWL. For one Column in ALV i need to add ICON.

Can any body help in this problem.

Regards,

Sri

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

you can use method GET_FIELD_CATALOG of Feeder class. you can set the various properties by changing paramter(C_FIELDCAT) values of type POWL_FIELDCAT_TTY.

It has structure of type POWL_FIELDCAT_STY and has field ICON_SRC. Set this value to add Icon.

I hope this will help you.

Thanks,

Chandra

Former Member
0 Kudos

Thx Chandra for promt reply,

I know your given field name. But i am not getting 100% clarity.

Let me explain what i have return in my progrm.

In FieldCatalog method:

*Comments

wa_fieldcat-colid = 'COMMENT'.

wa_fieldcat-colpos = '13'.

wa_fieldcat-col_visible = abap_true.

wa_fieldcat-enabled = abap_true.

wa_fieldcat-icon_src_ref = 'COMMENT'.

wa_fieldcat-header = 'Approver Comments'.

wa_fieldcat-allow_filter = abap_true.

wa_fieldcat-allow_sort = abap_true.

INSERT wa_fieldcat INTO TABLE it_fieldcat[].

can clarify in this one.

Advance thx for helping.

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Refer Class CL_MMPUR_UI_FEEDER_PO and method IF_POWL_FEEDER~GET_FIELD_CATALOG and get the related logic.

Once you are able to change the field catalog.

Use below code,

e_fieldcat_changed = ABAP_TRUE.

c_fieldcat [ ] = lt_fcat [ ].

c_fieldcat is the changing parameter of the method. I hope this will help you.

Thanks,

Chandra

Former Member
0 Kudos

Yes chandra i am doing that one also.

Please check my code any fileds are missed .

thx

ChandraMahajan
Active Contributor
0 Kudos

you need to use,

ls_fcat-icon_src = lv_icon.

ls_fcat-icon_first = c_true.

Please refer CL_MMPUR_UI_FEEDER_PO as mentioned earlier.

Thanks,

Chandra

Former Member
0 Kudos

Given class is not existed in my system.

Can you help me in other way.

Thanks ,

Sri

ChandraMahajan
Active Contributor
0 Kudos

It can be as below,

wa_fieldcat-colid = 'COMMENT'.

wa_fieldcat-colpos = '13'.

wa_fieldcat-col_visible = abap_true.

wa_fieldcat-enabled = abap_true.

wa_fieldcat-icon_src = 'ICON_CHANGE_TEXT'.

wa_fieldcat--icon_first = c_true.

wa_fieldcat-header = 'Approver Comments'.

wa_fieldcat-allow_filter = abap_true.

wa_fieldcat-allow_sort = abap_true.

INSERT wa_fieldcat INTO TABLE it_fieldcat[].

Former Member
0 Kudos

Thx Chandra,

I got something. Here i have one more query like:

Now it is showing ICON in my output. But the requirement is when i will click on that ICON it`s need to display Hiding Text.

Is it possible .

Thanks ,

Sri