I went through the JCo tutorial.pdf. I am trying to run the example in TutorialBapi2.java. It is working fine....
As you mentioned in the tutorial on page 4: "Changes in SAP will only happen if you call an RFM that uses a table parameter you pass to it in order to update the database". I am not clear which RFM that would be. Since I am not following the steps I am not able to update the changes into the database. I want to know now how to update into the SAP using JCo. I am doing the following things in your example program:
codes = function.getTableParameterList().getTable("COMPANYCODE_LIST"); codes.setRow(2); codes.deleteRow(); codes.deleteRow(5); codes.appendRow(); codes.setValue("P001", "COMP_CODE"); codes.setValue("POL", "COMP_NAME"); codes.appendRows(2); codes.setValue("P002", "COMP_CODE"); codes.setValue("NUC", "COMP_NAME"); codes.nextRow(); codes.setValue("P003", "COMP_CODE"); codes.setValue("RKS", "COMP_NAME");
I need to update the changes into SAP. What is the step i need to follow
Company code P001 does not exist
Company code P002 does not exist
How do I avoid this error?
There has to be a BAPI or other RFM that deals with the specific requirement. In the case of company codes, no such BAPI exists. So, unless you want to build your own BAPI, this simply cannot be done.
Dig Deeper on SAP Java and J2EE
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.