Skip to Content
Former Member
Oct 29, 2013 at 04:00 PM

Changing a variant variable via ABAP


I've looked for an answer for this, but can not find one.... so here's the situation.

I'm running a SAP job that has a date selection option. I want to create a variant and have that date go from the 1st day of the year up until 5 days in the future of today's date. I know I can write a program to calculate the date and do a SUBMIT, but I would like to stay away from that if possible. The options I have are to create an entry in TVARCV from "20130101" to "today+5". OR do a dynamic "Current date +/- xxx days".

What I was thinking was to create a batch job that runs nightly that changes either the TVARCV entry or the XXX in the dynamic option. The problem is I don't know how to do that. Does anyone have any ideas? Is there a FM that changes TVARCV? I don't want to manually change it if I can help it since it's a SAP table. If there is a way to do it without coding, I would love to hear about that too.

Any information would be helpful.