[英]SAP RFC parameters and tables hierarchie and name uniqueness
I am working on an interface for communicating with SAP RFC functions.我正在开发一个与 SAP RFC 函数通信的接口。 I have some questions regarding parameter hierarchy and uniqueness of parameter and table naming to which I can't seem to find an answer anywhere online.
我有一些关于参数层次结构以及参数和表命名的唯一性的问题,我似乎无法在网上的任何地方找到答案。
Are the deep hierarchical structures allowed when communicating via RFC?通过 RFC 进行通信时是否允许使用深层层次结构? Here are some examples of input parameters:
以下是输入参数的一些示例:
Example A (Structure within Structure):示例 A(结构中的结构):
Field F1 Field F2 Structure S1 Field S1.F1 Structure S1.S1 Field S1.S1.F1 Field S1.S1.F2 Field S1.F2 Field S1.F3
Example B (Table within Structure):示例 B(结构中的表):
Field F1 Field F2 Structure S1 Field S1.F1 Table S1.T1 Structure S1.T1.S1 (Row 1) Field S1.T1.S1.F1 Field S1.T1.S1.F2 Structure S1.T1.S2 (Row 2) Field S1.T1.S2.F1 Field S1.T1.S2.F2 Field S1.F2 Field S1.F3
Example C (Table within Table):示例 C(表中表):
Field F1 Field F2 Table T1 Structure T1.S1 (Row 1) Field T1.S1.F1 Table T1.S1.T1 Structure T1.S1.T1.S1 (Row 1) Field T1.S1.T1.S1.F1 Field T1.S1.T1.S1.F2 Structure T1.S1.T1.S2 (Row 2) Field T1.S1.T1.S2.F1 Field T1.S1.T1.S2.F2 Structure T1.S2 (Row 2) Field T1.S2.F1 Table T1.S2.T1 Structure T1.S2.T1.S1 (Row 1) Field T1.S2.T1.S1.F1 Field T1.S2.T1.S1.F2 Structure T1.S2.T1.S2 (Row 2) Field T1.S2.T1.S2.F1 Field T1.S2.T1.S2.F2
Are the names of fields, structures and tables per hierarchical level unique?每个层次级别的字段、结构和表的名称是否唯一? Or are the tables handled separately and could for example have the same name as a field or a structure?
或者这些表是单独处理的,例如可以与字段或结构具有相同的名称?
RFC, including parameter types, is described in the documentation of each RFC Interface (documentation in each programming language RFC SDK, or ABAP documentation ). RFC,包括参数类型,在每个 RFC 接口的文档中都有描述(每种编程语言的文档 RFC SDK 或ABAP 文档)。 You may use RFC both as client and server.
您可以将 RFC 用作客户端和服务器。
If you use RFC SDK (any programming language except ABAP) to create an RFC server (to expose RFC functions), I guess the types of the parameters support the same types as in ABAP (but I can't be sure so please refer to the documentation of each SDK in case of exceptions).如果您使用 RFC SDK(除 ABAP 之外的任何编程语言)来创建 RFC 服务器(以公开 RFC 功能),我猜参数的类型支持与 ABAP 中相同的类型(但我不能确定所以请参考每个 SDK 的文档,以防出现异常)。
In ABAP, you can know the types of parameters supported in RFC by combining these two articles:在ABAP中,结合这两篇文章可以知道RFC中支持的参数类型:
If you don't have the time to combine them, here's a summary of parameter types for RFC-enabled function modules:如果您没有时间组合它们,这里是支持 RFC 的 function 模块的参数类型摘要:
The rows of one table all have the same type, so your diagrams mentioning S1 and S2 are incorrect, you could just mention S1.一个表的行都具有相同的类型,所以你的图表提到 S1 和 S2 是不正确的,你可以只提到 S1。 Note that a table parameter can have lines also of type elementary and table.
请注意,表格参数也可以包含元素和表格类型的行。
Here is an example of valid parameters of an RFC-enabled function module:以下是启用 RFC 的 function 模块的有效参数示例:
Field F1
Structure S1
Field S1.F1
Structure S1.S1
Field S1.S1.F1
Table T1
Structure T1.S1
Field T1.S1.F1
Table T2
Field T2.F1
Table T3
Table T3.T1
Field T3.T1.F1
Table T1
Structure T1.S1
Field T1.S1.F1
Table T2
Field T2.F1
Table T3
Table T3.T1
Field T3.T1.F1
Reference:参考:
- Pass-by value must be selected for the IMPORTING, EXPORTING, and CHANGING parameters of a remote-enabled function module.
必须为远程启用的 function 模块的 IMPORTING、EXPORTING 和 CHANGING 参数选择传递值。 This cannot be specified explicitly for TABLES parameters, but are used implicitly for RFC.
这不能为 TABLES 参数显式指定,但隐式用于 RFC。
- *The formal parameter of a remote-enabled function module must be typed using data types from ABAP Dictionary or using predefined ABAP types.
*远程启用的 function 模块的形式参数必须使用 ABAP 字典中的数据类型或使用预定义的 ABAP 类型进行类型化。 Data types from type groups cannot be specified.
无法指定类型组中的数据类型。
- No reference variables can be passed in RFCs.
不能在 RFC 中传递参考变量。 The formal parameters of a remote-enabled function module cannot, therefore, be typed using a reference type.
因此,远程启用的 function 模块的形式参数不能使用引用类型来键入。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.