Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reports having variants

Former Member
0 Likes
638

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

4 REPLIES 4
Read only

Former Member
0 Likes
593

check in TVARVC table

Read only

Former Member
0 Likes
593

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.

Read only

Former Member
0 Likes
593

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

Read only

Former Member
0 Likes
593

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