2023 Apr 18 2:54 AM
I am trying to get column and relationship info from the Data dictionary tables such as DD03L and DD08L. For most transparent tables (eg ILOA or IMRG) the TABNAME value is not the actual physical table name ( eg "ILOA"), but something like "/SAPWF/ILOA_________________00" or "/SAPDII/IMRG". Can anyone tell me how to correlate these TABNAME values with the real table name? Is there another DD table that stores this? I am limited to just using real tables in the database to get this information, I cant rely on running Transactions.
Thanks
2023 Apr 18 8:06 AM
So you're talking about foreign keys. What you say is confusing. In fact "ILOA" does have lines in DD03L and DD08L. I guess you mean that "/SAPWF/ILOA_________________00" is present in DD03L but absent in DD08L.
Now concerning the question how to link these DD tables, the view DD05Q will help you, but it's not fully exact for all cases e.g. it gives wrong result concerning the column EANLH-ANLAGE because the check table EANL contains a .INCLUDE and positions of columns are shifted by 1. Look at DD05Q and you'll better understand.
EDIT: after discussion below, you confirmed that DD03L contains "ILOA", but you were confused that the texts of columns were absent in DD03T. Yes, the texts of DD03L columns don't exist in DD03T for columns which are linked to DATA ELEMENTS. DD03T is only for columns without data elements. For columns with data elements, you must query the text from these data elements = table DD04T.
2023 Apr 18 8:06 AM
So you're talking about foreign keys. What you say is confusing. In fact "ILOA" does have lines in DD03L and DD08L. I guess you mean that "/SAPWF/ILOA_________________00" is present in DD03L but absent in DD08L.
Now concerning the question how to link these DD tables, the view DD05Q will help you, but it's not fully exact for all cases e.g. it gives wrong result concerning the column EANLH-ANLAGE because the check table EANL contains a .INCLUDE and positions of columns are shifted by 1. Look at DD05Q and you'll better understand.
EDIT: after discussion below, you confirmed that DD03L contains "ILOA", but you were confused that the texts of columns were absent in DD03T. Yes, the texts of DD03L columns don't exist in DD03T for columns which are linked to DATA ELEMENTS. DD03T is only for columns without data elements. For columns with data elements, you must query the text from these data elements = table DD04T.
2023 Apr 19 4:56 AM
Thanks for the reply. My question is about the key values for the TABNAME field being different in two related tables, eg DD03L has a key value of ILOA in TABNAME column, DD03T has values such as
/SAPWF/ILOA_________________00,
/SAPWF/ILOA_________________01
Do you have any idea how that strange foreign key in DD03T is generated?
Thanks
2023 Apr 19 6:44 AM
DD03T also has entries with TABNAME = 'ILOA'.
The important thing: what is making you think that the values like /SAPWF/ILOA_________________00 entries in DD03T are related to ILOA entries in DD03L?
2023 Apr 20 1:05 AM
In our copy of sap database, DD03T has no entries where TBNAME = 'ILOA'. If I filter like this:
SELECT * FROM ids.DD03T WHERE TABNAME LIKE N'%ILOA%' AND DDTEXT <> N''
there are 145 rows, and the tab name value is one of these:
/SAPWF/ILOA_________________00
/SAPWF/ILOA_________________01
/SAPWF/ILOA_________________02
I am trying to build an app that extract long file name descriptions for columns in a table, looks like I cant join directly between dd03l and dd03t based on TABNAME column. Just wondering what the /SAPWF/ bit means, and also the ___00, ___01 etc.
Thanks
2023 Apr 20 9:34 AM
Sorry, my mistake, I said DD03T, but I thought DD03L.
Yes, the texts of DD03L columns don't exist in DD03T if the columns are linked to DATA ELEMENTS. DD03T is only for columns without data elements. For columns with data elements, you must query the text from these data elements = DD04T.
2023 Apr 18 2:17 PM
Use a FM such as DDIF_TABL_GET, or analyze it to replicate its behavior.
2023 Apr 19 8:50 AM
2023 Apr 20 1:08 AM
Thanks Giusseppi. I am only interested in TRANSP tables (actual tables in the Database), trying to get the columns for those table and the long text description for the columns out of DDL03T.
2023 Apr 20 10:31 AM
Be aware that DD03T will only contain text for fields not linked to a data element, so either DD03T or DD04T.
2023 Apr 20 10:51 AM
After seeing the goal behind the question, I guess, raymond.giuseppi 's answer is the most useful one.
Advice marcus_scholz : for the next time, provide us some more information: what are you trying to do, what did you tried and what results you had, etc 😉
2023 Apr 20 12:36 PM
2023 Apr 21 12:01 AM
Sandras answer is the best, I am not interested in querying tcodes or running functions, my solution is purely at the database level.