on 04-25-2014 6:51 PM
How to pass start and end date and time in SAP MII url?
Hi Amr,
For your code, try something like:
Here, you are using Param.2 and Param.3 to form the date range but were passing SD and ED. Hence it takes what default was given to the QT from work bench.
This should work definitely for you.
Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Amr,
I fyou are using single quotes while getting the values in Params, don't use it while passing it from URL and vice-versa.
Just a SQL thing. Ideally, SD/StartDate both should work. Have you hardcoded any date in the QT for testing, it might be picking it up while it's not able to read from URL.
Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SD= and ED=
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, far I was successful to pass a tag String, but we need to also pass start date and end time. The following URL format we following:
http://<servername>/XMII/Illuminator?QueryTemplate=<Project>/<Path>/<TemplateName>
I hidden the server, port number and the name of the string.......company confidential but you should get the ideal.
The url is calling from webservices.
Hi Amr,
Depending on what you are using it for, there is some good help in
http://<servername>:<port>/CompanyName/App1/mypage.irpt?SD='2013-04-25'&ED='2014-04-25'
Should be close to the right syntax, but you may have to check the help for the specifics. I don't have access to a system to check right at the moment.
Are you passing the values to a transaction or a query template?
Regards, Mike
SAP Customer Experience Group - CEG
Message was edited by: Michael Appleby
I am passing the values through a query template:
SET NOCOUNT ON
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = DATEADD(minute,60,'[Param.2]')
SET @EndDate = DATEADD(minute,60,'[Param.3]')
SET NOCOUNT OFF
SELECT TagName, DateTime, Value
FROM History
WHERE TagName IN ('[Param.1]')
AND wwRetrievalMode = 'Cyclic'
AND wwCycleCount = 500
AND wwVersion = 'Latest'
AND DateTime >= @StartDate
AND DateTime <= @EndDate
And declaring in the Transaction Details:
tagString FEN_01_AMIX_ASIDE.FLOw
StartDate 2014-04-21 10:00:00
EndDate 2014-04-22 12:00:00
But every time I change the dates in the url it does not show the new dates it keep on showing the above dates.
For instance if I do the following:
It still shows the content for
StartDate 2014-04-21 10:00:00
EndDate 2014-04-22 12:00:00
instead of
StartDate 2014-04-20 10:00:00
EndDate 2014-04-20 12:00:00
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.