Skip to Content
author's profile photo Former Member
Former Member

data element-reward point guranteed

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 09:26 AM

    Here you go:

    REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING

    LINE-SIZE 255 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,

    rollname like dd03l-rollname,

    domname like dd04l-domname,

    END OF TAB.

    DATA: LINE-COUNT TYPE I.

    SELECT * FROM DD03L WHERE TABNAME IN TABNAME.

    MOVE-CORRESPONDING DD03L TO TAB.

    select single domname from dd04l into tab-domname

    where rollname = dd03l-rollname.

    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,

    tab-rollname,

    tab-domname.

    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',

    141 'Data Element',

    172 'Domain'.

    FORMAT INTENSIFIED ON.

    Message was edited by: Erik Verbeeck

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 09:43 AM

    Just try this sample code for a list of tables.

    <b>

    REPORT ZTEST .

    TABLES DD03M.

    DATA IT LIKE DD03M OCCURS 0 WITH HEADER LINE.

    SELECT-OPTIONS S_TAB FOR DD03M-TABNAME.

    SELECT * FROM DD03M INTO TABLE IT WHERE TABNAME IN S_TAB

    AND DDLANGUAGE EQ SY-LANGU.

    SORT IT BY TABNAME POSITION.

    LOOP AT IT.

    AT NEW TABNAME.

    SKIP.

    ENDAT.

    WRITE :/ IT-TABNAME , IT-ROLLNAME , IT-DOMNAME.

    ENDLOOP.</b>

    Cheers.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.