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

variable variant

Former Member
0 Likes
487

Hi,

I have one requirement,i want to have a variant where i have date field on screen.I want to run this program in background.but whenever i run this program(everyday) date will be changed without changing in variant everytime.Thus user does not want to change date everytime manually.how to achieve this?

Regards,

Soniya s.

4 REPLIES 4
Read only

Former Member
0 Likes
455

create a dynamic variant for a selction field and use smae variant for running the report

Reagads, Sri

Read only

Former Member
0 Likes
455

Search in SCN as to how to define Dynamic Variants. You will get lots of posts related to it.

Read only

venkat_o
Active Contributor
0 Likes
455

Hi Soniya, <li>check the below program.

REPORT ztest_program.
PARAMETERS p_char TYPE char5.
PARAMETERS p_date TYPE sy-datum.

AT SELECTION-SCREEN OUTPUT.
  p_date = sy-datum.

START-OF-SELECTION.
  WRITE:/ p_char,
          p_date.
<li>I have create variant ztest_var1 with values p_char = 'test1' and p_date = '29.09.2009'. <li>I have create variant ztest_var2 with values p_char = 'test2' and p_date = '01.10.2009'. <li>As I have filled p_date with sy-datum in PBO of the selection-screen.I am getting outputs like below.
TEST1 30.09.2009
TEST2 30.09.2009
. So try that way. I think that it works. Thanks Venkat.O

Read only

Former Member
0 Likes
455

dynamic variant solved my problem.