2007 Mar 08 8:10 AM
hallow
i wont to do a traffic light in alv
I DECLEARE LIKE BELOW AND ITS NOT WORKING WHAT I FORGET
AND IN SE 11 WHEN I PUT IN COMPONENET TYPE ICON-ID I HAVE ERORR ,
HOW I HAVE TO DECLARE THAT
THANKES
TYPES : BEGIN OF 2_itab,
tabnr TYPE hrtabnr,
<b>icon TYPE icon-id,</b>
END OF 2_itab.
DATA : teken_itab TYPE TABLE OF 2_itab,
wa_teken_itab LIKE LINE OF teken_itab.
AND IN MY FIELD CATALOG
WHEN 'ICON'.
it_fieldcat-col_pos = '1'.
it_fieldcat-fieldname = 'ICON'.
wa_fcat-key = 'X'.
wa_fcat-outputlen = '10'.
wa_fcat-fieldname = 'ICON'.
wa_fcat-seltext = 'Light'.
REGARDS
2007 Mar 08 8:21 AM
I hope you have include icon in the program
include <icon>.
In the fieldcatalog there is field called as icon use that.
Please reward if useful.
2007 Mar 08 8:21 AM
I hope you have include icon in the program
include <icon>.
In the fieldcatalog there is field called as icon use that.
Please reward if useful.
2007 Mar 08 8:24 AM
Hello,
U need to include the ICON porgram in ur report like this.
<b>INCLUDE ICON.</b>
Vasanth
2007 Mar 08 8:34 AM
hi vasanth
i do what u tell but i have a erorr ?
what with se11 how i declare icon their ? i try icon like icon-id but i have erorr .
regards
2007 Mar 08 8:38 AM
Hello Antonio.
Please have a look in thgis report
REPORT demo_dynpro_status_icons.
DATA value TYPE i VALUE 1.
DATA: status_icon TYPE icons-text,
icon_name(20) TYPE c,
icon_text(10) TYPE c.
CALL SCREEN 100.
MODULE set_icon OUTPUT.
SET PF-STATUS 'SCREEN_100'.
CASE value.
WHEN 1.
icon_name = 'ICON_GREEN_LIGHT'.
icon_text = text-003.
WHEN 2.
icon_name = 'ICON_YELLOW_LIGHT'.
icon_text = text-002.
WHEN 3.
icon_name = 'ICON_RED_LIGHT'.
icon_text = text-001.
ENDCASE.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_name
text = icon_text
info = 'Status'
add_stdinf = 'X'
IMPORTING
result = status_icon
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
CASE sy-subrc.
WHEN 1.
MESSAGE e888(sabapdocu) WITH text-004.
WHEN 2.
MESSAGE e888(sabapdocu) WITH text-005.
WHEN 3.
MESSAGE e888(sabapdocu) WITH text-006.
ENDCASE.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE change.
CASE value.
WHEN 1.
value = 2.
WHEN 2.
value = 3.
WHEN 3.
value = 1.
ENDCASE.
ENDMODULE.
REgards,
Vasanth
2007 Mar 08 8:45 AM
hi Vasanth M
but what about my structre in se 11 what i declare their
regards
2007 Mar 08 8:51 AM
Hello Antonio,
Use any of the dataelement to declare in Se11.
ICON_2 CHAR 000002 Icon for ALV/VL35
ICON_34 CHAR 000034 Temporary delivery status for picking waves with quick info
ICON_4 CHAR 000004 Temporary delivery status during wave creation
ICON_ASS CHAR 000004 Status of Assignment
ICON_B CHAR 000001 Icon suitable for pushbutton
ICON_C CHAR 000004 Menu Painter: Application toolbar constants
ICON_CHANGE CHAR 000132 Change block: Name of the icon to be chnaged
ICON_CHANGE_VZZBEPP CHAR 000004 Indicator for changing a flow
ICON_CLASS NUMC 000001 Icon class (system, special, ...)
ICON_D CHAR 000004 Icon in text fields (substitute display, alias)
ICON_F CHAR 000001 Icon suitable for function key
ICON_GROUP NUMC 000001 Icon group (message, function ...)
ICON_HERKT CHAR 000004 Material: QM active for Repetitive Manufacturing (Origin 13)
ICON_INT CHAR 000008 Icon internal format
ICON_JONLAEN CHAR 000004 Indicator for the type of manual change
ICON_L CHAR 000001 Locked icons
ICON_L2 CHAR 000004 Icon with output length 2
ICON_L4 CHAR 000004 Icon with output length 4
ICON_LEGS_DETERMINE CHAR 000004 Leg determination being executed
ICON_LIGHT CHAR 000132 Lights icon for the pull list
ICON_LOTAL CHAR 000030 Inspection lot(s) exist(s)
ICON_M CHAR 000001 Icon suitable for message
ICON_MEM NUMC 000002 Icon classification
ICON_NAME CHAR 000030 Icon name
ICON_NAME1 CHAR 000030 ICONNAME1
ICON_QPLOS_OK CHAR 000004 Status of inspection lot for version of a material
ICON_RLINV070 CHAR 000004 Status
ICON_S CHAR 000001 Icon suitable for status display
ICON_SEL_VAL CHAR 000132 Selection period or validity of the change status
ICON_SLRES CHAR 000030 Result of system check of Sanct. Party List of legal ctrl
ICON_SLREU CHAR 000030 Result of user decision of Sanct. Party List LC
ICON_SPEZ CHAR 000002 Special icon for ALV / VL35
ICON_STATUS_PLANNED CHAR 000004 Status 'planned' is set
ICON_STORNO CHAR 000030 Cancellation
ICON_T CHAR 000001 Icon suitable key word
ICON_TEXT CHAR 000132 Carrier field for icons
ICON_UML CHAR 000030 Stock transfer
ICON_VE CHAR 000004 Usage decision inspection lot
ICON_VT06_STATUS CHAR 000015 Symbol Representing Status of a Shipment Header
ICON_ZUSTD CHAR 000030 Status of batch
ICONASCII RAW 000001 Character code of icon in character set (SAPicon...)
ICONBUTTON CHAR 000075 PD-SCM: Button with dynamic icon
ICONEXP CHAR 000040 SDB: Icon to Toggle between Expanded and Collapsed Screens
ICONF CHAR 000001 Input confirmed by pressing SAVE key
ICONLENGTH INT1 000003 Icon: Output length
ICONNAME CHAR 000030 Name of an icon
ICONQUICK CHAR 000030 Quickinfo for an icon
ICONSHORT CHAR 000030 Description of an icon
ICONSUBST CHAR 000004 Icon: Replacement character
REgards,
Vasanth
2007 Mar 08 8:24 AM
hi you need to declare like this, then it will work
<b>TYPE-POOLS: ICON, SLIS.</b>
Dont forget to award points for helpful answers
2007 Mar 08 8:30 AM
hi rahul
i do like u tell but its not working
how i declere icon-id in se11 for the field catalog
regards
2007 Mar 08 8:36 AM
WA_FIELDCAT-ICON = 'X'.
add this statement in ur field cataog and check
in my program i have declared my field catalog like this
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-FIELDNAME = 'ICON'.
WA_FIELDCAT-SELTEXT_L = 'ICON'.
WA_FIELDCAT-ICON = 'X'.
WA_FIELDCAT-OUTPUTLEN = 8.
WA_FIELDCAT-TABNAME = 'IT_VBAK'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
2007 Mar 08 8:35 AM
TYPES : BEGIN OF 2_itab,
tabnr TYPE hrtabnr,
light,
END OF 2_itab.
ilayout-lights_fieldname = 'LIGHT'.
you have to pass the value 1,2 or 3 to the light filed of itab.
regards
shiba dutta
2007 Mar 08 8:37 AM
hi
good
follow this process
go to SE38
give BCALV* and press F4
you ll find out lots of example related to ALV traffic lite,test them one by one and use as per your requirement.
Thanks
mrutyun^
2007 Mar 08 8:49 AM
sorry if you want traffic light in alv this is the small code
data : begin of itab occurs 0,
name(5),
light,
end of itab.
data : ifieldcat type slis_t_fieldcat_alv,
wfieldcat type slis_fieldcat_alv,
ilayout type slis_layout_alv.
itab-name = 'ABC'.
itab-light = '1'.
append itab.
itab-name = 'ABC'.
itab-light = '2'.
append itab.
itab-name = 'ABC'.
itab-light = '3'.
append itab.
wfieldcat-fieldname = 'LIGHT'.
wfieldcat-seltext_l = 'light'.
wfieldcat-col_pos = 1.
append wfieldcat to ifieldcat.
wfieldcat-fieldname = 'NAME'.
wfieldcat-seltext_l = 'Name'.
wfieldcat-col_pos = 2.
append wfieldcat to ifieldcat.
ilayout-lights_fieldname = 'LIGHT'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
IS_LAYOUT = ilayout
IT_FIELDCAT = ifieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = itab
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
here no need for icons .
regards'
shiba dutta
2007 Mar 08 8:52 AM