Hide some cells while displaying ALV GRID !
Hi guyz!
Back with lill query,
While displaying ALV GRID using REUSE_ALV_GRID... FMs ,i need to hide
some cells by default, when the lists is generated.But those cells should
be availble to be displayed by the user from ALV layout settings.
Please advise
Thanks
jahan
Hi, Check for fm documentation.
Only relevant if layout parameter
LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set.
Complex type for modifying information displayed on the selection dialog box:
mode: 'R' = Only entries passed in internal table
IS_SEL_HIDE-T_ENTRIES are output on
the dialog box. Selection information
obtained by the list tool by reading the
selection screen again (only if the report
is called with selection screen) are
replaced by the entries passed.
'S' = The selection information obtained by the
list tool by reading the selection screen
of the calling report again, are modified
by the entries of table
IS_SEL_HIDE-T_ENTRIES.
t_entries: Table with selection information
t_entries-mode: 'A' = Display selection information of the current
table row on the information dialog box.
'D' = Do not display selection information of the
the Select option or of parameter SELNAME
on the dialog box.
t_entries-selname: (required only if t_entries-mode = 'D')
name of Select option or parameter
The following table fields are only required if t_entries-mode = 'A'. They contain the selection information to be added.
t_entries-field: DDIC field name of the field for which selection
information is to be displayed
t_entries-table: DDIC table name of t_entries-field.
t_entries-stext: Field description on the information dialog box.
If t_entries-field and t_entries-table were
filled, this text is taken from the DDIC.
t_entries-valuf: Selection condition from-value (external format)
t_entries-valut: Selection condition to-value (external format)
t_entries-sign0: (I)nclusive (E)xclusive
t_entries-optio: All values of the option field of the Select
option are allowed.
The remaining fields are used internally and are irrelevant to the caller.
aRs
Similar Messages
-
Create deep structure to disable some cells in Dynamic ALV GRID
Hi,
I want to disable some cells in a Dynamic ALV Grid before calling "SET_tABLE_Display" Method.
I check the BCALV_EDIT_02, where some cells are grayed out by assign the CL_GUI_ALV_GRID-MC_STYLE_DISABLED to the field name.
But I want the same using Field symbol.
I'm creating Dynamic table and dynamic structure based on the Dynamic field catalog.
Example: <FT_TAB> TYPE STANDARD TABLE,
<FS_TAB> TYPE ANY,
DATA: INT_TAB is my dynamic table values.
For the INT_TAB internal table, I created dynamic Structure and dynamic field symbol table.
LOOP AT INT_TAB.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <FS_TAB> TO <F_VALUE>
<F_VALUE> = INT_TAB-MATNR.
APPEND <FS_TAB> TO <FT_TAB>
"Here is the problem occurs, I want to grayed out the MATNR value based on some condition.
ENDLOOP.
I would like to set the 'MATNR' value to be grayed out by passing the CL_GUI_ALV_GRID-MC_STYLE_DISABLED.
and update into <FT_TAB>( <FT_TAB> structure will have 2 structures)
Finally the fieldsymbol should have two structure ( <F_TAB> = DYNAMIC STRUCTURE + LVC_S_STYLE )
Display alv grid by passing <FT_TAB> to set_table_display method.
Thanks in advance,
Kumar.Hi,
I am not sure whether I really understand your request. Let me try to help.
> Example: <FT_TAB> TYPE STANDARD TABLE,
> <FS_TAB> TYPE ANY,
>
> DATA: INT_TAB is my dynamic table values.
>
>
> LOOP AT INT_TAB.
> ASSIGN COMPONENT 'MATNR' OF STRUCTURE <FS_TAB> TO <F_VALUE>
> <F_VALUE> = INT_TAB-MATNR.
> APPEND <FS_TAB> TO <FT_TAB>
Here <FT_TAB> must already be assigned to some internal table with a given (dynamic) structure. Did this happen before this piece of code?
What I would do is to create a dynamic table (see documentation to CREATE DATA) with MATNR and the STYLE field (LVC_T_STYL). See the documentation for CREATE DATA - creation of internal tables. When collection the field descriptions for that internal table I would also build the field catalogue for the ALV.
Then assign <FT_TAB> to that newly created internal table, <FS_TAB> to a newly created structure (same as a table line).
Move the MATNR to component 1 (or component 'MATNR') of the table and fill the style table according to your needs. Then insert the <FS_TAB> into <FT_TAB>.
Finally call the ALV SET_TABLE... method with your dynamic table and your field catalogue.
Regards,
Gerd Rother -
Facing problem while downloading ALV grid Output into Excel
Hi Guys,
I am facing problem while downloading ALV grid Output into Excel.
It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
Can someone help me regarding this
thanks for your helpHi,
Open up Excel on your desktop. Goto Tools > Macro > Security.
Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
Was this your problem? Don't forget those points, either.
check with this wetther it is solved or not.
Regards,
sana. -
How to disable sorting for some columns in a ALV GRID?
Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
Can anybody help me. how to acieve this? Any code snippets will really be appreciated.Hi,
I have tried this but not completely successful. I think this can be done using the OOPS method.
DATA: it_event_exit TYPE slis_t_event_exit.
DATA: w_exit TYPE slis_event_exit.
w_exit-ucomm = '&ODN'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
w_exit-ucomm = '&OUP'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_top_of_page = 'ALV_TOP_OF_PAGE'
i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND' <- User command form
is_layout = wm_layout
it_fieldcat = wt_fieldcat
it_events = i_events
it_event_exit = it_event_exit <- Need to fill
it_sort = wt_sort
i_default = 'X'
Now you can capture this events in the user command
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
ENDIF.
ENDFORM. "user_command
In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
May be somebody else can give some help on this.
But this will work if you follow the oop method.
Please see this document for more info.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
Thanks
Vinod -
Reg. can we display alv grid using field groups (extracts)
Hi,
can we display alv grid using field groups (extracts). is this possible. i have to develop a blocked alv.
tnks
Yerukala SettyNo, you will need the data in an internal table to use ALV.
Cheers
Allan -
Problem in cell content of alv grid ...
hi all,
i want to get the cell content of alv grid in the handle method of event data_changed of cl_gui_alv_grid,
i using the following code ...
METHOD on_data_changed.
DATA : lv_value(30) TYPE c.
CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE
EXPORTING
I_ROW_ID = 3
I_TABIX =
I_FIELDNAME = 'cname' "" my column table
IMPORTING
E_VALUE = lv_value.
MESSAGE lv_value TYPE 'I'.
ENDMETHOD.
endclass.
but i cant get the value of cell content
Edited by: parashuram on Oct 21, 2011 3:49 PMTry this way
method handle_data_changed.
perform handle_data_changed using er_data_changed.
endmethod.
form handle_data_changed using p_data_changed type ref to
cl_alv_changed_data_protocol.
data: ls_mod_cell type lvc_s_modi,
lv_value_dni type lvc_value.
loop at p_data_changed->mt_mod_cells into ls_mod_cell.
call method p_data_changed->get_cell_value
exporting
i_row_id = ls_mod_cell-row_id
i_fieldname = 'FINI_SUST' <== Your field
importing
e_value = lv_value_dni .
endloop.
endform. -
hi,
i have two problems in displaying ALV grid output Using Oops.
1) How to modify the fieldcatalog after we getting a field catalog using general FM.
2) initialy it is displaying 13 fields but there are 63 fields .
eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count of displayed fileds are same . how can display 63 fields at a time .Hi,
You can chnage using below code:
loop at gt_fieldcat.
if <gt_fieldcat-field_name> = 'FIELDNAME'.
endif.
modify gt_fieldcat.
clear gt_fieldcat.
endloop.
Make sure that all the field should not have no_out = 'X' and tech = 'X'.
Thanks,
Sriram Ponna. -
Display ALV GRID Using Dynamic Internal Table
Hi all,
I try to display ALV Grid using Dynamic Internal Table, but when i activate my program, i get an error message "DYN_TABLE" is not type-compatible with formal parameter "IT_OUTTAB". ( DYN_TABLE is my Dynamic Itab).
Anybody can help me how to passing Dynamic Itab into ALV Grid ?? Of ALV Grid only accept static Itab ??
Thanks,Hi Vijay,
It's doesn't work, and make new error "Formal parameter "IT_OUTTAB[]" does not exist. However, the parameter "IT_OUTTAB" has a similar name."
Because the method is:
CALL METHOD <ref. var. to CL_GUI_ALV_GRID>->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE = <any type (ANY)>
I_STRUCTURE_NAME = <string of type DD02L-TABNAME>
IS_VARIANT = <structure of type DISVARIANT>
I_SAVE = <var. of type CHAR01>
I_DEFAULT = <var. of type CHAR01>
IS_LAYOUT = <structure of type LVC_S_LAYO>
IS_PRINT = <structure of type LVC_S_PRNT>
IT_SPECIAL_GROUPS = <internal table of type LVC_T_SGRP>
IT_TOOLBAR_EXCLUDING = <internal table of type UI_FUNCTIONS>
IT_HYPERLINK = <internal table of type LVC_T_HYPE>
IT_ALV_GRAPHICS = <internal table of type DTC_T_TC>
CHANGING
IT_OUTTAB = <internal table>
IT_FIELDCATALOG = <internal table of type LVC_T_FCAT>
IT_SORT = <internal table of type LVC_T_SORT>
IT_FILTER = <internal table of type LVC_T_FILT>
Thanks, -
Printing Selection-Screen while printing ALV Grid output display
Hi,
I have a requirement wherein I want to print the Selection Screen also while printing the output in simple ALV grid Display.
Currently when I print the ALV output report, only the header and the Body of the ALV is getting printed. But the requirement is that I also want to print Selection screen along with this.
If anyone has faced a similar situation, plz let me know what needs to be done in order to print the selection screen also while printing the ALV report output.
Rgds,
NitinHi,
You can use given function module to print your
selection screen
RS_REFRESH_FROM_SELECTOPTIONS
>This will get Current contents of selection screen
RS_LIST_SELECTION_TABLE
>This will Generates list according to values in selection table(RSPARAMS)
Sample
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = p_repid
TABLES
selection_table = it_int_tab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc EQ 0.
WRITE:1 'Selection Criteria'(i19),
/1 sy-uline(18),
/1 'Variant Name'(i21),
23 sy-slset.
*-- This function module lists the Selection Screen contents
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = p_repid
seltext = 'X'
newpage = space
TABLES
sel_tab = it_int_tab
EXCEPTIONS
sel_tab_empty = 1
OTHERS = 2.
Mark all helpful answers -
Display alv grids in selection screen based on the user event
Hi All,
I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
But i have 2 buttons in my selection screen 'Create' and 'change'.
When i click on create i need with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button the create alv grid is displaying down and change data is dispalying up.
I need only one alv grid at a time.Can anybody please let me know how can i do this.
Thanks,
TaraginiHello,
Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
through fieldcatalog (NO_OUT) parameter.
Thanks -
Calling smartform and displaying ALV grid in ABAP WEBDYNPRO
Hi all,
I am new to ABAP web dynpro.I ahve few custom reports which are simple ALV list reports which I now need to convert to ABAP web dynpro application .
For one particular report,based on the selection screen input,I need to display the ALV list and when I select the records from the ALV list,I need to call a smartform on clik of a push button.
My questions:
1. Im using 'REUSE_ALV_GRID_DISPLAY' FM to display the o/p in my report.Is there any similar FM in webdynpro ABAP which will display my list in ALV GRID in my web dynpro application??/
2. How to call a smartfrm in ALV grid in web dynpro??
Edited by: abap_1000 on Jan 9, 2011 6:09 PMHi,
You can search SDN, there are several posts available. Just to get some idea, you can check --
[Beginneru00B4s questions on WDA ALV;
[Reg ALV Display;
For clicking event on ALV --
[Reg Row Data fetching on click in ALV;
For ALV display on WDA --
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true]
Thanks.
Kumar Saurav. -
Problem while downloading ALV GRID Output to Local Spreadsheet(Excel) File.
Hi,
I am displaying output in ALV GRID. While downloading the output to Excel file using "Local File" option provided by ALV.
But while downloading the columns and their respective values are coming in single column vertially of excel file instead of horizontal.
e.g. Grid output is as follows.
F1 F2
V1 V2
(F represents Field Title, and V represent Value)
Downloaded Excel File content:-
F1
F2
V1
V2
Please help.Hi ,
Please use below FM :
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Documents and Settings\akshayr2403\Desktop\docs\rep.xls'
FILETYPE = 'WK1'
WRITE_FIELD_SEPARATOR = 'X'
tables
data_tab = it_vbak
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Also, if your problem still persist, please refer SAP's demo code on ALV "BCALV_FULLSCREEN_DEMO".
There are many sample codes available, what you need to do is just go to SE38 and put BCALV* and do F4.
I hope this will help you.
Regards,
Rahul Mahajan -
Hide/Remove Subtotal Icon in ALV Grid report output.
Hi,
Is ther a way to remove or hide the Subtotal icon in the ALV Grid report output?
Thanks & Regards,
Praveen.Hi,
You can add names of the buttons(which you want to hide) to internal table and pass this internal table for tool bar excluding parameter while calling ALV.
Here as shown in below code, 'Sorting, Ascending,Descending' buttons are removed from the tool bar list.
data : lt_exclude TYPE ui_functions.
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT.
APPEND ls_exclude TO lt_exclude .
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_ASC.
APPEND ls_exclude TO lt_exclude .
ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_DSC.
APPEND ls_exclude TO lt_exclude .
CALL METHOD alvgd->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = lt_exclude
Regards,
Maharshi Vyas -
How to display ALV grid in a graphical display??
Hello All,
I want to display the ALV grid output in graphical format. I did not see any particular Function code or event in ALV for graphs. Hence I designed a PF status myself. But when I use the Function module "Graph_2D", it gives me an error.
Can you guys suggest which is the best Function module to display the ALV output in graphical format?
Regards,
Abhishek
P.S: Points will be awarded to the answers which will solve the issueThis piece of code is giving graphical output , u can check it in ur machine.
REPORT ZSKC_GRAPH.
data : begin of itab occurs 0,
day type i,
val type i,
end of itab.
start-of-selection.
do 5 times.
clear itab.
itab-day = sy-index.
itab-val = sy-index + ( sy-index * sy-index ).
append itab.
enddo.
CALL FUNCTION 'GRAPH_2D'
TABLES
DATA = itab
EXCEPTIONS
GUI_REFUSE_GRAPHIC = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* Give some message.
ENDIF.
You just pass ur internal table to this Function module - Do you need to display column captions etc ?? In that case you will have to use GRAPH_MATRIX_2D. -
Generic function displaying alv grid for undefined structure
Hi experts,
I'm doing my first steps on abap development (Totally noob).
I'm writing some little reports based on simple selections (1 or 2 tables).
In every report, I've defined a structure (internal table) that i'm displaying with an ALV Grid.
In every report, I need to create a catalog for my structure in order to make the alv grid working.
What I would like to do is :
Create a function that receives a undefined structure (for all my reports) as a parameter.
This function sould create the catalog for the coresponding structure and call the alv grid function to display the data's contained in this structure.
The goal is : In every report, I would like to use this function to show the selected data's without taking care of catalogs, alv grid, etc...
Is it possible ?
I really don't see how I can do that... Does anybody already tried something like that ?
Thank you for your help
Regards
QuentinHi,
In this method Pass the structure name-
CALL METHOD gh_grid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = "<- here pass the structure
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = "<-Layout variable if using layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = gt_line[]
it_fieldcatalog = gt_fieldcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
Maybe you are looking for
-
Web.show_document in Forms 11g
Hi, I've migrating my application from forms 6i to forms 11g. In my application I use web.show_document to open some document using the http alias defined in httpd.conf under Oracle iSuites Http Server in httpd.conf I define Alias /my_document_folder
-
Ipod cannot be updated (-50 error) when trying to upload album art
For some reason, when I check the "Display album artwork on your ipod" box, I'll end up with an -50 error, even though the album art is already in iTunes and I can upload songs/photos/videos just fine. Latest version of iTunes and iPod FW. I've tried
-
Hello, looking for simple way or is it possible to reorder saving of records in a block. (FORMS 6i) Something like this: 1)I have detail block DB table (after Database query the data is) : abc_fk , abc_order, abc_text 001 01 some text1 001 02 some te
-
ICloud stopped syncing with iPhone 4s & iPad.
iCloud suddenly stopped syncing Apps & Calendar from one to the other, both ways. Contacts is working fine. Updates are current. I haven't made any deliberate changes and I have plenty of storage available. Suggestions?
-
Can I use only split for parsing a csv file with commas?