前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP JCO的下载,安装,配置和使用

SAP JCO的下载,安装,配置和使用

作者头像
Jerry Wang
发布2020-08-10 11:17:03
1.1K0
发布2020-08-10 11:17:03
举报

This blog can be used as a very simple tutorial for those guys who are new to JCO. It demonstrates how to download and configure the JCO in your laptop. A simple consumption from JAVA side to call a remote function module in ABAP side is done to verify the correctness of the configuration.

(1) download SAP JCO3.0 from service marketplace

Choose the proper file according to your OS to download:

Unzip the downloaded file, create a new folder and put the dll and jar file into the folder.

add your local folder path to PATH environment variable:

maintain the absolute path for jar file as value for CLASSPATH:

Note: there is a folder javadoc after downloaded file is unzipped and it contains detailed information about JCO like installation guide, API documentation and sample code etc.

(2) Create a new Java project. Right click on project and click “Property”.

Add the JCO jar file to the project by clicking button “Add External JARs”.

(3) Create a simple remote function module in ABAP. The function module just accepts the product ID passed from JAVA side, and query against it in database table COMM_PRODUCT, and return the query result which will be fetched via JCO in JAVA side. Never forget to mark the “Remote enabled Function module” flag.

(4) copy the attached JAVA source code to your project.

For demonstration purpose, the sample code just use a local file to store ABAP destination configuration which would lead to security issues and should not be used in productive code.

Just specify your own ABAP system information and your user credentials in the sample code:

in the test code, we hard code the product ID as ARNO_TEST004. Here below is the execution result, the detail information of this product is returned to JAVA side:

We can compare it with the information in SE16, and they are exactly the same:

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-08 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档