简体   繁体   中英

Reading IDOC from SAP using Java Code

I am trying to read the Idoc from SAP using JCoidoc 3.0.11 lib, but I am facing some challenges. First setting the parameters for BCE.jcoDestination and MYSERVER.jcoServer, please advise what the parameters mean and if possible supply an example.

Second, reading idoc from SAP, how to approach that?

Currently I am using the example in SAPJCoidoc.zip, using file IDocServerExample.java.

First of all, " reading an IDoc from SAP " is not possible! (Ok, it would be possible, if you have the database user and password of the R/3 system's underlying database and then execute direct SELECT statements on the DB tables, where IDoc data is stored -- bypassing the SAP system...! But I hope, this is not what you are trying to do... :-) It would get you into deep deep trouble...)

You can only "send an IDoc into SAP" (= Java side is RFC client) or "wait for SAP to send an IDoc to you" (= Java side is RFC server).

In your case, as you are using the IDocServerExample, it looks like you want to wait for IDocs being sent from SAP to your server program. In that case the JCo parameters you need are explained in the JCo JavaDoc of the interface ServerDataProvider. Just take a look there, it even has some examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM