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

Program variants

Former Member
0 Likes
816

Hi All

I have a requirement as below:

Set a Zprogram with a variant already created manually as batch job in SM37.

This variant has date entry also which is defaulted to system date.

My requirement now is: when the batch job is run tomorrow, the variant set will still have the default today's date. I need to change the date accordingly whenever the batch is run. How do i update the variant with this information in the code.

Thanks and regards

Shilpa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
787

Instead of go for varient try with selection table.

here you can set the data value as sy-datum.

For details check, [Calling program by passing data|http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm]

Regards,

Anirban

3 REPLIES 3
Read only

Former Member
0 Likes
788

Instead of go for varient try with selection table.

here you can set the data value as sy-datum.

For details check, [Calling program by passing data|http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm]

Regards,

Anirban

Read only

Former Member
0 Likes
787

In the Create Variant Screen:

In the column 'Selection Variable' select 'D' using F4 help and

in the column 'Name of Variable' select 'Current Date' using F4 help

Read only

former_member156446
Active Contributor
0 Likes
787

when you save the variant.. check the checkbox which says dont save with value...

in ECC its called Save field without value