Skip to Content
0
Former Member
Mar 20, 2012 at 09:18 PM

How can i use the following abap code which gets all tables which has these fields

32 Views

How can i use the below code to see in what tables these two fields are: new to abap.
On sap what tcode should i use and where to paste or should i create something.

_______________________________________________________________________

DATA : itab TYPE STANDARD TABLE OF dd03vv WITH HEADER LINE.

SELECT * FROM dd03vv INTO TABLE itab WHERE fieldname EQ 'KUNNR' OR fieldname EQ 'KTOKD' and tabclass = 'TRANSP'.
SORT itab BY tabname fieldname.
DELETE ADJACENT DUPLICATES FROM itab COMPARING tabname fieldname.
LOOP AT itab WHERE fieldname = 'KUNNR'.
READ TABLE itab WITH KEY tabname = itab-tabname fieldname = 'KTOKD' BINARY SEARCH.
IF sy-subrc EQ 0.
WRITE : / itab-tabname.
ELSE.
DELETE itab.
ENDIF.
ENDLOOP.

_______________________________________________________________________


Thanks a lot for the helpful info.