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

Read existing variant for program and passing values through submit stat

Former Member
0 Likes
3,866

Hi All,

In our requirement we are calling a report in our main program through 'SUBMIT' statement and

we were passing some hard coded values to the selection screen of the called report . But,there is some modifcation in our requirement Following are the details.

Change :

Instead of passing the hard coded values, user has said to read the values of the existing variant and pass the same values to the called report.

Can you please help me in solving this .

How can we read existing variant values for the particular program and how can we pass the same

values through submit statement?

1 ACCEPTED SOLUTION
Read only

viquar_iqbal
Active Contributor
0 Likes
1,685

Hi

Try RS_VARIANT_CONTENTS to read variat values

and then pass them using submit statement USING SELECTION-SET variant

Thanks

Viquar Iqbal

7 REPLIES 7
Read only

kiran_k8
Active Contributor
0 Likes
1,685

Bhanu

Check the below given function modules

RSPC_VARIANT_SELECT

RSPC_VARIANT_GET

K.Kiran.

Read only

Former Member
0 Likes
1,685

HI

Read the values of the screen fields from the screen and pass them through the submit statement.

example

submit zreport via selection-screen using selection-set variant

you can even use the rs_variant_contents is the function module to read the contents

thanks

sarvesh

Read only

viquar_iqbal
Active Contributor
0 Likes
1,686

Hi

Try RS_VARIANT_CONTENTS to read variat values

and then pass them using submit statement USING SELECTION-SET variant

Thanks

Viquar Iqbal

Read only

0 Likes
1,685

Hi all,

Thanks for your help.

It would be greatful if you can send me the piece of code where we are using the above FMs.

Regards,

Bhanu.R

Read only

0 Likes
1,685

Ignore my reply,I got it wrong in mentioning the function modules but I am sure that it starts with RS_.Check for the function modules starting with RS_ in TFDIR table.

K.Kiran.

Read only

Former Member
0 Likes
1,685

if u r using variant, then the values of this variant will be displayed in the selection screen of the calling prg. Now instead of using the hard coded values, jus pass the values that were in the selection scr.(like s_extid-extid) in the SUBMIT statement.

Read only

Former Member
0 Likes
1,685

use below statement.

submit <report> USING SELECTION-SET variant.