cancel
Showing results for 
Search instead for 
Did you mean: 

How to minus user input date from Date type Characteristics InfoObj.

former_member198905
Participant
0 Kudos

Hi

I have

i)User input date (text variable) i.e. VUsr_Date

ii)Characteristic info object type date i.e. ZDue_Date

I need a column in BEx query which shows the difference of VUsr_Date and ZDue_Date.

How to minus VUsr_Date from ZDue_Date?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member586947
Contributor
0 Kudos

HI Imran,

    Create a formula variable with replacement path(FM1) on the char where the user input date variable is created and replace this formula variable with variable and select the the user input date variable.

Crate one more formula variable(FM2) with replacement path on ZDUE_DATE and replace with info object KEY.

Then create a formula for your column say difference =  FM1-FM2.

Try this and let me know.

Regards,

Satya,

former_member198905
Participant
0 Kudos

Hi Satya

Thanks for your reply. There is only one char. info obj. which is ZDUE_DATE so I created user input date (text variable) i.e. VUSR_DATE and create a replacement path variable on ZDUE_DATE and use it on formula when I use the VUSR_DATE in formula description and run the query then query want 2 user inputs as shown in attached screen shot.

former_member586947
Contributor
0 Kudos

Hi Imran,

    How come user is entering the date in text variable? I think it should be char variable, please check your logic.

    If you want to display the difference  between dates then you should not create a text variable. Text variable holds descriptions not the values. Hence follow the below process.


1. Create char variable(CH1) on  ZDUE_DATE, let the user enters the value for this variable as per your logic mentioned in the initial message.


2. Create a formula variable FM1 on ZDUE_DATE with replacement path and replace the variable with the above created char variable CH1.


3. Create one more formula variable FM2 on ZDUE_DATE with replacement path and replace the variable with InfoObject KEY.


4. Then create a formula in your query and use the above formula variables as FM1-FM2.



Regards,

Satya.

former_member198905
Participant
0 Kudos

Hi Satya

Correct me if I am understand wrong

1. Create char variable(CH1) on  ZDUE_DATE, let the user enters the value for this variable as per your logic mentioned in the initial message.

Create a selection and create char variable(CH1) on  ZDUE_DATE

2. Create a formula variable FM1 on ZDUE_DATE with replacement path and replace the variable with the above created char variable CH1.


Create a formula variable FM1 on ZDUE_DATE with replacement path  but Ch1 is not available in the list.


Regards,

Satya.