Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard deep nested data type?

Tags:

abap

pyrfc

saprfc

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?

like image 954
guettli Avatar asked Oct 04 '19 11:10

guettli


2 Answers

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.

like image 127
koks der drache Avatar answered Sep 18 '22 18:09

koks der drache


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.

like image 43
Sandra Rossi Avatar answered Sep 20 '22 18:09

Sandra Rossi