2010 Nov 23 11:06 AM
Hello,
I have requirement where I need to validate the ALV Layout for any particular Report. For this I am using function module 'REUSE_ALV_VARIANT_EXISTENCE'.
Now if this layout is valid I need to get it's all parameters such as on which fileds SORT, FILTER, etc.. criteria is applied. I tried using below function modules but had not any success. Those only validate the layout variant but do not return SORT, FILTER tables.
- REUSE_ALV_VARIANT_SELECT
- K_KKB_LIST_LAYOUT_INFO_GET
- LVC_VARIANT_SELECT
- LT_VARIANT_LOAD
- LT_VARIANTS_READ_FROM_LTDX
I am not using ALV grid Object to get all this information after displaying data on ALV. I just need to validate that layout for report and then fetch it's all information.
Is there any FM or class-methods which I can use for this?
Thanks,
Vikas
2010 Nov 23 2:33 PM
Check LT_DBDATA_READ_FROM_LTDX - Just check the function group SKBS for list of fm's
SELECT SINGLE * FROM ltdx
WHERE variant = p_var
AND report = sy-repid.
if sy-subrc = 0.
is_varkey-report = ltdx-report.
is_varkey-handle = ltdx-handle.
is_varkey-log_group = ltdx-log_group.
is_varkey-username = ltdx-username.
is_varkey-variant = ltdx-variant.
is_varkey-type = ltdx-type.
call fm here
endif.
Hello,
I have requirement where I need to validate the ALV Layout for any particular Report. For this I am using function module 'REUSE_ALV_VARIANT_EXISTENCE'.
Now if this layout is valid I need to get it's all parameters such as on which fileds SORT, FILTER, etc.. criteria is applied. I tried using below function modules but had not any success. Those only validate the layout variant but do not return SORT, FILTER tables.
- REUSE_ALV_VARIANT_SELECT
- K_KKB_LIST_LAYOUT_INFO_GET
- LVC_VARIANT_SELECT
- LT_VARIANT_LOAD
- LT_VARIANTS_READ_FROM_LTDX
I am not using ALV grid Object to get all this information after displaying data on ALV. I just need to validate that layout for report and then fetch it's all information.
Is there any FM or class-methods which I can use for this?
Thanks,
Vikas
2010 Nov 23 11:51 AM
try this:
CALL FUNCTION 'LVC_VARIANT_EXISTENCE_CHECK'
EXPORTING
i_save = gdf_variant_save
CHANGING
cs_variant = gds_variant
EXCEPTIONS
OTHERS = 01.
2010 Nov 23 12:20 PM
I can validate the layout with function module 'REUSE_ALV_VARIANT_EXISTENCE', I need all parameters for that layout.
Thanks,
Vikas
2010 Nov 23 2:33 PM
Check LT_DBDATA_READ_FROM_LTDX - Just check the function group SKBS for list of fm's
SELECT SINGLE * FROM ltdx
WHERE variant = p_var
AND report = sy-repid.
if sy-subrc = 0.
is_varkey-report = ltdx-report.
is_varkey-handle = ltdx-handle.
is_varkey-log_group = ltdx-log_group.
is_varkey-username = ltdx-username.
is_varkey-variant = ltdx-variant.
is_varkey-type = ltdx-type.
call fm here
endif.
2010 Nov 24 10:58 AM
Thanks Keshav, this FM worked fine.
Just one more issue how can we apply filter criteria to the internal table? I am having one internal table data and now I want to apply this filter parameters to that internal table. I am not displaying that internal table data with ALV grid or something so I can not pass the layout or filter information to it.
Thanks,
Vikas
2010 Nov 23 2:56 PM