Click here to show toolbars of the Web Online Help System: show toolbars |
Give the import parameter SALESDOCUMENT the value "00006973":
JCO.Field SalesDocumentField = jcoFunction.getImportParameterList().getField("SALESDOCUMENT");
SalesDocumentField.setValue("00006973");
JCO.Table ORDER_PARTNERS = jcoFunction.getTableParameterList().getTable("ORDER_PARTNERS"); ORDER_PARTNERS.appendRow(); ORDER_PARTNERS.setValue("AG","PARTN_ROLE"); ORDER_PARTNERS.setValue("0000001032","PARTN_NUMB");
JCO.Structure order_header_inx = jcoFunction.getImportParameterList().getStructure("ORDER_HEADER_INX");
order_header_inx.setValue("I","UPDATEFLAG"); order_header_inx.setValue("X","DOC_TYPE");
JCO.Table myTable = jcoFunction.getTableParameterList().getTable("STATUSINFO");
for (int i=0; i < myTable.getNumRows(); i++) myTable.setRow(i); // Retrieve the value of the field DOC_DATE oDocDate = myTable.getField("DOC_DATE").getValue();
Meesage type and message is stored in vector bapiReturn.
Vector bapiReturn;
JCO.Table jcoReturn = jcoFunction.getTableParameterList().getTable("RETURN");
for (int i = 0; i < jcoReturn.getNumRows(); i++) { jcoReturn.setRow(i); String Message = jcoReturn.getField("TYPE").getValue() + " " + jcoReturn.getField("MESSAGE").getValue(); bapiReturn.setSize(i + 1); bapiReturn.setElementAt(new String(Message),i ); }
try { // Get a function template from the repository IFunctionTemplate ftemplate = mRepository.getFunctionTemplate("BAPI_TRANSACTION_COMMIT"); // Create a function from the template jcoCommit = new JCO.Function(ftemplate); if ( jcoCommit == null ) // Do something..; } catch (Exception mException) { mException.printStackTrace(); } // Execute COMMIT try { sapConnection1.mConnection.execute(jcoCommit); } catch (Exception mException) { mException.printStackTrace(); }var fe = FindFrame("toc", top); if ((fe != null) && (chmtop.c2wtopf.jstree != null)) { if (chmtop.c2wtopf.FITEMS[chmtop.c2wtopf.pagenum] != chmtop.c2wtopf.pageid) chmtop.c2wtopf.jstree.OpenTreeNode("" + chmtop.c2wtopf.pageid); } <!-- CHM2WEB --><!-- DO NOT DELETE OR MODIFY THIS CODE WITHOUT WRITTEN PERMISSION OF A!K RESEARCH LABS -->