on 04-12-2007 6:51 AM
I am currently working 4.6C and would like to move from ABAP to java enviornment.
Please let me know whether to use JCo or JCA for java web based development.
Thanks,
Harsha
Hi Harsha,
I think i can give conn infor here itself.
<b>Jco conn from ABAP to Java</b>
=====================
You can use the JCO RFC Provider Service of the Web Application Server for your ABAP to Java calls.
The steps involved in that are
1. Configure destination in SM59 in SAP.
2. Create RFC Destination in Visual Admin.
3. Create a stateless session bean with JNDI name as the name of calling function module in SAP.
4. Add a business method public void processFunction(JCO.Funtion fn) which is called by the JCO RFC Provider Service. The name should be 'processFunction'.
5. Set library references in application-j2ee-engine.xml to type weak for the following
a. com.sap.mw.jco.
b. com.sap.tc.Logging (if you are using the logging api )
Here is the sample code for the EJB biz method
/**
Business Method.
*/
public void processFunction(JCO.Function function) {
try {
// Get the import parameters for the function module
JCO.ParameterList importList = function.getImportParameterList();
logger.infoT("The value sent is" +
(String)importList.getValue("USER_NAME"));
// Set the export parameter value for the function module
JCO.ParameterList export = function.getExportParameterList();
export.setValue("From EJB", "RETURN");
function.setExportParameterList(export);
}
catch (java.lang.Exception e) {
e.printStackTrace();
}
}
<b>Jco conn from Java to others(ex:ABAP)</b>
=====================-==========
Open Visual Admin(C:\usr\sap\SID\JCxx\j2ee\admin\go.bat) and connect to server
Go to Destinations service
Open HTTP Settings Tab
Add/Edit destination SLD_DataSupplier and type following values
URL http://xyz.corp:53000
Authentication - BASIC
User dynproxxx
Password - bp52st000
Press save and test (if you get response code 200 everything is o.k.)
Add/Edit other HTTP Destination named SLD_Client with the same values as SLD_DataSupplier:
URL http://xyz.corp:53000
Authentication - BASIC
User dynproxxx
Password - bp52st000
Press save and test (if you get response code 200 everything is o.k.)
Go to SLD Data Supplier service.
Press the button named: Send the Data to SLD and confirm triggering SLD Data transfer (if you receive successful message everything is o.k.).
===================
following blog might helpfull
=======================
/people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
for basic infor
==============
http://help.sap.com/saphelp_nw04s/helpdata/en/21/84570b3ae14e77b3047c82218974b9/frameset.htm
Award points if it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsha,
I think i can give conn infor here itself.
<b>Jco conn from ABAP to Java</b>
=====================
You can use the JCO RFC Provider Service of the Web Application Server for your ABAP to Java calls.
The steps involved in that are
1. Configure destination in SM59 in SAP.
2. Create RFC Destination in Visual Admin.
3. Create a stateless session bean with JNDI name as the name of calling function module in SAP.
4. Add a business method public void processFunction(JCO.Funtion fn) which is called by the JCO RFC Provider Service. The name should be 'processFunction'.
5. Set library references in application-j2ee-engine.xml to type weak for the following
a. com.sap.mw.jco.
b. com.sap.tc.Logging (if you are using the logging api )
Here is the sample code for the EJB biz method
/**
Business Method.
*/
public void processFunction(JCO.Function function) {
try {
// Get the import parameters for the function module
JCO.ParameterList importList = function.getImportParameterList();
logger.infoT("The value sent is" +
(String)importList.getValue("USER_NAME"));
// Set the export parameter value for the function module
JCO.ParameterList export = function.getExportParameterList();
export.setValue("From EJB", "RETURN");
function.setExportParameterList(export);
}
catch (java.lang.Exception e) {
e.printStackTrace();
}
}
<b>Jco conn from Java to others(ex:ABAP)</b>
=====================-==========
Open Visual Admin(C:\usr\sap\SID\JCxx\j2ee\admin\go.bat) and connect to server
Go to Destinations service
Open HTTP Settings Tab
Add/Edit destination SLD_DataSupplier and type following values
URL http://xyz.corp:53000
Authentication - BASIC
User dynproxxx
Password - bp52st000
Press save and test (if you get response code 200 everything is o.k.)
Add/Edit other HTTP Destination named SLD_Client with the same values as SLD_DataSupplier:
URL http://xyz.corp:53000
Authentication - BASIC
User dynproxxx
Password - bp52st000
Press save and test (if you get response code 200 everything is o.k.)
Go to SLD Data Supplier service.
Press the button named: Send the Data to SLD and confirm triggering SLD Data transfer (if you receive successful message everything is o.k.).
===================
following blog might helpfull
=======================
/people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
for basic infor
==============
http://help.sap.com/saphelp_nw04s/helpdata/en/21/84570b3ae14e77b3047c82218974b9/frameset.htm
Award points if it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsha,
I think You have to Use Jco. but before a JCo destination can be created, you must first have
created a Technical System in your System Landscape Directory
(SLD)
If you need any pdf let me know I will send you
reward points if it hepls
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.