Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

1 REPLY 1

ThomasZloch
Active Contributor
0 Kudos

You are seriously asking where to enter ABAP code in SAP? Sorry, this is not the place to learn the absolute basics, please search for information and attend training courses.

Thread locked.

Thomas