Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to use RFC_READ_TABLE with the tSAPInput component.
Can anyone explain me, how I must set the parameters for this RFC?
Which inputs parameters do I have to set, in order to pick only certain
fields out of a table (delimitation 512 characters) and how can I implement
a filter?
Thanks in advance.
com.sap.mw.jco.IFunctionTemplate functionTemplate_tSAPInput_1 = repository_tSAPInput_1
.getFunctionTemplate("RFC_READ_TABLE");
com.sap.mw.jco.JCO.Function function_tSAPInput_1 = functionTemplate_tSAPInput_1
.getFunction();
com.sap.mw.jco.JCO.ParameterList importParameterList_tSAPInput_1 = function_tSAPInput_1
.getImportParameterList();
com.sap.mw.jco.JCO.ParameterList exportParameterList_tSAPInput_1 = function_tSAPInput_1
.getExportParameterList();
com.sap.mw.jco.JCO.ParameterList tableParameterList_tSAPInput_1 = function_tSAPInput_1
.getTableParameterList();
importParameterList_tSAPInput_1.setValue("", "DELIMITER");
importParameterList_tSAPInput_1.setValue("", "NO_DATA");
importParameterList_tSAPInput_1.setValue("ZEEIN", "QUERY_TABLE");
importParameterList_tSAPInput_1.setValue(10, "ROWCOUNT");
importParameterList_tSAPInput_1.setValue(0, "ROWSKIPS");
com.sap.mw.jco.JCO.Table table_input_table_tSAPInput_1 = tableParameterList_tSAPInput_1
.getTable("FIELDS");
table_input_table_tSAPInput_1.appendRow();
table_input_table_tSAPInput_1.setValue("ZDATUM", "FIELDNAME");
table_input_table_tSAPInput_1.setValue(0, "OFFSET");
table_input_table_tSAPInput_1.setValue(8, "LENGTH");
table_input_table_tSAPInput_1.setValue("CHAR", "TYPE");
table_input_table_tSAPInput_1.setValue("ZDATUM", "FIELDTEXT");
client_tSAPInput_1.execute(function_tSAPInput_1);
table_input_table_tSAPInput_1.appendRow();
table_input_table_tSAPInput_1.setValue("ZDATUM", "FIELDNAME");
table_input_table_tSAPInput_1.setValue(0, "OFFSET");
table_input_table_tSAPInput_1.setValue(8, "LENGTH");
table_input_table_tSAPInput_1.setValue("CHAR", "TYPE");
table_input_table_tSAPInput_1.setValue("ZDATUM", "FIELDTEXT");
table_input_table_tSAPInput_1.setValue("LFDNR", "FIELDNAME");
table_input_table_tSAPInput_1.setValue(0, "OFFSET");
table_input_table_tSAPInput_1.setValue(3, "LENGTH");
table_input_table_tSAPInput_1.setValue("CHAR", "TYPE");
client_tSAPInput_1.execute(function_tSAPInput_1);