What we are going to do

We're going to demo how to send IDOCs from SAP to Java CAPS 6. In this scenario, the SAP system plays the role of an airline. Java CAPS 6 plays the role of a travel agency. The travel agency is subscribing to a data feed from each airline, so that the travel agency can arrange travels with connecting flights from different companies. The data feed from the airline contains all flight information for this airline company. Flight updates are dispatched using this data feed. This scenario has been created by SAP to be used in training courses and demo of SAP integration technologies. You can find more information on this scenario here

SAP Installation and configuration

I have implemented this demo using "SAP NetWeaver 2004s ABAP Trial Version" available from SAP here
This is a fully functional SAP system that you can install in less than one hour.
The configuration of SAP to exchange (send and receive) IDOCs is not very straightforward but it is well documented in a lot of places including Java CAPS 5.1.3 documentation here. Let me know if you need specific details.

Java CAPS 6 Configuration

The configuration of Java CAPS 6 to receive IDOCs from SAP involves the 2 adapters: ALE Adapter and BAPI/RFC Adapter.
The BAPI/RFC Adapter is used to connect to SAP and receive the IDOCs as "BLOBs" of data. It does not parse the IDOC and does not understand its structure. The ALE Adapter on the other hand can parse IDOCs but does not have any connectivity. The following diagram from the Java CAPS documentation illustrates these 2 layers.

 

You need to configure Java CAPS and the BAPI/RFC Adapter as in my previous blog entry . I am still using Java CAPS 6 Early Adopter 2.
The screencast demonstrates how to create the Java CAPS project and send IDOCs from SAP to Java CAPS. It shows how to extract the IDOC format definition from SAP and how to add business logic using the fields of the IDOC. It shows how to configure the TRFC connectivity between SAP and Java CAPS.


This screenshot presents the IDOC format in Java CAPS:

 


This screenshot presents how to extract fields from the IDOC format in the Java collaboration editor:

 



This screenshot presents the BPEL process used to connect SAP and Java CAPS:

 


 



You can download the screencast here. This is a hefty 10MB file.
You can view it online here. It was captured at 1024x780, the optimal size for viewing
You can download the Java CAPS 6 project here

Summary

This screencast demonstrates a simple but fully operational scenario where we send data from SAP to Java CAPS using SAP IDOCs. This demo represents the basic features you would use in a real project.

 

In a real project the business logic involved in processing IDOCs would be more complex, not just using 2 fields. In addition, you would send the data to another system, not just writing to the log file as in my demo. Moreover you would typically handle different types of IDOC, for example master data for vendor, customers and products and purchase orders. You would need to dispatch the different types to different processing codes. You would typically mix different connectivity types, including SAP RFC calls, SAP RFC table lookups, SAP BAPIs and IDOC to and from SAP.

 

 

Comments:

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by Eric Lerognon