Skip to Content
0
Former Member
Aug 12, 2004 at 06:49 PM

JCO to access BAPI

35 Views

Hi,

I am trying to access an BAPI which has an Import parameter as an Table "ORDERDATA". So i need to form the Table with the values entered in the textboxes in Portal to send the Import input Table while calling a BAPI.

Can someone help me out to Create an Table "Ord_Table" with 5 fields or more so that i can pass it as an import to the function module?

JCO.Function function = repository.getFunctionTemplate("Z_ORDER_CREATE").getFunction();

JCO.ParameterList input = function.getImportParameterList();

input.setValue(<b>Ord_Table</b> , "ORDERDATA");

client = JCO.getClient(SID);

client.execute(function);

JCO.Structure ret=function.getExportParameterList().getStructure("RETURN");

System.out.println("RETURN MESSAGE: " + ret.getString("MESSAGE"));

JCO.Table code=function.getTableParameterList().getTable("STATUS");

Thank you

arun