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 to retrieve the tables from database related to specific modules?

Former Member
0 Kudos

Hi All,

D

How to retrieve the tables from database related to specific modules like SD, MMu2026?

Suppose I would like to retrieve all the tables to relate to SD Module.

Pls let me knowu2026

Puppy.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

create a new program write the following code given below which will give you all the records...

PARAMETERS : p_mod(10) TYPE c.

DATA : t_devc TYPE TABLE OF tdevc,
         t_df14l TYPE TABLE OF df14l,
         t_tadir TYPE TABLE OF tadir,
         t_dd02l TYPE TABLE OF dd02l,
         fs_tadir type tadir,
         fs_dd02l TYPE dd02l.

DATA : BEGIN OF fs,
        tabname TYPE tabname,
      END OF fs.

DATA : itab LIKE TABLE OF fs.

DATA : w_module TYPE string.

BREAK-POINT.
CONCATENATE p_mod '%' INTO w_module.

SELECT fctr_id FROM df14l INTO TABLE t_df14l WHERE ps_posid LIKE
w_module.

SELECT devclass FROM tdevc INTO TABLE t_devc FOR ALL ENTRIES IN t_df14l
  WHERE component = t_df14l-fctr_id.

SELECT pgmid object obj_name FROM tadir INTO TABLE t_tadir FOR ALL
ENTRIES IN t_devc
  WHERE pgmid = 'R3TR' AND object = 'TABL'
    AND devclass = t_devc-devclass.

LOOP AT t_tadir INTO fs_tadir.
  MOVE fs_tadir-obj_name TO fs-tabname.
  APPEND fs TO itab.
ENDLOOP.

SELECT tabname FROM dd02l INTO TABLE t_dd02l FOR ALL ENTRIES IN itab
WHERE tabname = itab-tabname AND tabclass = 'TRANSP'.

LOOP AT t_dd02l INTO fs_dd02l.
  WRITE / fs_dd02l-tabname.
ENDLOOP.

Regards,

Siddarth

10 REPLIES 10

GauthamV
Active Contributor
0 Kudos

Plz SEARCH in SCN you will get tables related to all modules.

Former Member
0 Kudos

hi,

i didnt get the answer in SCN search, thats why only i have posted the query.

Puppy.

Former Member
0 Kudos

HI,

There are many posts related to SD, MM , FI etc tables.

you need to search properly.

any how just check this link

about the FI, MM, SD tables, and many more

http://www.abap.es/Descargas/TAB%20-%20Relacion%20de%20las%20tablas%20por%20modulos.PDF

Regards,

Venkatesh

Former Member
0 Kudos

I think you did'nt understood, what im trying to ask you..

your answer is not solved my question..? pls keep quiet, if you dont know, some other will answer.

Puppy.

GauthamV
Active Contributor
0 Kudos

Use DB15 transaction.

You can get all tables based on Object related to a module.

For example give MM_MATNR for material master tables.

Former Member
0 Kudos

Puppy Koleti,

Your check this link ..

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e944e133-0b01-0010-caa2-be2cb240f657]

And you try this T.Code also DB15 .

Regards

Ansari.

Former Member
0 Kudos

use tcode SE84

Expand folder "Abap Dictionary"

enter 'SD' in 'Application Component' field in selection screen or use F4 to select application component

execute.

u will get all tables in SD

Former Member
0 Kudos

Hi,

create a new program write the following code given below which will give you all the records...

PARAMETERS : p_mod(10) TYPE c.

DATA : t_devc TYPE TABLE OF tdevc,
         t_df14l TYPE TABLE OF df14l,
         t_tadir TYPE TABLE OF tadir,
         t_dd02l TYPE TABLE OF dd02l,
         fs_tadir type tadir,
         fs_dd02l TYPE dd02l.

DATA : BEGIN OF fs,
        tabname TYPE tabname,
      END OF fs.

DATA : itab LIKE TABLE OF fs.

DATA : w_module TYPE string.

BREAK-POINT.
CONCATENATE p_mod '%' INTO w_module.

SELECT fctr_id FROM df14l INTO TABLE t_df14l WHERE ps_posid LIKE
w_module.

SELECT devclass FROM tdevc INTO TABLE t_devc FOR ALL ENTRIES IN t_df14l
  WHERE component = t_df14l-fctr_id.

SELECT pgmid object obj_name FROM tadir INTO TABLE t_tadir FOR ALL
ENTRIES IN t_devc
  WHERE pgmid = 'R3TR' AND object = 'TABL'
    AND devclass = t_devc-devclass.

LOOP AT t_tadir INTO fs_tadir.
  MOVE fs_tadir-obj_name TO fs-tabname.
  APPEND fs TO itab.
ENDLOOP.

SELECT tabname FROM dd02l INTO TABLE t_dd02l FOR ALL ENTRIES IN itab
WHERE tabname = itab-tabname AND tabclass = 'TRANSP'.

LOOP AT t_dd02l INTO fs_dd02l.
  WRITE / fs_dd02l-tabname.
ENDLOOP.

Regards,

Siddarth

Former Member
0 Kudos

This message was moderated.

0 Kudos

Hi Jyothi,

just try to find where does MARA table come from se84.... actually it should come under LO module... but its not showing it there.... and MARA is a database table hope you know that....

so SE84 does not show the complete result... try to execute my program that will give you all the tables which lie under that component.

Regards,

Siddarth