tree: c78976f317ff83aebcc41d0270116cd0bcf3e757 [path history] [tgz]
  1. lib/
  2. readme.assets/
  3. src/
  4. .gitignore
  5. pom.xml
  6. readme.md
sapjcoserver/readme.md

Integrate Sap JCOServer with Springboot and Apache Camel

The usecase

SAP ABAP RFC call -> SpringBoot+ApacheCamel -> FileSystem

I wrote a springboot+Apachecamel Application to demonstrate how to receive the ABAP function's result and store it at file system.

prepare sap jco connector libs

copy jco jars, .dll (for windows), and .so(for linux) files to lib directory as below shown

image-jco lib

run apache camel springboot application

For linux

export ASHOST=<jco client ashost>
export GWHOST=<jco server gwhost>

For windows

set ASHOST=<jco client ashost>
set GWHOST=<jco server gwhost>

run test

mvn -Dtest=sample.camel.SampleJCOServerApplicationTests   test

run program

mvn spring-boot:run 

image-1

execute ABAP function in SAP System

Execute Tcode se37 -> STFC_CONNECTION (SAP default Test Function) 

image-2

put RFC Target System (it is ...not... as same as progid configured in application.yaml file) and input parameter image-3

check result and output

You will see ABAP function's result at console image-4

The result of ABAP function is also stored as file by camel in your local computer where your java program runs image-5