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: 

Variant

Former Member
0 Kudos

In Tranx Code ME2N ( Purchasing Documents Per Document Number ), i have filled Document date as today's date, and i saved this variant, but when i want to run ths tranz code tomarrow, and when i select this variant, it must filled with tomarrow date, can u tell me how can we do this ?

Thanks in Advance,

Srini Kumar

Points for sure

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, you can do this with a selection variable. When saving your variant, select the checkbox in the Document Date Row mark as "L" for Selection Variable. Then click the selection varible button on the application toolbar.

Where you see the traffic lights, click the column for "D". Then click the down arrow. You will see a dialog. Select the "Current Date" and click green check. Click Save. Now save the variant. Now at the selection screen, choose your variant. Now you will see the current date populated into the document date field.

Regards,

Rich Heilman

4 REPLIES 4

Former Member
0 Kudos

There is a user exit for this wherein u can write the condition as date = sy-datum which will take the date by default.

Just check in User exists for this.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, you can do this with a selection variable. When saving your variant, select the checkbox in the Document Date Row mark as "L" for Selection Variable. Then click the selection varible button on the application toolbar.

Where you see the traffic lights, click the column for "D". Then click the down arrow. You will see a dialog. Select the "Current Date" and click green check. Click Save. Now save the variant. Now at the selection screen, choose your variant. Now you will see the current date populated into the document date field.

Regards,

Rich Heilman

0 Kudos

Rich, Its working, Full Points for you.....

Former Member
0 Kudos

In the variant,

check the date field at column 'L' (selection variable).

then click on selection variable. A new screen will appear in that screen specify the current_date parameter from the selection list and save the variant.

Ur variant will come according to the current date.

Reward points if it helps

Cheers,

Hasmath