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

Timestamp Field - Dynamic date values

silentbull
Participant
0 Likes
1,725

Hello

I have an abap program with timestamp field as select-option.

The user would like the job to be scheduled every week and the timestamp field should have values current date- 1 week.

Can we do this using dynamic varient ?

I am aware that for timstamp field dynamic varient is not possible and only TVARVC is possible.

Even that is not working. Is there any way to do this using TVARVC or any other method.

The select option is of structure reference TZONREF.

Assuming I populate current date - 1 week in the initialization event without using TVARV table. I still need a varient for another field which has plant values.

Can I use varient as well as code my required dates in the initizalization event. If so, should i hide the date field while choosing the varient or will the values disappear when the varient is chosen.

Regards

Krish

5 REPLIES 5
Read only

Former Member
0 Likes
1,108

Hello Sam,

Is it a standard program ?

If no, why don't you manage it in program code in case select option is not filled ?

How about if the job failed and is executed again next day ? do you loose a day in your process ?

Regards

Read only

0 Likes
1,108

Hello Brice

It is a Z program only and I would like to manage it using Program code only. But I need a varient to save and schedule. So what should I choose for this field in the varient as every day the select option will need to change.

Regards

Sam

Read only

Former Member
0 Likes
1,108

Hi Sam,

When you save your variant, you can set the "Save without values" checkbox for the timestamp field.  That way you can save the values of other parameters but leave the timestamp selection empty for your program to fill.

Jim

Read only

silentbull
Participant
0 Likes
1,108

Hello Jim

I believe I would still need the timestamp field as selection screen. My program will fill only during the initialization event.

Does it mean the save without values will retain the default values of selection screen?

Regards

Sam

Read only

0 Likes
1,108

Hi Sam,

You would still leave the field on the selection screen.  You set the "Save without values" checkbox in the attributes of the variant so that when the variant is used it will not populate the values for that select-options.  Then you can populate it in your program if it is empty (which will be the case if that variant is used).  If a user does fill in the value during execution, or in a different variant where that checkbox is not set it will act as normal. Put your code to fill in the default in the INITIALIZATION event , first checking IF selopt[] IS INITIAL so that you don't overwrite values if they are provided in a variant.  That way you get your default values only if the variant does not provide one.

Jim