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

vaiant

Former Member
0 Likes
842

hi,

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
762

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
Read only

Former Member
0 Likes
762

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...

Read only

Former Member
0 Likes
763

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

Read only

Former Member
0 Likes
762

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

Regards,

Bikash

Read only

Former Member
0 Likes
762

Goto SM36-->

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

It will run automatically by taking the variant info.

Read only

Former Member
0 Likes
762

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