2008 Apr 02 11:45 AM
Hi,
I have a requirement where I need to get list of reports which have variants. The list should have both standard and Z-reports. The actual requirement is that if there is a variant for a report, I need to check if a field ( for eg ; Profit center) is there in the variant.
Thanks in advance.
Regards,
Vishnu Priya
Hi,
I have a requirement where I need to get list of reports which have variants. The list should have both standard and Z-reports. The actual requirement is that if there is a variant for a report, I need to check if a field ( for eg ; Profit center) is there in the variant.
Thanks in advance.
Regards,
Vishnu Priya
2008 Apr 02 11:49 AM
2008 Apr 02 11:54 AM
Hi Vishnu,
Use the following tables:
VARIT - Variant texts
VARID - Variant directory
TVARC Table
Kindly Reward Points If You Found The Reply Helpful,
Cheers,
Chaitanya.
2008 Apr 02 11:56 AM
Hi,
Standard table VARI gives list of program and corresponding variants. But I need to check, if a particular field is used in the variant. Eg. if profit center is used in the variant or not. Any pointers will be helpful.
TVARVC table contains list of variables that can be used in programs. It does not contain variants used in a report.
Regards,
Vishnu Priya
2008 Apr 03 8:57 AM
try in this away
VARIANT Declaration
DATA : g_save(1) TYPE c,
g_variant TYPE disvariant,
gx_variant TYPE disvariant.
CLEAR g_variant.
g_variant-report = sy-repid.
gx_variant = g_variant.
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
layout-get_selinfos = 'X'.
layout-group_change_edit = 'X'.
alv_print-no_print_selinfos = 'X'.
alv_print-no_coverpage = 'X'.
alv_print-no_print_listinfos = 'X'.
alv_detail_func = 'REUSE_ALV_LIST_DISPLAY'.
IF NOT p_vari IS INITIAL.
MOVE g_variant TO gx_variant.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant.
gv_variant = gx_variant.
endif.
Rewards Plz.....if satisfy