cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Pop-Up

Former Member
0 Kudos
77

Hello guys,

I want to display a pop up at the opening of a query.

In this pop up user can choose a number N (a variable) : it's a number of days.

I want to use this number N chosen by user in another variable X which is in a selection S. I would fill this variable X by formula : Actual Date - N.

But i don't know how to do.

User must choose a number of days which will be used in a variable in a selection !

I hope you could help me.

Best cheers,

Vince.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ZAU_JHORI is declared with data type NUMC.

And I_STEP = 1.

But datas are not ok. Do you know why ?

Edited by: vince ricard on Dec 26, 2007 5:56 PM

former_member699913
Contributor
0 Kudos

Hi Vincie,

I think you can just create a formula variable with user input for

ZAU_JHORI = number N of days.

Now in your selection create a formula

ZAU_HORIZON = Actual Date(standard varaible)- ZAU_JHORI(as creted in the above step)

Assign point if it helps,

Ajay

Former Member
0 Kudos

Thanks for help,

I created formulas in BEx in order to do the difference between dates.

Points are assigned.

See you later,

Vince.

Answers (1)

Answers (1)

Former Member
0 Kudos

For this you need to create a formula varibale with type user entry. This will fill the column with the user entered values. Hide this column and then create another variable S with type customer exit and read the otehr varibale in exit code.

Former Member
0 Kudos

Hi Venkat,

I tried to do this in user exit but it doesn't work :

  • ZAU_HORIZON = variable X in sielection S

WHEN 'ZAU_HORIZON'.

  • ZAU_JHORI = number N of days

  • date type d.

date = sy-datum - ZAU_JHORI.

IF i_step = 1.

l_s_range-low = date.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

ENDIF.

ERROR --> "Field "ZAU_JHORI" is unknown. It is neither in one of the specified"

Can you give me a great program ?

Thanks.

Edited by: vince ricard on Dec 26, 2007 3:28 PM

Former Member
0 Kudos

Vince,

ZAU_JHORI should declared with data type. i think it is not declared. Again, This should be read within I_STEP = 1 and not outside.