You
need to put the guixt.rfc() call into a VBScript function in
your HTML page. In order to continue with JavaScript afterwards,
convert the VBScript array into a JavaScript array using the
"VBArray" object in JavaScript (Microsoft JavaScript
extension).
This
is necessary since array structures and parameter passing is
different in VBScript as compared with JavaScript. VBScript uses
COM conventions, as does the guixt.rfc() call, but JavaScript
has a totally different array implementation.
See
for example http://wiki.mcneel.com/developer/scriptsamples/arrays
Example:
<script
type=text/vbscript>
dim
vb_array
Function Execute_RFC(guixt)
' read data via RFC / SAP searchhelp
Call guixt.Rfc("Z_S10_SEARCHHELP",
"in.SEARCHHELP", "H_TVKO",
"in.COLUMNS", "VKORG(4),VTEXT(20)",
"table.DATA(WIDTH:24)",
vb_array)
End
Function
</script>
<script
type=text/javascript>
function
guixt_initialize(obj){
//
Set guixt object
var guixt = obj;
//
Get data via RFC
Execute_RFC(guixt);
//
Convert VBScript array to JavaScript array
var js_array = VBArray(vb_array).toArray();
//
Display it in debugger
debugger
};
</script>
</script> |