Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to catch a value from an input and pass it like a paremeter of grid

hello, i build a Javascript function that shows the actual date and time, im putting this date and time in an input but now i need to catch this date and time to pass it like a paremeter to my SQL Query... i already tried somethings like this in the end of the page..

var grid = document.grd_Cell.getGridObject();

grid.setParam(3, data_hora);

grid.setParam(4, data_hora);

but it throws an error: object doesn't support this property or method



Former Member

Your answer actually exists in your question

You mention wanting to impact your SQL Query, but in your JavaScript you are referencing the iGrid. The script assistant would have guided you to this solution, since the set parameter methods are only relevant for the query object.

var grid = document.grd_Cell.getQueryObject();

grid.setParam(3, data_hora);

grid.setParam(4, data_hora);


If you build your SQLQuery using

[SD] or [ED]

instead of

[Param.3] and [Param.4]

then the iGrid will also show the time refresh controls for the user to select their own dates, and would not need form input fields, etc.

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question