on 06-10-2010 11:41 AM
Hi,
We have created a Web service from a java class using SAP Neatweaver developer studio. The web service works fine. It takes some inputs and makes changes to a java table stored on our SAP Enterprise Portal.
We would like to add the following functionality to the web service. We want the web service to connect to our ERP system and store some values there. Our ERP has an abap function module that can accept values and make the necessary changes.
Is there a way to do so?
Thanks in advanced
Hi,
If u are using CE NWDS, u can develop a composite application to import a BAPI and achieve the functionality.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have found that we must use SAP Java Connector but we cannot import the com.sap.nw.jco to the java class that we have created as web service using NW Developer Studio!
We can develop a Web dynpro project and create a model that will use the Function module but how can we call this project by the java class of the web service?
Hi,
we managed to import the com.sap.jco packages and we wrote the following code in our class (web service) :
Client client = JCO.createClient("200", "user", "password", "EL", "servername", "01");
client.connect();
Repository repository = new JCO.Repository("SAP", client);
IFunctionTemplate functionTemplate = repository.getFunctionTemplate("function_module");
Function function = functionTemplate.getFunction();
ParameterList parameterList = function.getImportParameterList();
parameterList.setValue("Value1", "Variable1");
parameterList.setValue("Value2", "Variable2");
parameterList.setValue("Value3", "Variable3");
parameterList.setValue("Value4", "Variable4");
client.execute(function);
The problem now is that we get the following message when we test the web service:
"An error has occurred. Maybe the request is not accepted by the server:
com/sap/mw/jco/JCO$BasicRepository"
Can anyone help us find the problem?
Thnaks in advanced.
Hi,
If we execute the above code with the NetBeans IDE the program runs succesfully.
The problem is when we use the NW Developer Studio. We must use the NW Developer Studio to deploy the code to the EP.
We tried to commend one by one the commands to find the spot that the program gives us the erroe
and we found that we get the error on the command:
"IFunctionTemplate functionTemplate = repository.getFunctionTemplate("function_module");"
How can we check if the SLD is configured with the system we want to connect to?
http://<hostname>:<portnumber>/sld
log in with administrator credentials and check under the "Systems" ,link.
Regards,
Poojith MV
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.