5

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.

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.

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.

Which data type in SAP contains a lot of nested data types? And maybe a lot of different data types?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
guettli
  • 25,042
  • 81
  • 346
  • 663

5 Answers5

5

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. 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.

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). On my system the maximum depth is 12.

Edit: If you cannot access se16h, here's a workaround: Call se37 and execute SE16N_START with I_HANA = 'X'. If you cannot access se37 use sa38 and call RSFUNCTIONBUILDER (the report behind se37).

PS: The requests on DD03VV are awfully slow, probably due to missing optimzation for complex requests on ABAP dictionary views.

koks der drache
  • 1,398
  • 1
  • 16
  • 33
3

If I had to give only one DDIC structure, I would give this one:

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).

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.

There are also these structures (column "TABNAME") with fields of some interest:

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. They used to exist in ABAP basis 7.02 and 7.52.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • Can data types like "ref to class" get used in RFC? – guettli Oct 04 '19 at 12:40
  • 2
    No, data and object references can't be used in RFC -> I remove them from my answer. As FDT_TEST_DDIC_BIND_DEEP_S contains some references, you'll have to copy it and remove the reference fields. – Sandra Rossi Oct 04 '19 at 13:38
1

Try the function module RFC_METADATA_TEST... It has some deeply nested parameters.

Lanzelot
  • 15,976
  • 4
  • 18
  • 14
0

In Se80 under Enterpise service browser, you will find examples of Proxy structures that are complex DDIC structures. With many different types.

Example edo_tw_a0401request Just browse around, you will find something you like.

phil soady
  • 11,043
  • 5
  • 50
  • 95
0

I found STFC_STRUCTURE in the docs of test_datatypes of PyRFC.

Works find for testing, since it is already available in my SAP system. I don't need a dummy rfc for testing. Nice.

guettli
  • 25,042
  • 81
  • 346
  • 663