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

Redlight in Table Control

Former Member
0 Likes
1,097

Hi Friends,

I want to display diffrent lights ( reg light icon or green or other) in table control column depends on some condition.

Can you please help me on this. Thanks in Advance.

Thanks & Regards,

Murali Krishna K

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
1,033

Hi,

look test-report DEMO_DYNPRO_STATUS_ICONS

and fm ICON_CREATE

A.

3 REPLIES 3
Read only

Former Member
0 Likes
1,033

hi,

you can use the FM 'ICON_CREATE'

Read only

andreas_mann3
Active Contributor
0 Likes
1,034

Hi,

look test-report DEMO_DYNPRO_STATUS_ICONS

and fm ICON_CREATE

A.

Read only

Former Member
0 Likes
1,033

. Create program in SE38 type module pool and Activated

2. Go to SE51 give the program name and screen number then Layout Editor in drags table control with wizard.

3. Start the Wizard give the table control name (TBCL)>click the continue>give the Internal table name >Continueàselect the filed(MATNR) or Fields>continue>continue>check the Scroll check box>continue>continue-->click the completed --> Save --> Activated.

4.Add the Status Icon into Table Control(drag the Icon into table contol ) and Change the Code for Status Icons Below

DATA: STA_ICON10 TYPE ICONS-TEXT,

ICON_NAME(20) TYPE C,

PROCESS BEFORE OUTPUT.

MODULE STATUS_0102.

Code:


MODULE STATUS_ICONS OUTPUT.
SELECT SINGLE *
FROM MARA
WHERE MATNR = TB_TABLE-MATNR.
IF SY-SUBRC <> 0.
ICON_NAME = 'ICON_LED_RED'.
ELSE.
ICON_NAME = 'ICON_LED_GREEN'.
ENDIF.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
NAME = ICON_NAME
INFO = 'STATUS'
ADD_STDINF = 'X'
IMPORTING
RESULT = STA_ICON10
EXCEPTIONS
ICON_NOT_FOUND = 1
OUTPUTFIELD_TOO_SHORT = 2
OTHERS = 3.
IF SY-SUBRC <> 0.

ENDIF.

ENDMODULE. " STATUS_ICONS OUTPUT

Message was edited by:

Durga Vinta