简体   繁体   English

使用Java代码从SAP读取IDOC

[英]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. 我正在尝试使用JCoidoc 3.0.11 lib从SAP读取Idoc,但是我面临一些挑战。 First setting the parameters for BCE.jcoDestination and MYSERVER.jcoServer, please advise what the parameters mean and if possible supply an example. 首先设置BCE.jcoDestination和MYSERVER.jcoServer的参数,请告知参数的含义,并在可能的情况下提供示例。

Second, reading idoc from SAP, how to approach that? 其次,从SAP阅读idoc,该如何处理?

Currently I am using the example in SAPJCoidoc.zip, using file IDocServerExample.java. 当前,我正在使用文件IDocServerExample.java在SAPJCoidoc.zip中使用示例。

First of all, " reading an IDoc from SAP " is not possible! 首先,“ 从SAP读取IDoc ”是不可能的! (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...) (好吧,如果您拥有R / 3系统基础数据库的数据库用户和密码,然后在存储IDoc数据的DB表上执行直接SELECT语句,就可以绕过SAP系统...!但我希望这不是您要尝试做的事情... :-)这会让您陷入更深的麻烦...)

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). 您只能“将IDoc发送到SAP”(= Java端是RFC客户端)或“等待SAP将IDoc发送给您”(= Java端是RFC服务器)。

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. 在您的情况下,使用IDocServerExample时,您似乎要等待IDoc从SAP发送到服务器程序。 In that case the JCo parameters you need are explained in the JCo JavaDoc of the interface ServerDataProvider. 在这种情况下,所需的JCo参数在ServerDataProvider接口的JCo JavaDoc中进行了说明。 Just take a look there, it even has some examples. 只是看看那里,它甚至有一些例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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