on 11-13-2009 11:33 AM
hello, i want to know if this is possible : i have a Javascript function that make this:
var szPLANT = document.getElementById("hid_Plant").value;
var szLINE = document.brs_Line.getSelectedItem();
var cell = document.brs_Cell.getSelectedItem();
var GetLineDownload = document.GetLineDownload.getQueryObject();
document.GetLineDownload.getQueryObject().setParam(1,szLINE);
document.GetLineDownload.getQueryObject().setParam(2,cell);
document.GetLineDownload.executeCommand();
but i to catch the result of the sql ...to use in another things in this function...how to to this?..like this:
result = document.GetLineDownload.results
regards
Mário
Mario,
After passing parameters you need to use either one of the metod:
document.GetLineDownload.refresh();
OR
document.GetLineDownload.update(true);
You can use grid to display the results. If you want to see the particular cell value results use as below
document.GRIDAPPLET.getGridObject().getCellValue(ROWNUMBER,COLNUMBER);
You can refer Javascript Assistant available.
-Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think that you dont understand my problem i have this code:
var szPLANT = document.getElementById("hid_Plant").value;
var szLINE = document.brs_Line.getSelectedItem();
var cell = document.brs_Cell.getSelectedItem();
var GetLineDownload = document.GetLineDownload.getQueryObject();
document.GetLineDownload.getQueryObject().setParam(1,szLINE);
document.GetLineDownload.getQueryObject().setParam(2,cell);
document.GetLineDownload.executeCommand();
i catch the values and then pass it to the parameters of my sql query...now i want to receive the result of this sql query...after the executeCommand and use this result in a job...previous the job works fine because receive the linenumber in final result...now i have the szLINE and cell and after passing the values i want to receive the linenumber in good format again..
regards and thanks one more time
Mário
Mario,
your script suggests that you are using a iCommand query. The iCommand is used to execute a query that does not return a value, like an update, insert or delete query.
If you are expecting a result, you would normally use an iGrid, and then you can use the functions that Suresh proposed to read out the result cells. If you do not want the iGrid to be displayed, but only need the values in your JavaScript, then you can omit the "DisplayTemplate" parameter in your iGrid so it won't be displayed on the web page.
You can however read the values from the iCommand also by using the function "iCommand.getValue(Col, Row)".
Please have a look at [http://help.sap.com/saphelp_xmii120/helpdata/en/44/d91ad2d06f3ee2e10000000a114a6b/content.htm].
Michael
Edited by: Michael Otto on Nov 13, 2009 1:25 PM
Ryan,
thanks for this idea. I found an interesting blog from Abesh about this: [AJAX + xMII Illuminator Services = A Database Browser !|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6003] [original link is broken] [original link is broken] [original link is broken];. It helped me to do some first steps with Ajax and MII.
Michael
hi, i have this code:
var szPLANT = document.getElementById("hid_Plant").value;
var szLINE = document.brs_Line.getSelectedItem();
var cell = document.brs_Cell.getSelectedItem();
var GetLineDownload = document.GetLineDownload.getQueryObject();
document.GetLineDownload.getQueryObject().setParam(1,szLINE);
document.GetLineDownload.getQueryObject().setParam(2,cell);
document.GetLineDownload.executeCommand();
var result = document.GetLineDownload.getValue(1,1);
the variable result is always empty to i have to make an refresh or update?
regards
Mário
Mario,
think this is solved now! Talk to Ricardo.
Cheers.
Pedro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
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.