cancel
Showing results for 
Search instead for 
Did you mean: 

Display current date dynamically on prompt

Former Member
0 Kudos

Hi,

I have created a variable zcalday in bex  based on calenday day (customer exit, optional) and in CMOD i am feeding the input from this variable to 2other variables to calculate the keydate (zcal) and (zkeydate) last day of the previous month. (istep 2 is used)

Now the problem is if user does not enter any value it should default to system date as well as it should display the current date on prompt before running the query.

Zcalday is optional, but has become mandatory since it is being used in number of RKFs.

Any suggestions ????? on how to take user input as well as take system date when no user entry with system date being displayed on prompt beofre running the query.

Thanks,

Vinay

Accepted Solutions (1)

Accepted Solutions (1)

former_member182470
Active Contributor
0 Kudos

Use a standard Current day variable instead of ZCALDAY,

Otherwise, You can use i_step =1 for your ZCALDAY to populate default as Current date. So everytime he sees current date in the variable screen and he can change if he wants to change the date.

So that your other variables can take the value of Zcalday.

Answers (2)

Answers (2)

Former Member
0 Kudos

Here you need I_STEP = 1 for your requirement

  • I_STEP = 0: It is for authorization check
  • I_STEP = 1: takes place before variable entry
  • I_STEP = 2: takes place after variable entry
  • I_STEP = 3: takes place after variable entry for triggering messages based on variable entry. Afterwards, I_STEP=2 called up again
anshu_lilhori
Active Contributor
0 Kudos

Hi,

In I_step = 1 write the following code for the variable in which you need to populate the current system date by default.

WHEN 'VAR_CURRDT'.---Replace it with the technical name of your variable

      l_s_range-low = sy-datum.

      l_s_range-sign = 'I'.

      l_s_range-opt = 'EQ'.

      APPEND l_s_range TO e_t_range.

Hope this helps.

Regards,

AL