Display icons in Network ui element
Hello everybody!
Im trying to display some hierarchies in a Network ui element. Generally, this works fine, but I'm not able to display icons with the elements inside the applet. The examples in the JNet/JGantt Developer Documentation use <icon/>-tags with the path to a gif file in the Type Repository section like this
<type name="SomeTypeName" inherits="SomeBaseTypeName">
<icon space="5">apps/orgchart/chief.gif</icon>
</type>
and the Type Repository documentation tells me to
Specify the relative address of the URL in relation to the code base of JNet.jar
(a file in your own JAR. file: apps/slm/icon.gif, for example). If
the relative path starts with apps, JNet automatically adds the
missing com/sap/jnet. We recommend that you use the relative path
wherever possible, because you can store the icon graphics in the same directory
in Perforce as the type repository.
But how would I determine the relative address of my icon files stored in my web dynpros src/mimes/components/<component name>-folder inside my WebDynpro jar/ear/whatever in relation to the code base of the JNet.jar which - I guess - would reside inside the WebDynpro runtime or somewhere else on the server, but not inside my own jar ? Or am I wrong about this ?
Thanks a lot
Michael
Hi Christian!
That's what I tried in the first place. The result is something like
/usr/sap/XXX/J02/j2ee/cluster/apps/myCompany.com/my~webdynproapp/servlet_jsp/webdynpro/resources/myCompany.com/my~webdynproapp/root/Components/package.path.to.my.component/imagename.gif
but the applet does not find the image files. Since the JNet documentation says to specify the relative path from the JNet.jar code base, I'd have to find out where that is and calculate the relative path, but possibly this will only work inside a single jar (which I don't have since the JNet.jar is somewhere among the portal WebDynpro runtime components, I guess).
Preferrably, I'd like to have a look at a working example using the Network ui component with external icons inside a java WebDynpro. Propably someone has done that before...
Thanks
Michael
Similar Messages
-
My application has a need for the Network UI Element. We've been able to get the element initialized however I don't know how to access the element.
For example, I assigned an action to the NodeSelected, but when I select a node, the method is not called.
Also, once the user changes the layout, how do I get the results so I can write them back to the xml file?
Any help woule be appreciated. A tutorial link for the Network element would be ideal.
Thanks.I've made some progress with this (it's back in scope) however now I am having a problem that with the Network element on the screen, my page "freezes" on reload.
My setup is like this:
wdContext
--> DataSourceNode (1:1)
--> DataSource (type Resource)
The DataSource node has a supply function named supplyDataSource. In this function I connect to the xml document and create the resource from the input stream. This works fine, the chart is displayed.
However now when I click on a button (which displays a popup window for search) the chart updates, but my window never opens, I just get the "loading" animated icon, but no window.
Any ideas? If there is additional information needed, please let me know.
Thanks. -
How to display ICONS in normal report without using icons table
Hi Friends,
I have to display icons(traffic lights) in a normal report.
Can we do that without using icons table?
If yes, please let me know how?
Thanks,Hi Pagidala,
Go to txcode - ABAPDOCU and in that expand BC-ABAP Programming->ABAP User Dialog->Screens->complex screen elements->status icons on Screens.
In this you can see sample code which may help you.
Cheers!! -
Display Icon/Image instead of Role name in top level navigation
Hi,
I want to display a image / icon instead of role name for a particular role. Can you please tell me how to achieve this ?
Thanks,
VPHi,
the thread is just for the background image (for all elements).
if you want to display icons instead of role names, you have to create your custom top level navigation using the
navigation taglib from SAP. There are lots of examples. make a blog search for Mr "Kannengiesser" from SAP.
In case you are using already an EHPx in your EP 7.0 the AJAX framework might have this feature.
Regards,
Kai -
I've already seen some questions on this forum about displaying icons but in ALV Table.I have data in ALV display and user status as icon but when i select a row i need to display all row details in another view but for user status field its not showing in icon..coming in i/p field.So how to display this field as icon.I tried to change data element as icon...but its not working.
Thanks
KiranHi Kiran,
Instead of I/P element use IMAGE ui element and check.
Cheers,
Kris. -
My iMac will not display my wireless networks, any suggestions?
I have 3 wireless netowrks in my house. My iMac will only display the one that is for my home automation system and it is not connected to the internet. Any suggestions on this? When I click the wireless icon at the top it only shows 1 network, it won't display my other network or my neighbours networks. When I try to add one of the other networks in my house, it will not find them.
Wireless Diagnostics - About
Also try turning off Bluetooth -
How do I add the Displays icon to the Menu Bar?
In prior OS on my iMac, I was able to add the Display icon to the Menu Bar, making it a quick fix to adjust the resolution. That option no longer appears in the Display section of System Preferences. I am using multiple displays. Could that make any difference? Any suggestions?
http://displaymenu.milchimgemuesefach.de/about.html
-
How to display icon (like green or red circle similar to signal light) in ALV Report
Hi,
just create a separate col in alv and in the field catalog assign the property lights .
and refer to the wiki link
[http://wiki.sdn.sap.com/wiki/display/Snippets/ALVGriddisplaywithLights]
Hope this resolves the issue !
Best of Luck !!
Regards,
Ravi Aswani -
I want to display icons in ALV
Hi friends,
I want to display icon indicators in ALV ???
can anybody tell me ??/
Thanks...Hi sturdy,
this code will help u...copy paste and run...
*& Report ZFI_TEST *
REPORT ZFI_ICON_TEST MESSAGE-ID zz .
*& TABLES DECLARATION *
TABLES: vbak.
*& TYPE POOLS DECLARATION *
TYPE-POOLS: slis.
*& INTERNAL TABLE DECLARATION *
DATA: BEGIN OF itab OCCURS 0,
icon TYPE icon-id, "itab-icon = '@08@' -> Green ; '@09@' -> Yellow ; '@0A@' -> Red
vbeln LIKE vbak-vbeln,
audat LIKE vbak-audat,
vbtyp LIKE vbak-vbtyp,
auart LIKE vbak-auart,
augru LIKE vbak-augru,
netwr LIKE vbak-netwr,
waerk LIKE vbak-waerk,
END OF itab.
*INTERNAL TABLE FOR FIELD CATALOG
DATA: wa_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv.
IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
WITH HEADER LINE,
*INTERNAL TABLE FOR EVENTS
DATA: it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event,
*INTERNAL TABLE FOR SORTING
it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv,
*INTERNAL TABLE FOR LAYOUT
wa_layout TYPE slis_layout_alv.
*& VARIABLE DECLARATION *
DATA : v_repid TYPE sy-repid,
v_pagno(4) TYPE n,
v_date(8) TYPE c.
*& CONSTANTS *
CONSTANTS: c_x TYPE c VALUE 'X'.
*& SELECTION SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_vbtyp FOR vbak-vbtyp DEFAULT 'C'.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-003.
PARAMETERS: p_list RADIOBUTTON GROUP rad1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-004.
PARAMETERS: p_grid RADIOBUTTON GROUP rad1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN.
PERFORM validate_screen.
*& START OF SELECTION *
START-OF-SELECTION.
CLEAR: itab, itab[].
V_REPID = SY-REPID.
PERFORM get_data.
PERFORM display_data.
*& END OF SELECTION *
END-OF-SELECTION.
*--DO ALV Process
v_repid = sy-repid.
*--Sort the Output Fields
PERFORM sort_fields.
*--Build Field catalog for the Output fields
PERFORM BUILD_FIELDCAT.
*--Set the Layout for ALV
PERFORM set_layout.
*& Form GET_DATA
text
TO GET THE DATA FROM TABLES INTO ITAB
FORM get_data .
SELECT vbeln
audat
vbtyp
auart
augru
netwr
waerk
INTO CORRESPONDING FIELDS OF TABLE itab
FROM vbak
WHERE vbeln IN s_vbeln AND
audat > '04.04.2005'
AND netwr > 0.
LOOP AT itab.
IF itab-netwr < 10000.
itab-icon = '@08@'.
ELSEIF itab-netwr > 10000 AND itab-netwr < 100000.
itab-icon = '@09@'.
ELSEIF itab-netwr > 100000.
itab-icon = '@0A@'.
ENDIF.
MODIFY itab INDEX sy-tabix.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form sort_fields
FORM sort_fields .
CLEAR wa_sort.
wa_sort-fieldname = 'VBTYP'.
wa_sort-spos = '1'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'NETWR'.
wa_sort-spos = '2'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO it_sort.
ENDFORM. " sort_fields
*& Form set_layout
FORM set_layout .
IF p_list = c_x .
wa_layout-window_titlebar = 'LIST DISPLAY'(016).
wa_layout-zebra = 'X'.
*-- ALV LIST DISPLAY
PERFORM list_display TABLES itab.
*-- ALV GRID DISPLAY
ELSEIF p_grid = c_x.
wa_layout-window_titlebar = 'GRID DISPLAY'(017).
wa_layout-zebra = 'X'.
PERFORM grid_display TABLES itab.
ENDIF.
ENDFORM. " set_layout
*& Form list_display
FORM list_display TABLES p_itab .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = wa_layout
it_fieldcat = it_fieldcat[]
it_sort = it_sort[]
i_save = 'U'
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.
ENDFORM. " list_display
*& Form GRID_DISPLAY
FORM grid_display TABLES p_itab .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = wa_layout
it_fieldcat = it_fieldcat[]
it_sort = it_sort[]
it_events = it_event
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.
ENDFORM. " GRID_DISPLAY
*& Form VALIDATE_SCREEN
text
--> p1 text
<-- p2 text
FORM validate_screen .
DATA: lv_vbeln LIKE vbak-vbeln.
IF NOT s_vbeln IS INITIAL.
SELECT vbeln
INTO lv_vbeln
UP TO 1 ROWS
FROM vbak
WHERE vbeln IN s_vbeln.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'INVALID SALES DOC'.
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SCREEN
*& Form display_data
text
--> p1 text
<-- p2 text
FORM display_data .
DEFINE m_fieldcat.
add 1 to wa_fieldcat-col_pos.
wa_fieldcat-fieldname = &1.
wa_fieldcat-ref_tabname = 'VBAK'.
wa_fieldcat-do_sum = &2.
wa_fieldcat-cfieldname = &3.
append wa_fieldcat to it_fieldcat.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
m_fieldcat 'ICON' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'AUDAT' '' ''.
m_fieldcat 'VBTYP' '' ''.
m_fieldcat 'AUART' '' ''.
m_fieldcat 'AUGRU' '' ''.
m_fieldcat 'NETWR' 'C' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
ENDFORM. " display_data[/code] -
Can we display ICONS in ALV list?
Hi,
Is it possible to display icons (ICON_GREEN_LIGHT) in the ALV list using the function module REUSE_ALV_LIST_DISPLAY.
Is there any possibility of displaying a list using object oriented ALV?
Thanks and Regards,
Lakshmi.Hi Lakshmi,
Just check this once.
REPORT Zxxx MESSAGE-ID ZZ .
*& TABLES DECLARATION *
TABLES: VBAK.
*& TYPE POOLS DECLARATION *
TYPE-POOLS: SLIS.
*& INTERNAL TABLE DECLARATION *
DATA: BEGIN OF ITAB OCCURS 0,
ICON TYPE ICON-ID,
VBELN LIKE VBAK-VBELN,
AUDAT LIKE VBAK-AUDAT,
VBTYP LIKE VBAK-VBTYP,
AUART LIKE VBAK-AUART,
AUGRU LIKE VBAK-AUGRU,
NETWR LIKE VBAK-NETWR,
WAERK LIKE VBAK-WAERK,
END OF ITAB.
*INTERNAL TABLE FOR FIELD CATALOG
DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
WITH HEADER LINE,
*INTERNAL TABLE FOR EVENTS
DATA: IT_EVENT TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT,
*INTERNAL TABLE FOR SORTING
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
*INTERNAL TABLE FOR LAYOUT
WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
*& VARIABLE DECLARATION *
DATA : V_REPID TYPE SY-REPID,
V_PAGNO(4) TYPE N,
V_DATE(8) TYPE C.
*& CONSTANTS *
CONSTANTS: C_X TYPE C VALUE 'X'.
*& SELECTION SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
S_VBTYP FOR VBAK-VBTYP DEFAULT 'C'.
SELECTION-SCREEN: END OF BLOCK B1.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) TEXT-003.
PARAMETERS: P_LIST RADIOBUTTON GROUP RAD1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) TEXT-004.
PARAMETERS: P_GRID RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN: END OF BLOCK B2.
AT SELECTION-SCREEN.
PERFORM VALIDATE_SCREEN.
*& START OF SELECTION *
START-OF-SELECTION.
CLEAR: ITAB, ITAB[].
V_REPID = SY-REPID.
PERFORM GET_DATA.
PERFORM DISPLAY_DATA.
*& END OF SELECTION *
END-OF-SELECTION.
*--DO ALV Process
V_REPID = SY-REPID.
*--Sort the Output Fields
PERFORM SORT_FIELDS.
*--Build Field catalog for the Output fields
PERFORM BUILD_FIELDCAT.
*--Set the Layout for ALV
PERFORM SET_LAYOUT.
*& Form GET_DATA
text
TO GET THE DATA FROM TABLES INTO ITAB
FORM GET_DATA .
SELECT VBELN
AUDAT
VBTYP
AUART
AUGRU
NETWR
WAERK
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM VBAK
WHERE VBELN IN S_VBELN AND
AUDAT > '04.04.2005'
AND NETWR > 0.
LOOP AT ITAB.
IF ITAB-NETWR < 10000.
ITAB-ICON = '@08@'.
ELSEIF ITAB-NETWR > 10000 AND ITAB-NETWR < 100000.
ITAB-ICON = '@09@'.
ELSEIF ITAB-NETWR > 100000.
ITAB-ICON = '@0A@'.
ENDIF.
MODIFY ITAB INDEX SY-TABIX.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form sort_fields
FORM SORT_FIELDS .
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'VBTYP'.
WA_SORT-SPOS = '1'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'NETWR'.
WA_SORT-SPOS = '2'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
ENDFORM. " sort_fields
*& Form build_fieldcat
*FORM BUILD_FIELDCAT .
IT_FIELDCAT-COL_POS = '1'.
IT_FIELDCAT-FIELDNAME = 'ICON'.
IT_FIELDCAT-KEY = 'X'.
IT_FIELDCAT-OUTPUTLEN = '10'.
IT_FIELDCAT-SELTEXT_L = 'LIGHT'.
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '2'.
IT_FIELDCAT-FIELDNAME = 'VBELN'.
IT_FIELDCAT-KEY = 'X'.
IT_FIELDCAT-OUTPUTLEN = '10'.
IT_FIELDCAT-SELTEXT_L = 'SALES DOC NUMBER'(009).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '3'.
IT_FIELDCAT-FIELDNAME = 'AUDAT'.
IT_FIELDCAT-KEY = 'X'.
IT_FIELDCAT-OUTPUTLEN = '4'.
IT_FIELDCAT-SELTEXT_L = 'DOCUMENT DATE'(010).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '4'.
IT_FIELDCAT-FIELDNAME = 'VBTYP'.
IT_FIELDCAT-KEY = 'X'.
IT_FIELDCAT-OUTPUTLEN = '4'.
IT_FIELDCAT-SELTEXT_L = 'CATEGORY'(011).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '5'.
IT_FIELDCAT-FIELDNAME = 'AUART'.
IT_FIELDCAT-OUTPUTLEN = '4'.
IT_FIELDCAT-SELTEXT_L = 'DOCUMENT TYPE'(012).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '6'.
IT_FIELDCAT-FIELDNAME = 'AUGRU'.
IT_FIELDCAT-OUTPUTLEN = '12'.
IT_FIELDCAT-SELTEXT_L = 'Order reason'(013).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '7'.
IT_FIELDCAT-FIELDNAME = 'NETWR'.
IT_FIELDCAT-OUTPUTLEN = '12'.
IT_FIELDCAT-SELTEXT_L = 'NET VALUE'(014).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
IT_FIELDCAT-COL_POS = '8'.
IT_FIELDCAT-FIELDNAME = 'WAERK'.
IT_FIELDCAT-OUTPUTLEN = '12'.
IT_FIELDCAT-SELTEXT_L = 'SD DOC CURR'(015).
APPEND IT_FIELDCAT.
CLEAR IT_FIELDCAT.
*ENDFORM. " build_fieldcat
*& Form set_layout
FORM SET_LAYOUT .
IF P_LIST = C_X .
WA_LAYOUT-WINDOW_TITLEBAR = 'LIST DISPLAY'(016).
WA_LAYOUT-ZEBRA = 'X'.
*-- ALV LIST DISPLAY
PERFORM LIST_DISPLAY TABLES ITAB.
*-- ALV GRID DISPLAY
ELSEIF P_GRID = C_X.
WA_LAYOUT-WINDOW_TITLEBAR = 'GRID DISPLAY'(017).
WA_LAYOUT-ZEBRA = 'X'.
PERFORM GRID_DISPLAY TABLES ITAB.
ENDIF.
ENDFORM. " set_layout
*& Form list_display
FORM LIST_DISPLAY TABLES P_ITAB .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_SORT = IT_SORT[]
I_SAVE = 'U'
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.
ENDFORM. " list_display
*& Form GRID_DISPLAY
FORM GRID_DISPLAY TABLES P_ITAB .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_SORT = IT_SORT[]
IT_EVENTS = IT_EVENT
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.
ENDFORM. " GRID_DISPLAY
*& Form VALIDATE_SCREEN
text
--> p1 text
<-- p2 text
FORM VALIDATE_SCREEN .
DATA: LV_VBELN LIKE VBAK-VBELN.
IF NOT S_VBELN IS INITIAL.
SELECT VBELN
INTO LV_VBELN
UP TO 1 ROWS
FROM VBAK
WHERE VBELN IN S_VBELN.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'INVALID SALES DOC'.
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SCREEN
*& Form display_data
text
--> p1 text
<-- p2 text
FORM DISPLAY_DATA .
DEFINE M_FIELDCAT.
ADD 1 TO WA_FIELDCAT-COL_POS.
WA_FIELDCAT-FIELDNAME = &1.
WA_FIELDCAT-REF_TABNAME = 'VBAK'.
WA_FIELDCAT-DO_SUM = &2.
WA_FIELDCAT-CFIELDNAME = &3.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
m_fieldcat 'ICON' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'AUDAT' '' ''.
m_fieldcat 'VBTYP' '' ''.
m_fieldcat 'AUART' '' ''.
m_fieldcat 'AUGRU' '' ''.
m_fieldcat 'NETWR' 'C' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
ENDFORM. " display_data
hope it helps u
regards
laxmi -
Hi experts,
Iam trying to display icons in one of the columns in my ALV grid.
I have created ITAB like this.
type-pools : icon,slis.
data: begin of gt_dtl occurs 0,
range(4).
include structure zbitrdtl.
data: field_style type lvc_t_styl.
data: end of gt_dtl.
And iam trying to pass ICON like this.
loop at gt_dtl.
gt_dtl-range = icon_green_light.
modify gt_dtl.
endloop.
And passing into fieldcat.
ls_fcat-fieldname = 'Range'.
ls_fcat-tabname = 'GT_DTL'.
ls_fcat-scrtext_l = 'Range'.
ls_fcat-outputlen = '10'.
ls_fcat-col_pos = 8.
ls_fcat-icon = 'X'.
append ls_fcat to gt_fieldcat.
clear ls_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_buffer_active = 'X'
i_structure_name = 'ZBITRDTL'
i_client_never_display = 'X'
i_internal_tabname = 'GT_DTL'
changing
ct_fieldcat = gt_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
<b>Iam able to see the ICON in the ITAB in debugging mode.</b>
But iam not getting ICON in my output of ALV.
where iam doing wrong?
Rewared guaranteed,
thanks
kakiHi...
copy paste the following code. And check out hte variation.
Hope this will be helpful
Thank-You.
vinsee
REPORT zrwty_wty_errors .
TYPE
TYPE-POOLS: slis, icon.
Tables
Tables : pnwtyh,
balhdr.
Data Decleration
DATA: text(1000), lv_clmno(40).
Internal table for messages ( Datewise )
DATA: BEGIN OF it_balhdr OCCURS 0,
lognumber TYPE balhdr-lognumber,
log_handle TYPE balhdr-log_handle,
END OF it_balhdr.
Internal table for PNWTYH
DATA: BEGIN OF it_pnwtyh OCCURS 0,
clmno TYPE pnwtyh-clmno,
log_message TYPE pnwtyh-log_message,
END OF it_pnwtyh.
Internal table to fetch the actual text messages
DATA: it_message LIKE balm OCCURS 0 WITH HEADER LINE.
Internal Table to handle the ALV o/p
DATA: BEGIN OF it_grid OCCURS 0,
clmno TYPE pnwtyh-clmno,
chgdat TYPE dats,
icon TYPE icon-id," BALIMSGTY
text(1000),
END OF it_grid.
Field Catelog and layout Decleration
DATA: it_fieldcat TYPE lvc_t_fcat,
wa_fieldcat TYPE lvc_s_fcat OCCURS 0 WITH HEADER LINE,
x_fieldcat TYPE lvc_s_fcat OCCURS 0 WITH HEADER LINE.
DATA: x_layout TYPE lvc_s_layo.
DATA: lv_repid LIKE sy-repid.
have hotspot for a PO.
DATA: s_fieldcat LIKE LINE OF it_fieldcat.
s_fieldcat-hotspot = 'X'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
SELECT-OPTIONS:
s_aldate FOR balhdr-aldate.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETERS : r1 RADIOBUTTON GROUP rg DEFAULT 'X'.
PARAMETERS : r2 RADIOBUTTON GROUP rg .
SELECTION-SCREEN END OF BLOCK b2.
if s_aldate-high = '00000000'.
s_aldate-high = s_aldate-low.
endif.
FM to fetcht he messg no. based on date
CALL FUNCTION 'APPL_LOG_READ_DB'
EXPORTING
object = 'WTY'
subobject = 'CLAIMMSG'
EXTERNAL_NUMBER = ' '
date_from = s_aldate-low
date_to = s_aldate-high
TIME_FROM = '000000'
TIME_TO = '240000'
log_class = '1'
PROGRAM_NAME = '*'
TRANSACTION_CODE = '*'
USER_ID = ' '
MODE = '+'
PUT_INTO_MEMORY = ' '
IMPORTING
NUMBER_OF_LOGS =
TABLES
HEADER_DATA =
HEADER_PARAMETERS =
messages = it_message
MESSAGE_PARAMETERS =
CONTEXTS =
data: zlines type i.
describe table it_message lines zlines.
if it_message[] is initial.
message S398(00) with 'No data found.'.
exit.
endif.
IF radio button ERROR only is selected, Delete others
IF r2 = 'X' .
DELETE it_message WHERE msgty <> 'E'.
ENDIF.
fetch log_handle from BALHDR
SELECT lognumber log_handle FROM balhdr INTO TABLE it_balhdr FOR ALL
ENTRIES IN
it_message WHERE lognumber = it_message-lognumber.
Based on log _handle fetch claim no from PNWTYH
SELECT DISTINCT clmno log_message FROM pnwtyh INTO TABLE it_pnwtyh FOR
ALL ENTRIES IN it_balhdr WHERE log_message = it_balhdr-log_handle.
LOOP AT it_message.
READ TABLE it_balhdr WITH KEY lognumber = it_message-lognumber.
IF sy-subrc = 0.
READ TABLE it_pnwtyh WITH KEY log_message = it_balhdr-log_handle.
IF sy-subrc = 0.
lv_clmno = it_pnwtyh-clmno.
ENDIF.
FM to fetch the actual text message
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_message-msgid
lang = 'EN'
no = it_message-msgno
v1 = it_message-msgv1
v2 = it_message-msgv2
v3 = it_message-msgv3
v4 = it_message-msgv4
IMPORTING
msg = text
EXCEPTIONS
not_found = 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.
it_grid-clmno = lv_clmno.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_grid-clmno
IMPORTING
output = it_grid-clmno.
Local Variable to handle Date Data
DATA: l_tmstp(30) TYPE c,
l_date TYPE sydatum.
WRITE it_message-time_stmp TO l_tmstp LEFT-JUSTIFIED DECIMALS 0
NO-GROUPING.
l_date = l_tmstp(8).
it_grid-chgdat = l_date.
it_grid-text = text.
IF it_message-msgty = 'E'.
it_grid-icon = '@0A@'.
ELSEIF it_message-msgty <> 'E' AND it_message-msgty <> 'S'.
it_grid-icon = '@09@'.
ENDIF.
APPEND it_grid.
CLEAR it_grid.
CLEAR: lv_clmno, it_message, text.
ENDIF.
ENDLOOP.
PERFORM display_alv.
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
PERFORM build_field_catalog.
PERFORM build_layout.
Assign program name to variable
lv_repid = sy-repid.
Call the ALV Grid FM for Display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = lv_repid
i_grid_title = 'Wty Errors'
is_layout_lvc = x_layout
it_fieldcat_lvc = it_fieldcat
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
TABLES
t_outtab = it_grid[]
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.
ENDFORM. " display_alv
*& Form build_field_catalog
text
--> p1 text
<-- p2 text
FORM build_field_catalog .
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZWTY_ERR'
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'ICON'.
wa_fieldcat-seltext_l = 'Mssg Type'.
wa_fieldcat-seltext = 'Mssg Type'.
wa_fieldcat-icon = 'X'.
wa_fieldcat-SCRTEXT_L = 'Mssg Type'.
wa_fieldcat-outputlen = 8.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'ICON' .
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext icon
SCRTEXT_L
WHERE
fieldname = 'ICON' .
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'CHGDAT'.
wa_fieldcat-seltext_l = 'Chg Date'.
wa_fieldcat-seltext = 'Chg Date'.
wa_fieldcat-SCRTEXT_L = 'Chg Date'.
wa_fieldcat-outputlen = 10.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'CHGDAT' .
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext SCRTEXT_L
WHERE
fieldname = 'CHGDAT' .
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 4.
wa_fieldcat-fieldname = 'TEXT'.
wa_fieldcat-seltext_l = 'Message Text'.
wa_fieldcat-seltext = 'Message Text'.
wa_fieldcat-SCRTEXT_L = 'Chg Date'.
wa_fieldcat-outputlen = 100.
wa_fieldcat-tabname = 'IT_GRID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext_l WHERE
fieldname = 'TEXT'.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING seltext SCRTEXT_L WHERE
fieldname = 'TEXT'.
CLEAR wa_fieldcat.
MODIFY it_fieldcat FROM s_fieldcat TRANSPORTING hotspot
WHERE fieldname = 'CLMNO'.
ENDFORM. " build_field_catalog
*& Form Build_layout
text
--> p1 text
<-- p2 text
FORM build_layout .
CLEAR x_layout.
x_layout-colwidth_optimize = 'X'.
x_layout-zebra = 'X'.
ENDFORM. " Build_layout
FORM display_detail *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF ucomm = '&IC1'.
READ TABLE it_grid INDEX selfield-tabindex.
IF sy-subrc EQ 0.
CALL 'WTY' FOR SELECTED CLAIM
CALL FUNCTION 'ZWTY_CLAIM_DISPLAY'
EXPORTING
i_clmno = it_grid-clmno
iv_from_doc = 'J'
EXCEPTIONS
not_found = 1
authority_failed = 2
no_claimtype = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "user_command -
During update my ATV2 displayed icon to connect to iTunes. Now I have nothing -- can't even get to menu to do restart and ATV2 doesn't show up in iTunes menu to do restart from there. Help!
The update didn't apply correctly.
Did you follow the steps exactly in order to restore? disconnect all cables, open iTunes, then connect micro usb
Apple TV (2nd and 3rd generation): Restoring your Apple TV
Make sure to connect directly to computer, not a keyboard port or USB hub. Try a different cable. -
I am new to forms 9i. I want to display icons in my menu toolbar.
Please send me the solution to display icons.
Thanks for ur help.We tried to follow the instructions on the webicons.pdf file but we still can't see our icon in the forms builder or on our local machine webserver. We created a jar file but now we don't know how to reference the jpg in the properties of the button on our form. What we are trying to do is create a down arrow button to envoke a LOV. Is there an easier way?
-
Event handling in Network UI element in Webdynpro
Hi ,
I am developing a hierarchial graph using Network UI element.I want to incorporate event handling so that the graph will respond to user actions like on double clicking a node an URL will be opened.I can notproceed with the event handling.
Can anyone tell me the procedure to do this from webdynpro java.
Regards
NayeemHi Nayeem,
The Network UI element has lots of events defined for it which can be handled to get the desired functionality.
Go to the View in which you have added the Network Element, select the Element and go to the
properties tab.
Under events , you can see a list of events defined for this UI element.
Select the event you wish to handle and press the Create button which gets visible once
an event say onNodeSelected is selected
You can then give a name to the action say UserClicked and save it .
In the properties tab of the UI element , the action will be registed against the event .
Now select the event again and press the go button.
It will redirect you to the java editor of the view where in you can place your event handling logic.
Alternatively, if you have created the UI element dynamically then you can add the event to the UI element by using the following code
IWDNetwork network = (IWDNetwork)view.createElement(IWDNetwork.class);
network.setOnNodeSelected(/*Your Action handler already defined in the View*/);
Regards,
Ashish -
Itunes on Windows 7 only displaying icons and pics? Text has disappeared?
Itunes on Windows 7 only displaying icons and pics? Text has disappeared? Library content is still there but all text details now missing
Same problem here! Driving me nuts that it is somehow "running" as shown in the task bar, but it is not accessible in any way.
Maybe you are looking for
-
Due to my laptop screen failing I have to return it to factory settings, can I reinstall adobe reader and air afterwards?
-
So I tried to update to the newest Itunes. It locked up my computer part way thru the install. Black screen, computer turned itself off. Now anytime i try to do anything with Itunes it shuts my computer down. I can start up fine in safe mode but
-
I don't understand it, but now it let me login that time to give more details. So, I don't know...this is very confusing to get an updated Version (8) and not have Norton Identity Safe. I've rebooted, run the Norton Live Update several times. Then, t
-
Populating dynamic internal table with data
Hi, I have an internal table with the data like the below profit lineId amount center s21 70 1000 s21 80 1200 s22 70 800 In the above internal table the number of distinct lineIDs will be va
-
Hi, Can you give me your integration expereince w.r.t XI for following scenario: Base idea is: File->RFC->Mail(Workflow) 1. File will come with CSF(Comma Separated Field) and having Mulitple HeaderData with Associated Line items. ex: H1........