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 variants for a background job

Former Member
0 Kudos

Hi,

I need to set up a background job for a dynamic variant. To elaborate my selection screen has date ranges which need to change dynamically , if the job is secheduled on weekly basis the selection date range should change automatically in the variant. I got to know that the same is possible through the table TVARV. Can I know about the method of setting up the same?

Thanks,

Shailaja

4 REPLIES 4

Former Member
0 Kudos

You can handle this on the <b>INITIALIZATION.</b> event.

Default the values on this event.

Amandeep

0 Kudos

I did not quite get you. I am a functional consultant. Can you please elaborate further?

Thanks,

0 Kudos

Tks both of you. That helped me.

naimesh_patel
Active Contributor
0 Kudos

You can set a dynamic date to today date or some other date without using the table TVARV.

To set the dynamic date:

Save variant on the selection screen.

In the vairant screen, press F4 against your field in the column "Selection Variable"

Select D here.

In the column Name of the variable, press F4 to have the list of the possible rules.

Here you can select "Current date - xxx,current date + yyy" if you want to have certain period.

When you select this system will pop up to put the values for XXX and YYY.

Say for last 7 days, you can set the values XXX as 7 and YYY as0.

But the best way is to change the program, if possible, and fill the select option in the intialization event.

Regards,

Naimesh Patel