2008 Jan 03 9:44 PM
Wassup !
A need to create a file in same as time as a display an ALV. In selection screen there is a field that the user can load a variant. I need to create the file with the same fields displayed in ALV, How can I discover witch fields will appear in screen.
There is a table for that ?
A FM ?
Thx all.
Point will be rewards. !!
2008 Jan 03 11:44 PM
hi,
i found this function modules under function group SALV
REUSE_ALV_VARIANT_DEFAULT_GET Read default display variant (description only, w/o field catalog)
REUSE_ALV_VARIANT_SELECT Read a display variant
the first function return the name of the variant,
the second one return fieldcats
i hope is usefull for u.
bye
Marco
2008 Jan 03 11:31 PM
2008 Jan 03 11:44 PM
hi,
i found this function modules under function group SALV
REUSE_ALV_VARIANT_DEFAULT_GET Read default display variant (description only, w/o field catalog)
REUSE_ALV_VARIANT_SELECT Read a display variant
the first function return the name of the variant,
the second one return fieldcats
i hope is usefull for u.
bye
Marco
2008 Jan 04 1:33 PM
2016 May 20 3:00 PM
Hey,
I want to download data according to layout set in excel on custom PF status button .
How can i resolve this...
2008 Jan 04 1:12 AM
Check the function Module 'LT_DBDATA_READ_FROM_LTDX'
Check this sample code
Get the field details to be passed by passing the variant name
DATA: disvariant TYPE disvariant.
i_varkey = disvariant.
CLEAR i_varkey-type.
i_varkey-type = 'F'
CALL FUNCTION 'LT_DBDATA_READ_FROM_LTDX'
EXPORTING
i_tool = 'LT'
is_varkey = i_varkey
TABLES
t_dbfieldcat = i_dbfieldcat
t_dbsortinfo = i_sortinfo
t_dbfilter = i_filter
EXCEPTIONS
not_found = 1
wrong_relid = 2
OTHERS = 3.
After calling this FM the table i_dbfieldcat field NO_OUT will contain 'X' for the fields which should not be displayed in the ALV output.
you can use this table to build your logic.
2008 Mar 13 11:45 AM
Hello,
I was glad to find information about the reading of display variants fields from field clusters of table LTDX but the code given as example does not pass abap control.
Could you please confirm if compatible with ECC 6 unicode release ?
Any information about the processing of this function would be a great help (does not return anything when tested in se37 test mode).
Thanking you in advance for your cooperation
Best regards
jch
2008 Mar 18 2:01 PM
Wassup ...
I hope the following code helps ...
{ variante-report = sy-repid.
variante-variant = p_vari.
layout-colwidth_optimize = 'X'.
layout-zebra = 'X'.
IF NOT p_vari IS INITIAL.
CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
i_dialog = ' '
it_default_fieldcat = t_fieldcat
i_layout = layout
IMPORTING
ET_FIELDCAT = t_fieldcat
CHANGING
cs_variant = variante
EXCEPTIONS
WRONG_INPUT = 1
FC_NOT_COMPLETE = 2
NOT_FOUND = 3
PROGRAM_ERROR = 4
OTHERS = 5.
ELSE.
LOOP AT t_fieldcat assigning <fs_fieldcat>.
CLEAR: <fs_fieldcat>-no_out.
ENDLOOP.
ENDIF.
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = sy-repid
fieldname = 'T_LISTA'
tables
components = tl_comp.
CLEAR: vl_file.
}
First u get the variant with 'REUSE_ALV_VARIANT_SELECT. After that u discovery with fields will be shown with that variant.
2008 Mar 30 5:35 PM
Hi,
I have used this FM on 4.7 Enterprise right now i don't
have access to ECC 6.0 system.
Try using the function module through an ABAP program and
Pass the values for the parameter
is_varkey:
i_tool = 'LT'
for the parameter( is_varkey-Structure of type DISVARIANT ) the fields you need to pass are
1. Name of the current program.
2. Name of the display variant.
3. varkey type = 'F'
Regards,
Rahul
Edited by: Rahul kamble on Mar 30, 2008 10:07 PM