02-21-2007 5:49 AM
Hi freinds,
I m not getting the use Is_variant option in REUSE_ALV_GRID_DISPLAY.
Can anyone send me the details of what is the use of this parameter and how can i us it?
Its urgent.
thanks in advance.
02-21-2007 5:51 AM
Welcome to SDN!!!
Refer this code
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
Reward if this helps.
02-21-2007 5:51 AM
Welcome to SDN!!!
Refer this code
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
Reward if this helps.
02-21-2007 5:56 AM
thanks judith.
but nowhere in that code, there is a use of Is_variant parameter. But anyways thanks for ur quick response.
02-21-2007 6:04 AM
Hi,
The following is where a user can enter a display variant
the no display can be used if the grid output is not to
be controlled by the users variant.
PARAMETERS p_layout LIKE disvariant-variant.
w_layout-grid_title = sy-title.
w_layout-zebra = 'X'
w_layout-sel_mode = 'B'.
w_layout-cwidth_opt = 'X'
w_variant-handle = p_layout.
w_variant-report = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
<b> is_variant = w_variant</b>
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
02-21-2007 6:10 AM
02-21-2007 5:53 AM
With the help of layouts, users can customize the list output to meet their requirements.
http://help.sap.com/saphelp_erp2004/helpdata/en/2b/c670f402cf11d3b497006094192fe3/content.htm
02-21-2007 6:00 AM
Hi Vivek,
Some of the Important Paramters of the RESUE_ALV_GRID_DISPLAY are:
EXPORTING
I_INTERFACE_CHECK To avoid overloading list output with interface consistency checks, they are only made in an extra call mode. If this parameter is 'X', the consistency of the interface is checked when the function module is called, and an error log is output. This parameter should only be set for development test purposes (e.g. in debugging).
I_CALLBACK_PROGRAM Program which calls the function module and contains the exit routines. It must be a Report, Function group, Module pool or Form routine pool
(not an Include).
I_CALLBCK_USER_COMMAND Passing an EXIT routine tells ALV that the application wants to react to certain function codes itself. These are general function codes which ALV does not recognize (not ALV standard functions) and which were defined and set by an application
status.
I_BACKGROUND_ID ID of background gif image to be displayed in report header.
IS_LAYOUT Output list description structure.
IT_FIELDCAT Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields).
IT_SPECIAL_GROUPS If fields have been grouped in the field catalog by a shared value of the parameter SP_GROUP, the technical key of the group (FIELDCAT-SP_GROUP) is assigned to the field group text in this internal table.
IT_SORT The caller specifies the sorting and/or subtotaling of the basic list in the internal table IT_SORT.
I_SAVE Controls the storage mode.
<b>IS_VARIANT</b> Variant information including the name of the list output variant.
IT_EVENTS This table tells ALV which events are processed by the caller by CALLBACK.
IT_EVENT_EXIT Table for passing ALV standard function codes, to return control to the user before and/or after execution with the callback event USER_COMMAND.
I_SCREEN_START_COLUMN Only to be used if the list is output in a popup.
I_SCREEN_START_LINE Only used if the list is output in a popup.
I_SCREEN_END_COLUMN Only used if the list is output in a popup.
I_SCREEN_END_LINE Only used if the list is output in a popup.
TABLES
T_OUTTAB Internal table with any structure containing the data to be output in list form. This table can contain more fields than are relevant for the list output (display fields and field list). Only the fields named in field catalog and the layout structure are used
for the list output. Other internal table fields are ignored.
In transaction SE38 write BCALV* and press F4 you will got all the examples and demo programs available for ALV.
See this article for more information:
Regards,
Priyanka.
02-21-2007 6:04 AM