cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Date parameters to an Xacute query

0 Kudos

Hi,

I have two date parameters on a web page : FromDate and ToDate and am passing them to a Xacute query which will in turn call a transaction.

I am unable to pass the date parameters from the web page to the Xacute query and the transaction. The transaction is not accepting the date parameters from the web page and is only taking the date as the current date.

Could anyone let me know if they have worked on a similar situation. If yes, could you please give me your suggestions.

Thanks,

Sushanth

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sushanth,

This worked for me. Pls check if it is helpful.

In the Transaction i configured 2 input parameters StartDate and EndDate.

In the Xacute Query Template This is the configuration.

I have set the Date Values from UI in the following way.

Now I executed this IRPT and provided start and end dates and clicked on the RunTxnWithDates button.

Query will be executed successfully.

In the .txt file i got the same dates which i mentioned in the UI.

Regards,

Sriram

swaroop_anasane
Active Contributor
0 Kudos

Hi Sriram,

Even i you follow this, you are not making use of [SD] and [ED] tags as evident from your query template. You need to paste StartDate and EndDate in specific fields opposite to parameters list.

In your example, you have created transaction properties named StartDate/EndDate which is not recommended being keywords.

Regards,

Swaroop

swaroop_anasane
Active Contributor
0 Kudos

Hi Sushanth,

I would suggest, put a text saver in trx and save your input. See if the format matches what your query expects, if it done not, modify it to fulfill the need of time.

Meanwhile, please share the URL as well that you are using for this case.

Thanks and Regards,

Swaroop

0 Kudos

Hi,

I did put a Text Saver but I still get today's date in the start date of the Xacute query and not the start date from the UI.

The URL that am using to execute the XAcute query is :

http://rnosapxmd1:50200/XMII/Illuminator?service=Personalization

- Sushanth

swaroop_anasane
Active Contributor
0 Kudos

Hi Sushanth,

This is link to home page. I need to know how are you passing parameters to illuminator service. Please share that url.

Also, please check if you have mapped SD and ED to "Start/End Date of Mapped Input" in the Xacute Query.

Regards,

Swaroop

swaroop_anasane
Active Contributor
0 Kudos

For your ease, make sure you are passing parameters as is shown below:

/XMII/Illuminator?Content-Type=text/xml&QueryTemplate=<<QT Path>>&StartDate=2012-02-28T05:42:39&EndDate=2012-03-28T05:42:39&OutputParameter=Output

StartDate and EndDate being the key to SD and ED tags. If you mismatch date format, you would get error saying start and end dates cannot be parsed.

If date format in QT is : "MM/dd/yyyy HH:mm:ss" then the value should go like: 02/28/2001 05:42:39

If date format in QT is : "yyyy-MM-dd'T'HH:mm:ss" then the value should go like: 2012-02-28T05:42:39

This way, dates would be handled correctly in trx.

Thanks,

Swaroop

austin_jacob
Explorer
0 Kudos

Hi Sushanth,

I am not sure whether the disconnect is happening from

1)UI to Xacute Query? or

2)Xacute Query to Transaction

My guess would be that you might have mapped Start Date of Mapped Input and End Date of Mapped Input with the Start and End Date Properties of the transaction like below.

If Above is the scenario, Please check if you are passing the Start Date and End Date from the UI to the StartDate and EndDate Parameter, Not to the Params which are used usually.

http://<server>/XMII/Illuminator?QueryTemplate=<QueryTemplate>&StartDate=2013-02-02T00:00:00&EndDate=2014-02-02T00:00:00

Also, make sure that the Date Formats match with the Date Format in the Date Range Tab.

If you are not passing the StartDate and EndDate, the possibility is the End Date will be Current DateTime and the Start Date will be (Current DateTime - 60 Minutes).

If this is not the scenario, please explain your issue little more elaborate.

Regards,

Austin

0 Kudos

Hi,

Thanks for your reply.

The disconnect is from UI to Xacute Query. I am new to SAP MII and I do not know how to pass parameters from the UI to Xacute Query.

Could you please help me in understanding how to pass parameters from UI to Xacute Query.

The URL that I am using to execute the Xacute query is :

http://rnosapxmd1:50200/XMII/Illuminator?service=Personalization

Thanks for your help.

- Sushanth