I am trying to upload some data into the SAP tables using JCO and Java. The data is getting uploaded successfully into a SAP structure from which it is supposed to be moved into a SAP master table (I am assuming this as successful as after updating the data into the structure I am able to read them back in my java code). However, the data does not seem to move from the structure to the master table. My SAP colleague says me that the data moves into master table appropriately when she tries to move the data from the struture into the master table using SAP screens. Can you please suggest what could be the possible reason for this.
The java code that I have written for this is as below
JCO.addClientPool(?SAPConPool?, <SAPPoolSize>, <SAPClient>, <SAPUserName>, <SAPPassword>, ?EN?, <SAPHostString>, ?00?);
com.sap.mw.jco.JCO.Client aSAPConnection = JCO.getClient(?SAPConPool?);
com.sap.mw.jco.IRepository aSAPRepository = new JCO.Repository(?REPOS_NAME?, aSAPConnection);
com.sap.mw.jco.IFunctionTemplate ftemplate = aSAPRepository.getFunctionTemplate(?<RFC PROGRAM NAME>?);
com.sap.mw.jco.JCO.Function jcoFunction = new com.sap.mw.jco.JCO.Function(ftemplate);
com.sap.mw.jco.JCO.Table aTable = jcoFunction.getTableParameterList().getTable(?<SAP TABLE NAME>?);
aTable.appendRow();aTable.setValue(?<field1Value>?, ?<field1Name>?);aTable.setValue(?<field2Value>?, ?<field2Name>?);
Thanks and Regards,
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!