简体   繁体   English

标准的深度嵌套数据类型?

[英]Standard deep nested data type?

I took the nice example clientPrintDescription.py and create a HTML form from the description which matches the input data types for the particular RFC function.我采用了很好的示例clientPrintDescription.py并根据与特定 RFC function 的输入数据类型匹配的描述创建了 HTML 表单。

In SAP data types can contain data types which can contain data types, and I want to test my HTML form generator with a very nested data type.在 SAP 数据类型中可以包含可以包含数据类型的数据类型,我想用非常嵌套的数据类型测试我的 HTML 表单生成器。

Of course I could create my own custom data type, but it would be more re-usable if I would use an existing (rfc-capable) data type.当然,我可以创建自己的自定义数据类型,但如果我使用现有的(支持 rfc 的)数据类型,它会更可重用。

Which data type in SAP contains a lot of nested data types? SAP 中哪种数据类型包含大量嵌套数据类型? And maybe a lot of different data types?也许有很多不同的数据类型?

I cannot tell which structure is the best for your case but you could filter the view DD03VV (now that is a meaningful name) using the transaction se16h .我无法判断哪种结构最适合您的情况,但您可以使用事务se16h过滤视图DD03VV (现在这是一个有意义的名称)。 If you GROUP BY the column TABNAME and filter on WHERE TABCLASS = 'INTTAB' the number of entries is an indicator for the size of the structure.如果您GROUP BYTABNAME分组并在WHERE TABCLASS = 'INTTAB'上进行过滤,则条目数是结构大小的指标。

You could also aggregate and in a next step filter on the maximum DEPTH value (like a SQL HAVING , which afaik does not exist in SAP R/3).您还可以聚合并在下一步过滤最大DEPTH值(如 SQL HAVING ,在 SAP R/3 中不存在 afaik)。 On my system the maximum depth is 12.在我的系统上,最大深度是 12。

Edit : If you cannot access se16h , here's a workaround: Call se37 and execute SE16N_START with I_HANA = 'X' .编辑:如果您无法访问se16h ,这里有一个解决方法:调用se37并使用I_HANA = 'X'执行SE16N_START If you cannot access se37 use sa38 and call RSFUNCTIONBUILDER (the report behind se37 ).如果您无法访问se37 ,请使用sa38并调用RSFUNCTIONBUILDERse37后面的报告)。

PS: The requests on DD03VV are awfully slow, probably due to missing optimzation for complex requests on ABAP dictionary views. PS: DD03VV上的请求非常慢,可能是由于缺少对 ABAP 字典视图上复杂请求的优化。

If I had to give only one DDIC structure, I would give this one:如果我必须只给出一个 DDIC 结构,我会给出这个:

FDT_TEST_DDIC_BIND_DEEP_S

It contains many elements of miscellaneous types, including nested ones, and it exists in any ABAP-based system (it belongs to the "BASIS" layer).它包含许多杂项类型的元素,包括嵌套的元素,并且存在于任何基于 ABAP 的系统中(它属于“BASIS”层)。

As it contains some data and object references in sub-levels which are invalid in RFC, you'll have to copy it and remove those reference fields.由于它包含在 RFC 中无效的子级别中的一些数据和 object 引用,因此您必须复制它并删除这些引用字段。

There are also these structures (column "TABNAME") with fields of some interest:还有一些结构(列“TABNAME”)具有一些感兴趣的字段:

TABNAME               FIELDNAME      Description
--------------------  -------------  ------------------------------------------------
SFW_BF                FROM_RELEASE   elementary built-in type
SAUNIT_S_ALERT        WHEN           data element 
SAUNIT_S_ALERT        HEADER         structure 
SAUNIT_S_ALERT        TEXT_INFOS     table type
SAUNIT_PROG_INFO      .INCLUDE       include structure SAUNIT_S_TADIR_KEY
SKWF_IOFLD            .INCLU-FLD     include structure SKWF_IO
SWFEXPSTRU2           .INCLU--AP     append structure SWFEXPSTRU3
APPEND_BAPI0002_2_2   .APPEND_DU     append structure recursive (append of BAPI0002_2) (unique component of APPEND_BAPI0002_2_2)
SOADDRESS                            Structure with nested structures on 2 levels

Some structures may not be valid in some ABAP releases.某些结构在某些 ABAP 版本中可能无效。 They used to exist in ABAP basis 7.02 and 7.52.它们曾经存在于 ABAP 基础 7.02 和 7.52 中。

Try the function module RFC_METADATA_TEST... It has some deeply nested parameters.试试 function 模块 RFC_METADATA_TEST... 它有一些深度嵌套的参数。

In Se80 under Enterpise service browser, you will find examples of Proxy structures that are complex DDIC structures.在Se80 的Enterpise 服务浏览器下,您会找到属于复杂DDIC 结构的Proxy 结构的示例。 With many different types.有许多不同的类型。

Example edo_tw_a0401request Just browse around, you will find something you like.示例edo_tw_a0401request随便浏览一下,你会找到你喜欢的。

I found STFC_STRUCTURE in the docs of test_datatypes of PyRFC.我在STFC_STRUCTUREtest_datatypes的文档中找到了 STFC_STRUCTURE。

Works find for testing, since it is already available in my SAP system.可以找到用于测试的工作,因为它已经在我的 SAP 系统中可用。 I don't need a dummy rfc for testing.我不需要一个虚拟的 rfc 来进行测试。 Nice.好的。

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

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