on 05-21-2009 5:48 AM
Hi All,
I'm using ALV grid for my report output. I'm building the fieldcatalog where i'm passing hotspot for a field. Which has output either yes/no.
Now i need the hand button to be displayed only for records with Yes,so that it can be drilled down.
For No hand symbol should nt come. Is there any way to control hotspot at record level.
Please help.
Thanks,
Bharathi
Hi,<BR>
<BR>
The following code is a template for your requirement:<BR>
<BR>
types: begin of t_data,<BR>
flg(3) type c,<BR>
sty type lvc_t_styl,<BR>
end of t_data,<BR>
t_tdata type table of t_data.<BR>
<BR>
DATA: i_fcat type LVC_T_FCAT,<BR>
s_fcat type lvc_s_fcat,<BR>
s_lay type lvc_s_layo,<BR>
s_sty type lvc_s_styl,<BR>
i_data type t_tdata,<BR>
s_data type t_data.<BR>
<BR>
s_lay-stylefname = 'STY'.<BR>
<BR>
s_fcat-FIELDNAME = 'FLG'.<BR>
APPEND s_fcat to i_fcat.<BR>
<BR>
CLEAR: s_data.<BR>
s_data-flg = 'Yes'.<BR>
s_sty-FIELDNAME = 'FLG'.<BR>
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.<BR>
insert s_sty into TABLE s_data-sty.<BR>
APPEND s_data to i_data.<BR>
<BR>
CLEAR: s_data.<BR>
s_data-flg = 'No'.<BR>
s_sty-FIELDNAME = 'FLG'.<BR>
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.<BR>
insert s_sty into TABLE s_data-sty.<BR>
APPEND s_data to i_data.<BR>
<BR>
CLEAR: s_data.<BR>
s_data-flg = 'No'.<BR>
s_sty-FIELDNAME = 'FLG'.<BR>
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.<BR>
insert s_sty into TABLE s_data-sty.<BR>
APPEND s_data to i_data.<BR>
<BR>
CLEAR: s_data.<BR>
s_data-flg = 'Yes'.<BR>
s_sty-FIELDNAME = 'FLG'.<BR>
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.<BR>
insert s_sty into TABLE s_data-sty.<BR>
APPEND s_data to i_data.<BR>
<BR>
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'<BR>
EXPORTING<BR>
I_INTERFACE_CHECK = ' '<BR>
I_BYPASSING_BUFFER =<BR>
I_BUFFER_ACTIVE =<BR>
I_CALLBACK_PROGRAM = ' '<BR>
I_CALLBACK_PF_STATUS_SET = ' '<BR>
I_CALLBACK_USER_COMMAND = ' '<BR>
I_CALLBACK_TOP_OF_PAGE = ' '<BR>
I_CALLBACK_HTML_TOP_OF_PAGE = ' '<BR>
I_CALLBACK_HTML_END_OF_LIST = ' '<BR>
I_STRUCTURE_NAME =<BR>
I_BACKGROUND_ID = ' '<BR>
I_GRID_TITLE =<BR>
I_GRID_SETTINGS =<BR>
IS_LAYOUT_LVC = s_lay<BR>
IT_FIELDCAT_LVC = i_fcat<BR>
IT_EXCLUDING =<BR>
IT_SPECIAL_GROUPS_LVC =<BR>
IT_SORT_LVC =<BR>
IT_FILTER_LVC =<BR>
IT_HYPERLINK =<BR>
IS_SEL_HIDE =<BR>
I_DEFAULT = 'X'<BR>
I_SAVE = ' '<BR>
IS_VARIANT =<BR>
IT_EVENTS =<BR>
IT_EVENT_EXIT =<BR>
IS_PRINT_LVC =<BR>
IS_REPREP_ID_LVC =<BR>
I_SCREEN_START_COLUMN = 0<BR>
I_SCREEN_START_LINE = 0<BR>
I_SCREEN_END_COLUMN = 0<BR>
I_SCREEN_END_LINE = 0<BR>
I_HTML_HEIGHT_TOP =<BR>
I_HTML_HEIGHT_END =<BR>
IT_EXCEPT_QINFO_LVC =<BR>
IR_SALV_FULLSCREEN_ADAPTER =<BR>
IMPORTING<BR>
E_EXIT_CAUSED_BY_CALLER =<BR>
ES_EXIT_CAUSED_BY_USER =<BR>
TABLES<BR>
T_OUTTAB = i_data<BR>
EXCEPTIONS<BR>
PROGRAM_ERROR = 1<BR>
OTHERS = 2<BR>
.<BR>
IF SY-SUBRC <> 0.<BR>
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO<BR>
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.<BR>
ENDIF.<BR>
<BR>
Thanks,<BR>
Kiruba.<BR>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this.
Whenever the No comes, u have restricted the output.
In the same way, change the fieldcatalog data for that corresponding field and refresh the grid.
Hope this helps you.
Regards,
Sharin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer to the link given below.
hope it helps.
Regards
Rajesh Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hotspot is possible at field leval in fieldcatalog...but at record leval I d'nt think.
Better u search in thread for hotspot.
Regards,
Naveen M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bharathi,
Controling the hotspot at record level is not possible as per my knowledge.
But if want to control the drill down of report. You can check the field value in the user command and add a condition for drill down.
i .e
if <field> = 'Yes'.
" code for drill down report.
endif.
Hope this helps you.
Regards,
Sachinkumar Mehta.
Edited by: Sachinkumar Mehta on May 21, 2009 7:08 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.