Application Development 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: 

vaiant

Former Member
0 Kudos

hi,

I have created a variant by name ZSDB, how can I make it run automatically with the program?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use this code in initialization.

INITIALIZATION.

DATA: v_repid LIKE rsvar-report,

v_variant LIKE rsvar-variant.

v_repid = sy-repid.

v_variant = sy-uname.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = v_repid

variant = v_variant

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

IF sy-subrc NE 0.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = v_repid

variant = 'ZSDB'

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

ENDIF.

thanks

5 REPLIES 5

Former Member
0 Kudos

If you have assigned transaction code in SE93,

You can use the option <b>START WITH VARIANT</b> with your variant name ZSDB specified there...

Former Member
0 Kudos

use this code in initialization.

INITIALIZATION.

DATA: v_repid LIKE rsvar-report,

v_variant LIKE rsvar-variant.

v_repid = sy-repid.

v_variant = sy-uname.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = v_repid

variant = v_variant

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

IF sy-subrc NE 0.

CALL FUNCTION 'RS_SUPPORT_SELECTIONS'

EXPORTING

report = v_repid

variant = 'ZSDB'

EXCEPTIONS

variant_not_existent = 01

variant_obsolete = 02.

ENDIF.

thanks

Former Member
0 Kudos

goto se93, assign a TCODE for ur program and use the option Start with variant....

Regards,

Bikash

Former Member
0 Kudos

Goto SM36-->

Give jobname>click on Step>Give program name & variant name.

It will run automatically by taking the variant info.

Former Member
0 Kudos

Hi Sri,

Go to T.Code SE93->Enter your T.Code-> Change mode/Create->Description->Choose Prg->Choose option "Start with Variant"-> Save.

Hope it helps!!!!

Amit