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

Regarding Normal ABAP Report variant

Former Member
0 Likes
715

Dear Experts,

Please suggest for the below business scenario..

I have created the 10 variants for the report. Now i want to show the first 5 variants for 1 user,Another set of 5 variants i want to show for another user..

Please sugget ..

Regards,

Bixamaiah.

Dear Experts,

Please suggest for the below business scenario..

I have created the 10 variants for the report. Now i want to show the first 5 variants for 1 user,Another set of 5 variants i want to show for another user..

Please sugget ..

Regards,

Bixamaiah.

3 REPLIES 3
Read only

Former Member
0 Likes
637

Hi,

Try creating variant groups in SHD0 t-code.

Variant Groups are used to start transactions with different transaction variants according to the user which runs the transaction.

Key concepts are:

Variant groups are maintained in SHD0, in tab "Standard Variant, then in tab "Variant Groups".

A Variant Group is assigned to 0 to N users

A user may have 0 to N variant groups. If he has several variant groups, he may switch using SHD_SWITCH transaction.

At a given time, a user can be assigned to only one variant group.

At each logon, the user is assigned by default to the variant group assigned by button "Set proposal" in SHD0.

When user has currently ZVVVV variant group and he runs ZT transaction, SAP automatically uses ZVVVVZT transaction variant if it exists.

A variant group named ZVVVV is linked automatically to all transaction variants named ZVVVV* (where * must be the transaction code to which the transaction variant applies).

If a transaction has both a standard variant and a group variant, SAP runs the transaction using the transaction variant from the variant group.

Check this [link |http://wiki.sdn.sap.com/wiki/display/ABAP/TransactionandScreen+variants]for more details

Read only

Former Member
0 Likes
637

Hi,

Create a variant and name it as userid of the person executing it. You can also create another one called STANDARD for default use when no variant exists.

include the below code in your program

INITIALIZATION.

DATA: lv_repid LIKE rsvar-report,

lv_variant LIKE rsvar-variant.

lv_repid = sy-repid.

CLEAR h_variant.

lv_variant = sy-uname.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = lv_repid

variant = lv_variant

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

IF sy-subrc <> 0.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = lv_repid

variant = 'STANDARD

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

ENDIF.

hope this will surely help you !!

Regards,

Punit

Edited by: punit raval on Sep 19, 2011 5:24 PM

Read only

Former Member
0 Likes
637

Dear Experts ,

I have tried all the ways..when we click on selection screen variant icon one pop up is coming with all variants.before displaying this pop up we have to remove the some variants. If we are able to do this our issue will be closed..

Please suggest.

Regards,

Bussa