Hi all,
i am in a peculiar problem.I have to go through a hell lots (50+) of ztable and find the domian used and corresponding data element.
going thorugh SE11 and finding the things are going to take lots of time.
i have a report program , sending it to you, it displays details of info of listed table.
just run the report.
but the thing is , it rerieves the data type, instead of data element and domain.
somehow if i get those two things(domian & data element instead of data type of each field) , my work will be easier.
i will simply run this report and download the content of the priniting internal table int an excel ****.
can you just do some modification in this report to print DATA ELEMENT AND DOMAINS OF RESPECTIVE.
here it is ,
REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING
LINE-SIZE 178 LINE-COUNT 65.
TABLES: DD03L, DD04T, DD02T, DD02L.
SELECT-OPTIONS: TABNAME FOR DD02L-TABNAME.
*SELTEXT E 'SAP Table Name(s)'
DATA: BEGIN OF TAB OCCURS 500,
TABNAME LIKE DD03L-TABNAME,
POSITION LIKE DD03L-POSITION,
FIELDNAME LIKE DD03L-FIELDNAME,
STXT LIKE DD04T-DDTEXT,
KEYFLAG LIKE DD03L-KEYFLAG,
DATATYPE LIKE DD03L-DATATYPE,
LENG LIKE DD03L-LENG,
DECIMALS LIKE DD03L-DECIMALS,
CHECKTABLE LIKE DD03L-CHECKTABLE,
REFTABLE LIKE DD03L-REFTABLE,
REFFIELD LIKE DD03L-REFFIELD,
END OF TAB.
DATA: LINE-COUNT TYPE I.
SELECT * FROM DD03L WHERE TABNAME IN TABNAME.
MOVE-CORRESPONDING DD03L TO TAB.
IF TAB-FIELDNAME CS '.inc'.
ELSE.
SELECT * FROM DD04T WHERE ROLLNAME = DD03L-ROLLNAME
AND DDLANGUAGE = SYST-LANGU
AND AS4LOCAL = 'A'.
ENDSELECT.
IF SYST-SUBRC = 0.
TAB-STXT = DD04T-DDTEXT.
ENDIF.
APPEND TAB.
ENDIF.
ENDSELECT.
DESCRIBE TABLE TAB LINES LINE-COUNT.
IF LINE-COUNT EQ 0.
MESSAGE E009 WITH 'Table Not Found'.
ENDIF.
SORT TAB BY TABNAME POSITION.
LOOP AT TAB.
ON CHANGE OF TAB-TABNAME.
NEW-PAGE. "Page Break for New Table
ENDON.
WRITE: / TAB-FIELDNAME, 20 TAB-STXT,
81 TAB-KEYFLAG, 85 TAB-DATATYPE,
90 TAB-LENG, 100 TAB-DECIMALS,
110 TAB-CHECKTABLE,
121 TAB-REFTABLE,
132 TAB-REFFIELD.
ENDLOOP.
TOP-OF-PAGE.
FORMAT INTENSIFIED OFF.
WRITE: / SY-REPID,
'Run by', SY-UNAME(8), 'on', SY-DATUM, SY-UZEIT,
'System', SY-SYSID(4), 'Client', SY-MANDT.
WRITE: / SY-TITLE CENTERED.
FORMAT INTENSIFIED ON.
*include zconinc3.
FORMAT INTENSIFIED OFF.
CLEAR DD02T.
SELECT * FROM DD02T WHERE TABNAME EQ TAB-TABNAME
AND DDLANGUAGE EQ SYST-LANGU
AND AS4LOCAL EQ 'A'.
ENDSELECT.
CLEAR DD02L.
SELECT * FROM DD02L WHERE TABNAME EQ TAB-TABNAME
AND AS4LOCAL EQ 'A'.
ENDSELECT.
WRITE: / 'Table Name ', TAB-TABNAME,
'Type=', DD02L-TABCLASS,
DD02T-DDTEXT.
WRITE: / 'Field', 20 'Description',
81 'Key', 75 'Type',
90 'Length', 100 'Decimals',
110 'Check Table',
121 'REF Table',
132 'REF Field'.
FORMAT INTENSIFIED ON.