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: 

Dynamic Variant using TVARVC

Former Member
0 Kudos
2,437

I have to run the code: PRFI in the batch job. The field Personnel number(Selection Screen)  has to be populated dynamically during the batch job. I guess, I can achieve this by maintaining the selection variables in TVARVC. Since I need to load multiple values for each time in this variable, I want to confirm whether it is a correct way or any other way is there to achieve it.

Thanks,

Selva.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
256

Hi Selva,

It's possible to maintain multiple personnel numbers in table TVARVC using transaction STVARV. Create a dynamic variant for it in the Selection Options tab.

Regards,

Karl

7 REPLIES 7

Kartik2
Contributor
0 Kudos
256

Dear Mr. Selva A,

Are you running this report everytime with the same data ?? If yes then, you can save the data as a variant and then run the job with the variant.

How are you scheduling the background job ?? is it done through transaction SM36 or is it being done through program. If it is being done through program, then i suggest you to have a look at the documentation of submit statement where by you can submit a report by passing its parameters. I hope this helps.

For further clarifications after trying, feel free to revert. Thank you.

Regards,

kartik

Former Member
0 Kudos
256

Dear Karthik,

The data is not static. Each time , the report runs with the different set of personnel number.

I have scheduled it through SM36.

Thanks,

Selva.

0 Kudos
256

Dear Mr. Selva A,

For manual scheduling of jobs, you are correct, the entry to value of the selection field should come from table TVARVC. This can be achieved by creating a variant for the report with a dynamic property 'Selection variable' set to 'T' and 'The name of variable' should hold the field name that you enter in table TVARVC.

Now each time your job runs with this report and variant with dynamic attribute of type 'T'. it takes the value from table TVARVC for the field mentioned.

you can maintain values in table TVARVC using the transaction STVARVC.

Hope this helps. Thank you.

Regards,

kartik

Former Member
0 Kudos
256

Karthik, I just want to know maintaining multiple personnel number values in TVARVC create any problem?.

Secondly, I want to know the field:NUMB. What needs to be maintained  here?. Is it a row index ?.

Former Member
0 Kudos
257

Hi Selva,

It's possible to maintain multiple personnel numbers in table TVARVC using transaction STVARV. Create a dynamic variant for it in the Selection Options tab.

Regards,

Karl

0 Kudos
256

Thanks a lot Karthik.

0 Kudos
256

Thanks Karl.