07-25-2005 10:25 PM
I need to know, How can i obtain a list from the SAP's Data Dictionary? I need the database tables and his fields specification.
Thank you.
Jesus Alen
07-26-2005 12:00 AM
The tables are...
<b>DD02L - SAP tables
DD02T - R/3 DD: SAP table texts
DD03L - Table Fields
DD03T - DD: Texts for fields (language dependent)
DD04L - Data elements
DD04T - R/3 DD: Data element texts
DD01L - Domains
DD01T - R/3 DD: domain texts
DD07L - R/3 DD: values for the domains
DD07T - DD: Texts for Domain Fixed Values (Language-Dependent)
Transparent tables can be identified using DD02L-TABCLASS = 'TRANSP'.</b>
hope that gives you some starting point. Joining the tables together is some thing you will have to do looking at the contents of the table and taking a sample table intoaccount.
Rishi
07-26-2005 12:00 AM
The tables are...
<b>DD02L - SAP tables
DD02T - R/3 DD: SAP table texts
DD03L - Table Fields
DD03T - DD: Texts for fields (language dependent)
DD04L - Data elements
DD04T - R/3 DD: Data element texts
DD01L - Domains
DD01T - R/3 DD: domain texts
DD07L - R/3 DD: values for the domains
DD07T - DD: Texts for Domain Fixed Values (Language-Dependent)
Transparent tables can be identified using DD02L-TABCLASS = 'TRANSP'.</b>
hope that gives you some starting point. Joining the tables together is some thing you will have to do looking at the contents of the table and taking a sample table intoaccount.
Rishi
07-26-2005 4:33 AM
Hi,
Here is the code sample to see the table and its field.If you double click the table name,then you can go to SE11 and see the field descriptions from the program itself.Kindly reward points if it is useful.
TABLES: DD02L,
DD02T,
DD03L,
DD04T.
DATA: BEGIN OF ITAB_TABLES OCCURS 0,
TABNAME LIKE DD02L-TABNAME,
END OF ITAB_TABLES.
DATA: FILEOPENCANCELLED.
SELECTION-SCREEN: COMMENT 1(80) TEXT-001, SKIP 1,
COMMENT 1(80) TEXT-002, SKIP 1.
PARAMETER: TBLNAME LIKE DD02L-TABNAME.
IF TBLNAME IS INITIAL.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'tablenames.txt'
IMPORTING
CANCEL = FILEOPENCANCELLED
TABLES
DATA_TAB = ITAB_TABLES.
IF NOT FILEOPENCANCELLED IS INITIAL.
EXIT.
ENDIF.
ELSE.
CLEAR ITAB_TABLES. REFRESH ITAB_TABLES.
ITAB_TABLES-TABNAME = TBLNAME.
APPEND ITAB_TABLES.
ENDIF.
SORT ITAB_TABLES.
DELETE ADJACENT DUPLICATES FROM ITAB_TABLES.
TRANSLATE ITAB_TABLES-TABNAME TO UPPER CASE.
SELECT TABNAME DDTEXT FROM DD02T
INTO CORRESPONDING FIELDS OF DD02T
FOR ALL ENTRIES IN ITAB_TABLES
WHERE TABNAME = ITAB_TABLES-TABNAME AND
DDLANGUAGE = 'E'.
FORMAT COLOR COL_KEY.
WRITE: / 'N ' AS SYMBOL,
DD02T-TABNAME RIGHT-JUSTIFIED, '-', DD02T-DDTEXT,
'? ' AS SYMBOL.
HIDE DD02T-TABNAME.
FORMAT COLOR OFF.
SELECT FIELDNAME ROLLNAME DATATYPE LENG DOMNAME FROM DD03L
INTO CORRESPONDING FIELDS OF DD03L
WHERE TABNAME = DD02T-TABNAME.
SELECT DDTEXT FROM DD04T
INTO CORRESPONDING FIELDS OF DD04T
WHERE ROLLNAME = DD03L-ROLLNAME AND
DDLANGUAGE = 'E'.
WRITE: /
DD03L-FIELDNAME, DD03L-ROLLNAME,
DD03L-DATATYPE, DD03L-LENG NO-ZERO,
DD03L-DOMNAME, (35) DD04T-DDTEXT.
ENDSELECT.
ENDSELECT.
ULINE.
ENDSELECT.
CLEAR DD02T-TABNAME.
AT LINE-SELECTION.
IF NOT DD02T-TABNAME IS INITIAL.
call function 'RS_DD_DEF_SHOW'
EXPORTING
OBJNAME = DD02T-TABNAME.
ENDIF.
CLEAR DD02T-TABNAME.
07-26-2005 9:24 AM
Hi.
If you use the table names from DD02L, you can then get the structure etc. using the Run Time Type System (RTTS):
DATA: l_tablename TYPE DD02L-TABNAME,
l_structdescr TYPE REF TO CL_ABAP_STRUCTDESCR,
l_comp_tab TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE.
l_structdescr ?= CL_ABAP_TABLEDESCR=>DESCRIBE_BY_NANE( l_tablename ).
l_comp_tab = l_structdescr->get_components( ).
07-26-2005 7:50 AM