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

Variants -- with changing value!!!

Former Member
0 Likes
705

Hi,

I want to run a program by using the SUBMIT keyword and passing a variant using USING SELECTION-SET <variant name>

And the variant changes its values for each execution of the SUBMIT statement.

According to the replies to a similar question posted in this forum, I found that we can have constant input values in a VARIANT and pass the changing values using the WITH keyword.

is there any other way to achieve this other than the above solution..........

any help wud greatly be appreciated.!!!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

hi ramya,

Variant might be changed by someone else explicitly.

ex: if there is a variant test, some one would have gone to the program and selected that vairant changed, and saved.

apart from this hope no other way af value changing in variant.

regards

prabhu

reward if it is helpful.

2 REPLIES 2
Read only

Former Member
0 Likes
523

hi ramya,

Variant might be changed by someone else explicitly.

ex: if there is a variant test, some one would have gone to the program and selected that vairant changed, and saved.

apart from this hope no other way af value changing in variant.

regards

prabhu

reward if it is helpful.

Read only

Former Member
0 Likes
522

Hmm, you could set up multiple variants and change which variant you call the program with each time you SUBMIT. Example:

SUBMIT program_name USING SELECTION-SET variant1 AND RETURN.

SUBMIT program_name USING SELECTION-SET variant2 AND RETURN.

(and so on).

Another way to do it is to specify the fields separately, like this:

SUBMIT program_name WITH parameter1 = w_field1 AND parameter2 = w_field2

AND RETURN.

You can use this same statement multiple times, changing the values of w_field1 and w_field2 between calls (for instance, by putting the submit statement inside a LOOP, ENDLOOP). I hope this helps.

- April King