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

how to create varient from program?

Former Member
0 Likes
1,148

Hi All,

Can any body tell how to create varient from program?

Ex. I am schedulling a job through my program. and the program which i am submitting to 'JOB_SUBMIT'

function module needs a varient which will consist of only one input field and that field is changing

very frequently so i want to create verient as input field changes..

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
995

Well, SE38 is where you can maintain variants. What's the nature of the field? If it's date related, then you can use built in variables in the variant attributes screen. Otherwise, you can create your own using transaction STVARVC, and programmatically set the values.

For details - search the forums.

matt

9 REPLIES 9
Read only

matt
Active Contributor
0 Likes
996

Well, SE38 is where you can maintain variants. What's the nature of the field? If it's date related, then you can use built in variables in the variant attributes screen. Otherwise, you can create your own using transaction STVARVC, and programmatically set the values.

For details - search the forums.

matt

Read only

Former Member
0 Likes
995

Hi,

pass required values to the fields on selection screen and press SAVE button on the same screen..

It navigates u to next screen, give the required variant name & description and save it again..it creates a variant and comes to selection screen.

If u want to see the variant prees SHIFT+F5 on selection screen, it shows all the available variants.

Regards,

Pavan

Read only

0 Likes
995

Hi Vishnu ,

Thanks for your reply. But I want to create vareint programmatically.

Read only

matt
Active Contributor
0 Likes
995

>

> Hi Vishnu ,

> Thanks for your reply. But I want to create vareint programmatically.

As I understand, you want to create values for the variant programmatically. For that, see my earlier response. And though I frown on posting just linkes, janagar sundara...'s second link has what you need.

You would only want to create a variant programmatically, if the selection fields on the screen were changing all the time. And that is non-trivial.

Read only

Former Member
0 Likes
995

hi

enter the values which required on selection-screen and use save button .

use u r meaning full name for variant and description

If u want to see the variant prees SHIFT+F5 on selection screen, it shows all the available variants.

~linganna

Read only

Former Member
0 Likes
995

In SE38,choose the program and select Variants option and then create and provide description for the variant and then save it,

Read only

0 Likes
995

Hi Gaytri,

I want to create varient through program. Is there any Function module to create vareint.

Read only

Former Member
0 Likes
995

https://wiki.sdn.sap.com/wiki/display/Snippets/setdefaultvarient+inreports

https://wiki.sdn.sap.com/wiki/display/ABAP/Creatingdynamicvariantusingtable+TVARV

hope it will be useful for you

Read only

Former Member
0 Likes
995

Use FM

RS_VARIANT_DISPLAY

Regards,

Lalit Mohan Gupta.