CN102404356A - Long-distance function call transmission adapter and data reading method thereof - Google Patents
Long-distance function call transmission adapter and data reading method thereof Download PDFInfo
- Publication number
- CN102404356A CN102404356A CN201010278515XA CN201010278515A CN102404356A CN 102404356 A CN102404356 A CN 102404356A CN 201010278515X A CN201010278515X A CN 201010278515XA CN 201010278515 A CN201010278515 A CN 201010278515A CN 102404356 A CN102404356 A CN 102404356A
- Authority
- CN
- China
- Prior art keywords
- ftp
- transmission adapter
- server
- remote function
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Telephonic Communication Services (AREA)
Abstract
一种远程函数调用传送适配器及其读取数据的方法,包括:读取SAP系统输入给RFC传送适配器的原始有效载荷payload;解析所读取的原始payload,以得到数据的FTP路径以及文本文件名称,利用解析得到的FTP路径与文本文件名称连接至FTP服务器并读取FTP服务器中的文本文件;将所读取的文本文件转化为XML格式的文件;将转化后的XML格式的文件以及原始payload的内容作为新的payload,替换原始payload,提供给PI服务器。利用本发明可使传送适配器动态地读取文本文档。
A remote function call transmission adapter and a method for reading data thereof, comprising: reading the original payload payload input by the SAP system to the RFC transmission adapter; parsing the read original payload to obtain the FTP path and text file name of the data , use the parsed FTP path and text file name to connect to the FTP server and read the text file in the FTP server; convert the read text file into an XML format file; convert the converted XML format file and the original payload The content of is used as a new payload to replace the original payload and provided to the PI server. The invention can make the transmission adapter dynamically read the text document.
Description
技术领域 technical field
本发明涉及一种远程函数调用传送适配器及其读取数据的方法。The invention relates to a remote function call transmission adapter and a method for reading data.
背景技术 Background technique
目前,企业内部都有各自的应用系统,例如,工厂成品管理系统、原物料管理系统、采购系统、保税保税仓系统等,在将SAP里的数据传送到企业内部的各个应用系统中时,是将相同的资料传送至多个应用系统或应用系统群组中,该流程为RFC Outbound流程。RFC(remote function call远程函数调用)是一个SAP的接口协议,很大程度上简化了系统间通讯的编程工作,允许调用和执行一个远程系统,或者是相同系统上的预定义函数。其中,在该RFC Outbound流程中,要求在执行RFC时,动态录入资料所在的位置,这里指的是FTP(file transfer protocol,文件传输协议)路径,然后执行RFC,该RFC根据资料的位置自动读取资料并发送给流程整合(PI,process integration)服务器,也即将该FTP路径作为参数输入至PI服务器中的标准RFC Sender Adapter(RFC传送适配器)中,但PI服务器中的该标准RFC适配器只能接收RFC输入的参数(包含输入输出参数和表),将其转化为XML(extensible markup language,可扩展标记语言)文件,却不能通过该输入的参数(实际上为FTP地址,端口,用户名,密码,文件名称等),来动态的读取FTP文件。At present, enterprises have their own application systems, such as factory finished product management system, raw material management system, procurement system, bonded bonded warehouse system, etc. When transferring data from SAP to various application systems within the enterprise, it is Send the same data to multiple application systems or application system groups. This process is an RFC Outbound process. RFC (remote function call) is a SAP interface protocol, which greatly simplifies the programming work of communication between systems, allowing to call and execute a remote system, or a predefined function on the same system. Among them, in the RFC Outbound process, it is required to dynamically enter the location of the data when executing the RFC, which refers to the FTP (file transfer protocol, file transfer protocol) path, and then execute the RFC, which is automatically read according to the location of the data Get the data and send it to the process integration (PI, process integration) server, that is, input the FTP path as a parameter into the standard RFC Sender Adapter (RFC transfer adapter) in the PI server, but the standard RFC adapter in the PI server can only Receive RFC input parameters (including input and output parameters and tables), convert them into XML (extensible markup language, extensible markup language) files, but cannot pass the input parameters (actually FTP address, port, user name, Password, file name, etc.), to dynamically read FTP files.
发明内容 Contents of the invention
鉴于以上内容,有必要提供一种远程函数调用传送适配器及其读取数据的方法,让远程函数调用传送适配器可以动态的读取FTP文件。In view of the above, it is necessary to provide a remote function call transmission adapter and a method for reading data, so that the remote function call transmission adapter can dynamically read FTP files.
一种远程函数调用传送适配器,位于流程整合PI服务器中,该PI服务器分别与SAP系统以及目标系统通讯连接,所述的SAP系统将传送给目标系统的数据以文本文件格式存放在FTP服务器上。该远程调用传送适配器包括:读取模块,用于读取SAP系统输入给远程函数调用传送适配器的原始有效载荷payload,所述原始payload的内容由要传送至目标系统的数据的参数构成,该参数包括存放数据的FTP地址、端口、用户名、密码以及文件名称;解析模块,用于解析所读取的原始payload,以得到传送至目标系统的数据的FTP路径以及文本文件名称;调用模块,用于利用解析得到的FTP路径连接至FTP服务器,以及根据解析得到的文本文件名称读取FTP服务器中的文本文件;所述调用模块,还用于将所读取的文本文件转化为可扩展标记语言XML格式的文件;处理模块,用于将转化后的XML格式的文件以及输入远程函数调用传送适配器的参数作为新的payload,替换原始payload,以提供给PI服务器。A remote function call transmission adapter is located in the process integration PI server, and the PI server is respectively connected to the SAP system and the target system in communication, and the SAP system stores the data transmitted to the target system on the FTP server in a text file format. The remote call transmission adapter includes: a reading module, used to read the original payload payload input by the SAP system to the remote function call transmission adapter, the content of the original payload is composed of parameters of data to be transmitted to the target system, the parameters Including the FTP address, port, user name, password and file name where the data is stored; the parsing module is used to parse the read original payload to obtain the FTP path and text file name of the data transmitted to the target system; the calling module is used to It is used to connect to the FTP server by using the FTP path obtained by parsing, and read the text file in the FTP server according to the text file name obtained by parsing; the calling module is also used to convert the read text file into Extensible Markup Language A file in XML format; a processing module, configured to use the transformed file in XML format and the parameters input to the remote function call transfer adapter as a new payload to replace the original payload, so as to provide it to the PI server.
一种远程函数调用传送适配器读取数据的方法,应用于流程整合PI服务器中,该PI服务器分别与SAP系统以及目标系统通讯连接,所述的SAP系统将传送给目标系统的数据以文本文件TXT格式存放在FTP服务器上。该方法包括步骤:a.读取SAP系统输入给远程函数调用传送适配器的原始有效载荷payload,所述原始payload的内容由要传送至目标系统的数据的参数构成,该参数包括存放数据的FTP地址、端口、用户名、密码以及文件名称;b.解析所读取的原始payload,以得到传送至目标系统的数据的FTP路径以及文本文件名称;c.利用解析得到的FTP路径连接至FTP服务器;d.根据解析得到的文本文件名称读取FTP服务器中的文本文件;e.将所读取的文本文件转化为可扩展标记语言XML格式的文件;f.将转化后的XML格式的文件以及输入远程函数调用传送适配器的参数作为新的payload,替换原始payload,以提供给PI服务器。A method for reading data by a remote function call transmission adapter, which is applied to a process integration PI server, and the PI server is respectively connected to a SAP system and a target system for communication, and the SAP system transmits data to the target system in a text file TXT The format is stored on an FTP server. The method comprises the steps of: a. reading the original payload payload that the SAP system inputs to the remote function call transmission adapter, the content of the original payload is composed of parameters of data to be transmitted to the target system, and the parameters include an FTP address for storing the data , port, user name, password and file name; b. parse the read original payload to obtain the FTP path and text file name of the data transmitted to the target system; c. use the parsed FTP path to connect to the FTP server; d. read the text file in the FTP server according to the text file name obtained by parsing; e. convert the read text file into a file in Extensible Markup Language XML format; f. convert the converted XML format file and input The remote function call passes the parameters of the adapter as a new payload, replacing the original payload, to be provided to the PI server.
相较于现有技术,所述远程函数调用传送适配器及其读取数据的方法,让远程函数调用传送适配器能通过输入的参数(实际上为FTP地址,端口,用户名,密码,文件名称等),来读取FTP服务器上的文本文件,增强了传送适配器的功能。Compared with the prior art, the remote function call transmission adapter and the method for reading data thereof allow the remote function call transmission adapter to pass input parameters (actually FTP address, port, user name, password, file name, etc.) ), to read text files on the FTP server, and enhance the function of the transmission adapter.
附图说明 Description of drawings
图1是本发明远程函数调用传送适配器较佳实施例的架构图。FIG. 1 is an architecture diagram of a preferred embodiment of the remote function call transmission adapter of the present invention.
图2是本发明远程函数调用传送适配器系统较佳实施例的功能模块图。Fig. 2 is a functional block diagram of a preferred embodiment of the remote function call transmission adapter system of the present invention.
图3是本发明远程函数调用传送适配器读取数据的方法较佳实施例的流程图。FIG. 3 is a flow chart of a preferred embodiment of the method for reading data by the remote function call transmission adapter of the present invention.
主要元件符号说明Description of main component symbols
具体实施方式 Detailed ways
如图1所示,是本发明RFC传送适配器的较佳实施例的架构图。所述的远程函数调用传送适配器(remote function call sender adapter,RFCSender Adapter)21(以下简称“RFC传送适配器21”)运行于PI(流程整合,process integration)服务器2中。所述的PI服务器是SAP(systemsapplications and products in data processing)系统1与目标系统3之间的中间件。通过PI服务器2可以将SAP系统1中的数据传输至目标系统3中,PI服务器2能与SAP系统1中的产品(软件)整合,也能与目标系统3(PI服务器2与SAP系统1之外的第三方系统)中的产品(软件)进行互连。所述目标系统3包括企业内部的多个应用系统,例如,工厂成品管理系统、原物料管理系统、保税仓系统等。As shown in FIG. 1 , it is a structural diagram of a preferred embodiment of the RFC transmission adapter of the present invention. The remote function call sender adapter (remote function call sender adapter, RFCSender Adapter) 21 (hereinafter referred to as "RFC
所述的SAP系统1包括了Report程序10以及RFC(remote functioncall,远程函数调用)接口11。所述的SAP系统1通过Report程序10读取用户输入的要传送至目标系统3的数据的参数,该数据的参数实际上包括数据的FTP地址、端口、用户名、密码以及文件名称等,以及读取要传送至目标系统3的对应于上述参数的数据。所述的SAP系统1根据所述的数据的参数(例如FTP地址等),将该所读取的数据以文本文档(TXT)的格式存储于FTP服务器4上。所述的RFC接口11为PI服务器2和SAP系统1之间的通信接口。所述的SAP系统1调用该RFC接口11,可以将所述传输给目标系统3的数据的参数输入给PI服务器2中的RFC传送适配器21。所述的RFC传送适配器21将输入的数据的参数读进PI服务器2进行后续的整合流程。在本发明中所述SAP系统1调用RFC接口11将要传输至目标系统3的数据的参数作为原始Payload(有效载荷),该原始payload的格式为XML(extensible markup language,可扩展标记语言)格式。该原始payload中的内容由输入给RFC传送适配器21的参数构成。Described SAP system 1 has included
所述RFC传送适配器21包括函数库22。该函数库22中存储了多个类,包括实现接口的类、TXT转化成XML类、以及FTP工具类等。所述实现接口的类用于提供接口使RFC传送适配器21中各个模块能够与RFC传送适配器21相互通信,以实现该RFC传送适配器21能够动态地读取FTP服务器4上的文本文档的功能。所述的TXT转化成XML类用于将TXT格式的文件转化为XML格式的文件。所述的FTP工具类用于连接FTP服务器4,并且以UTF8编码方式(一种储存和传送的格式)读取FTP服务器4中文本文件中的内容。The RFC
如图2所示,是本发明传送适配器较佳实施例的架构图。所述的RFC传送适配器21还包括调用模块210、读取模块212、解析模块214以及处理模块216。As shown in FIG. 2 , it is a structure diagram of a preferred embodiment of the transmission adapter of the present invention. The RFC
所述的调用模块210用于调用函数库22中实现接口的类,提供接口使RFC传送适配器21中各个模块能够与RFC传送适配器21相互通信,以实现该RFC传送适配器21能够动态地读取FTP文件的功能。The
所述的读取模块212,用于读取SAP系统1输入RFC传送适配器21的XML格式的原始payload,原始payload的内容由输入RFC传送适配器21的参数构成。该原始参数包括存放数据的FTP地址、端口、用户名、密码以及文件名称等参数。The
所述的解析模块214用于解析所读取的XML格式的原始payload,以得到要传输至目标系统3的数据的FTP路径以及文本文件名称。The
所述的调用模块210还用于调用函数库22中的FTP工具类,以利用解析得到的FTP路径连接至FTP服务器4,且根据解析得到的文本文件名称读取FTP服务器4中的文本文件。The
所述的调用模块210还用于从函数库22中调用TXT转化成XML类,将所读取的文本文件转化为XML格式的文件。The
所述的处理模块216用于将转化后的XML格式的文件以及输入RFC传送适配器21的参数(即原始payload中的内容)作为新的payload,替换原始payload,以提供给PI服务器2继续后续的整合流程。The
需要说明的是,在其他实施例中,上述各个模块及函数库也可以外挂于该RFC传送适配器21,实现动态读取FTP服务器4上的文本文档。It should be noted that, in other embodiments, the above-mentioned modules and function libraries can also be plugged into the RFC
如图3所示,是本发明远程函数调用传送适配器读取数据的方法较佳实施例的流程图。As shown in FIG. 3 , it is a flow chart of a preferred embodiment of the method for reading data by the remote function call transmission adapter of the present invention.
步骤S10,所述的调用模块210调用函数库22中的实现接口的类,提供接口使RFC传送适配器21中各个模块能够与RFC传送适配器21相互通信,以实现该RFC传送适配器21能够动态地读取FTP服务器4上的文本文档的功能。Step S10, the
步骤S11,所述的读取模块212读取SAP系统1输入RFC传送适配器21的XML格式的原始payload,原始payload的内容由输入RFC传送适配器21的参数构成。该原始参数包括存放数据的FTP地址、端口、用户名、密码以及文件名称等参数。Step S11 , the
步骤S12,所述的解析模块214解析所读取的XML格式的原始payload,以得到要传输至目标系统3的数据的FTP路径以及文本文件名称。Step S12, the
步骤S13,所述的调用模块210从函数库22中调用FTP工具类,利用解析得到的FTP路径连接至FTP服务器4。Step S13, the
步骤S14,根据解析得到的文本文件名称,所述的调用模块210读取FTP服务器4中的文本文件TXT。Step S14, according to the name of the text file obtained through parsing, the
步骤S15,所述的调用模块210从函数库22中调用将TXT转化为XML类,将所读取的文本文件转化为XML格式的文件。Step S15, the
步骤S16,所述的处理模块216将转化后的XML格式的文件以及输入RFC传送适配器21的参数(即原始payload中的内容)作为新的payload,替换原始payload,以提供给PI服务器2继续后续的整合流程。Step S16, the
以上实施方式仅用以说明本发明的技术方案而非限制,尽管参照以上较佳实施方式对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换都不应脱离本发明技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced All should not deviate from the spirit and scope of the technical solution of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010278515.XA CN102404356B (en) | 2010-09-10 | 2010-09-10 | Long-distance function call transmission adapter and data reading method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010278515.XA CN102404356B (en) | 2010-09-10 | 2010-09-10 | Long-distance function call transmission adapter and data reading method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102404356A true CN102404356A (en) | 2012-04-04 |
| CN102404356B CN102404356B (en) | 2014-12-31 |
Family
ID=45886142
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201010278515.XA Expired - Fee Related CN102404356B (en) | 2010-09-10 | 2010-09-10 | Long-distance function call transmission adapter and data reading method thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102404356B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103778357A (en) * | 2014-01-21 | 2014-05-07 | 国家电网公司 | Method for controlling RFC (remote function call) authority between SAP (systems, applications and products in data processing) systems |
| CN105335310A (en) * | 2014-06-05 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Interface defining method, and data transmission method and apparatus |
| CN106569789A (en) * | 2015-10-13 | 2017-04-19 | 北京国双科技有限公司 | Task submission method and apparatus |
| CN109327546A (en) * | 2018-11-21 | 2019-02-12 | Oppo(重庆)智能科技有限公司 | A kind of method, client, MES and electronic equipment accessing ftp server |
| CN110658770A (en) * | 2019-10-22 | 2020-01-07 | 深圳市芝麻自动化科技有限公司 | SAP manufacturing execution system data processing interface driving method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100031233A1 (en) * | 2008-07-30 | 2010-02-04 | Sap Ag | Extended enterprise connector framework using direct web remoting (dwr) |
| CN101650648A (en) * | 2008-08-14 | 2010-02-17 | 鸿富锦精密工业(深圳)有限公司 | System and method for dynamically calling functional module |
-
2010
- 2010-09-10 CN CN201010278515.XA patent/CN102404356B/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100031233A1 (en) * | 2008-07-30 | 2010-02-04 | Sap Ag | Extended enterprise connector framework using direct web remoting (dwr) |
| CN101650648A (en) * | 2008-08-14 | 2010-02-17 | 鸿富锦精密工业(深圳)有限公司 | System and method for dynamically calling functional module |
Non-Patent Citations (2)
| Title |
|---|
| BRUNO MIGUEL BRITO DE GOUVEIA: "《Implementation of an Electronic Invoice Solution using the BizTalk Service Oriented Architecture》", 30 October 2008, article "state of the electronic invoicing systems in Europe and portugal" * |
| XU LI: "《Business Process Integration》", 30 March 2004, article "Process Integration Catalogue with XI", pages: 21 - 45 * |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103778357A (en) * | 2014-01-21 | 2014-05-07 | 国家电网公司 | Method for controlling RFC (remote function call) authority between SAP (systems, applications and products in data processing) systems |
| CN103778357B (en) * | 2014-01-21 | 2016-08-17 | 国家电网公司 | A kind of solve the method that RFC between SAP system calls authorization control |
| CN105335310A (en) * | 2014-06-05 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Interface defining method, and data transmission method and apparatus |
| CN106569789A (en) * | 2015-10-13 | 2017-04-19 | 北京国双科技有限公司 | Task submission method and apparatus |
| CN106569789B (en) * | 2015-10-13 | 2020-06-12 | 北京国双科技有限公司 | Task submission method and device |
| CN109327546A (en) * | 2018-11-21 | 2019-02-12 | Oppo(重庆)智能科技有限公司 | A kind of method, client, MES and electronic equipment accessing ftp server |
| CN110658770A (en) * | 2019-10-22 | 2020-01-07 | 深圳市芝麻自动化科技有限公司 | SAP manufacturing execution system data processing interface driving method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102404356B (en) | 2014-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107306263B (en) | A protocol conversion method, platform and protocol conversion gateway | |
| US9781189B2 (en) | Managed device-to-device communication in business computing systems | |
| EP3803578B1 (en) | Dynamic data transport between enterprise and business computing systems | |
| CN111683066B (en) | Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium | |
| US8954602B2 (en) | Facilitating communication between enterprise software applications | |
| US20080094205A1 (en) | Wireless sensor framework | |
| CN102402541B (en) | File analysis system and method | |
| CN102404356A (en) | Long-distance function call transmission adapter and data reading method thereof | |
| CN103747004A (en) | Realizing method of internet of things communication protocol | |
| CN1574795A (en) | System and method for using packed compressed buffers for improved client server communication | |
| CN108243022B (en) | A network service message transmission method, device, terminal and server | |
| EP1619663A1 (en) | Speech enabled computing system | |
| CN104935499A (en) | Message format conversion method and equipment | |
| CN113051202A (en) | Interface adaptation method, device, electronic equipment and computer readable storage medium | |
| CN102779071A (en) | Method, device and system for calling software interface | |
| CN106941501A (en) | A data communication method and device | |
| CN107800552A (en) | A kind of data interactive method and device | |
| CN102377738A (en) | Process integration server and method for realizing system integration by utilizing process integration server | |
| CN110324280A (en) | Protocol configuration systems, devices and methods in industrial cloud | |
| CN110099033B (en) | Lower frame mechanism | |
| CN102135988A (en) | Data query method and client | |
| CN101399656A (en) | Data synchronization method and system in synchronization makeup language | |
| CN114201275A (en) | Data migration method, device, equipment and storage medium | |
| CN117574870A (en) | Contract agreement generation system and method | |
| CN105024923A (en) | XMPP extensible message-based method and device for realizing message classification |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141231 Termination date: 20150910 |
|
| EXPY | Termination of patent right or utility model |