cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Duration and Duration Units Parameters

Former Member
0 Kudos

Hi All,

I am trying to pass Duration and Duration units query Paramters from Html page to Query Template , but it is not taking those values. I am passing as given below

qobj.setStartDate("02/18/2011 06:57:59");

qobj.setEndDate("02/19/2011 06:57:59");

qobj.setDuration(6);

qobj.setDurationUnits('M');

can any body tell what was my mistake.

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Duration and DurationUnits are only relevant when either the StartDate and/or EndDate are blank (or when using the Time parameter).

If you would like your request to be the last 6 minutes then set your Start and End dates to a blank string. The server will timestamp the EndDate as 'now' on the server and the StartDate will be 6 minutes prior.

Former Member
0 Kudos

Jeremy Good,

Thanks for reply, my requirement is to pass Start Date and get data based on duration from that start date i am able to achieve this through xacute query but same thing is not working if i directly pass to querytemplate from html page any suggestions to this.

jcgood25
Active Contributor
0 Kudos

Your inquiry would benefit from more explicit details like what form of applet are you addressing in your javascript? If you modify the script to use .setEndDate(""); then the duration/units would go into effect from the provided StartDate.

You will also need to call document.APPLETNAME.updateChart(true); or document.APPLETNAME.updateGrid(true); in order for the new time based properties to impact the query. Also make sure that no TimePeriod or other higher priority time engine parameters are blocking your specific request.

http://help.sap.com/saphelp_mii121/helpdata/en/45/344a4476b74002e10000000a155369/frameset.htm

Former Member
0 Kudos

Thanks Jeremy it worked after setting EndDate to blank string

Edited by: krishna chaitanya on Feb 28, 2011 7:48 PM

Answers (0)