cancel
Showing results for 
Search instead for 
Did you mean: 

JCo or JCA

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

praveenkumar_kadi
Active Contributor
0 Kudos

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

praveenkumar_kadi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thanks a ton Praveen, will get back to you If I need any other info.

Regards,

Harsha

praveenkumar_kadi
Active Contributor
0 Kudos

No reward points to this effort..!!!!

praveenkumar_kadi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

HI Praveen,

Thanks a ton, I did use the JCo breify for webbased report. I dont remenber

having created any SLD , could you send me some pdf please?

Regards,

Harsha