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: 

how to print traffic lights in ALV reports

Former Member
0 Kudos

hi how to print traffic lights on selection screen in alv reports

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

go for

INCLUDE <icon>.

WRITE: /

'field1',

icon_led_green AS ICON.

regards,

pritam.

8 REPLIES 8

Former Member
0 Kudos

Hi,

Welcome To SDN!!.

try to search in the forum there are lot of theards are available for the same.

Refer one of the theard

https://forums.sdn.sap.com/click.jspa?searchID=13357074&messageID=5605332

Regards

Kiran Sure

Former Member
0 Kudos

HI,

check below code

TYPE-POOLS : icon.

types: BEGIN OF ty_display,

status TYPE icon-id,

bukrs TYPE bseg-bukrs,

gjahr TYPE bseg-gjahr,

monat TYPE monat,

work_order TYPE z_work_order,

glaccount TYPE saknr,

message TYPE string,

END OF ty_display.

data : it_display TYPE TABLE OF ty_display,

wa_display TYPE ty_display.

WRITE icon_led_green AS ICON TO wa_display-status.

wa_display-gjahr = p_year.

wa_display-bukrs = p_cc.

wa_display-monat = p_period.

wa_display-work_order = v_aufnr.

wa_display-glaccount = wa_bseg-hkont.

APPEND wa_display TO it_display.

WRITE icon_led_red AS ICON TO wa_display-status.

wa_display-gjahr = p_year.

wa_display-bukrs = p_cc.

wa_display-monat = p_period.

wa_display-work_order = v_aufnr.

wa_display-glaccount = wa_bseg-hkont.

wa_display-message = text-010.

APPEND wa_display TO it_display.

change the icon color based on your requirement and append it to the internal table which you have to display in ALV.

reward points if it is helpful.

Regards,

Srilatha

0 Kudos

Hi

Thnks for ur Reply

0 Kudos

in MSKU,MSEG,MBEW,KNMT,MAKT

for the above tables i want to common matnr valu plzzzzzzzzzzzzz

former_member212653
Active Contributor
0 Kudos

Check out this code:

Before executing got to the following path:

Go to ->Text Elements ->Selection Texts

now for P_VBELN add "@0A@ Sales Order with Errors"


report ztest.

PARAMETERS: p_vbeln LIKE vbak-vbeln.


Now test it, the icon will display at selection screen.

Former Member
0 Kudos

Hi surendra,

We already have the answer to this in sdn..........

[]

Reward if useful

Best of luck,

Bhumika

Former Member
0 Kudos

hi,

go for

INCLUDE <icon>.

WRITE: /

'field1',

icon_led_green AS ICON.

regards,

pritam.

Former Member
0 Kudos

in MSKU,MSEG,MBEW,KNMT,MAKT

for the above tables i want to common matnr valu plzzzzzzzzzzzzz