2005 Nov 02 7:30 AM
hai Tech pals,
i have a table , i need to get Transactions , in which it is used.
se49 , or FM RS_PROGRAM_TABLES is not sufficient.
Observe: <b>i have table , i need Transactions by which these transactions are formed</b>
eg : table t001z , in which transacations , this table is used. I need list of transactions .
Thanks in advance.
balaji.
hai Tech pals,
i have a table , i need to get Transactions , in which it is used.
se49 , or FM RS_PROGRAM_TABLES is not sufficient.
Observe: <b>i have table , i need Transactions by which these transactions are formed</b>
eg : table t001z , in which transacations , this table is used. I need list of transactions .
Thanks in advance.
balaji.
2005 Nov 02 7:35 AM
Tables are linked to programs which are in turn linked to transactions. You can only find programs that use a table . Out of these programs you can pick up the main programs ( Reports / Module Pools/ Function Pools , not includes ) and do a where used for these for transactions .
However this will not give the exhaustive list as tables used in a function module will appear in Function Pool main program but there might be a case that the function pool does not have a tcode attached to it , but the functions within this function pool are used by many programs .
What is your specific requirement ??
Cheers.
2005 Nov 02 7:49 AM
hi sanjib ,
Thank you for quick reply.
i need to find Transactions, by any means directly for a table. I know this one. My Team leads wants it urgently.
Thank you.
2005 Nov 02 8:04 AM
There is no direct way . The linkage is -
Table -> Function Modules/ External Sub routines -> Main program -> Transaction.
Table -> Includes -> Main Program -> Transaction.
Table -> Main Program 1 -> Main program 2 ( this calls main program 1 using submit ) -> Transaction.
Table -> Main Program -> Transaction
You will have to find the tcodes from all the above paths if you want the exhaustive list. If you want the programs which update the table ( not just reference the table for reading data or for data declaration ) , you can do this by adding some key words like "INSERT" , "DELETE", "UPDATE" in the search area when you do a where used list in SE11 on table.
To search all the above paths you can also write an ABAP program which will be tedious I guess. Probably check with your team lead as to what exactly he/ she wants.
Cheers.
2005 Nov 02 8:48 AM
sanjib,
<i>Table -> Function Modules/ External Sub routines -> Main program -> Transaction.
Table -> Includes -> Main Program -> Transaction.
Table -> Main Program 1 -> Main program 2 ( this calls main program 1 using submit ) -> Transaction.
Table -> Main Program -> Transaction</i>
what is this path, i could not able to understand ,how i need to traverse to get my specific requuirement.
balaji.
2005 Nov 02 9:04 AM
Hi Balaji,
That was for your explanation on how tables are linked to various programs/ functions and the nesting there in .
A table can be used in an include program or a function module or an external subroutine or in a main program directly . These are various units of ABAP which can reference to a table. I hope you are aware of these.
A function module is also like an include program . So for a table you will have to find all programs that use it by where used list in SE11 . Individually for each program you will have to find whether its a function module or normal include or main program and then find the corresponding transaction if any . As you mention in your earlier message that you already know this I didnot elaborate . There can be report programs which are not linked to any transaction and can be executed using SE38 . So only programs are something which you can find for tables and this list will be exhaustive in SE11 where used . So I would say goback to your team lead and ask why he / she needs transactions ??????? There may be an easier solution if you know the purpose.
Cheers.
Sanjay
2005 Nov 02 7:40 AM
Hi Balaji,
As already mentioned, You can always find the Program name where this table has been used by the where used list option(Try checking the screens check-box), using that program name , you can go to the TSTC table and find the Transaction code for that Program.
Ravi
2005 Nov 02 8:59 AM
Hi Balaji,
We can't directly do where used list of tables for transactions. If you want you can write a small generic program. Here is the sample code.
Data : i_prog like d010tab occurs 0 with header line.
DATA : BEGIN OF I_TCODE OCCURS 0,
TCODE like tstc-TCODE,
END OF I_TCODE.
PARAMETERS: P_TAB LIKE DD02l-TABNAME OBLIGATORY.
Get the list of programs used this table
select * from
d010tab
into table i_prog
where TABNAME = p_tab.
if not i_prog[] is initial.
select tcode
from tstc
in to table i_tcode
for all entries in i_prog
where PGMNA = i_prog-master.
endif.
you have list of tcodes in the table i_tcode.
Hope this will help you.
Thanks & Regards,
Siri.
Message was edited by: Srilatha T
2005 Nov 02 10:29 AM
srilatha, ravi,sanjib ,
Thank you.
my Team lead said his requirement. he needs to think, t001-paval field , where it is used in which transaction .
Thing is, we have used <b>where used list</b> for PAVAL DATA ELEMENT, we are feeling , it is difficult to trace.
that's why , we are choosing short cut method any.
plz thing about it.
balaji.
2005 Nov 02 10:44 AM
Hi Balagi,
if you need to find the where used list for the
t001-paval field in the screens, after finding the
programs, call the below function module to get the
list of screen fields.
SELECT PROG
DNUM
INTO TABLE I_DNUM
FROM D020S
FOR ALL ENTRIES IN I_TCODE
WHERE PROG = I_TCODE-PGMNA.
IF NOT I_DNUM[] IS INITIAL.
LOOP AT I_DNUM.
V_PGMNA = I_DNUM-PROG.
V_DYPNO = I_DNUM-DNUM.
CLEAR : I_DYNP_FIELDS,I_LINE.
REFRESH : I_DYNP_FIELDS,I_LINE.
CALL FUNCTION 'DYNPRO_FIELD_GET'
EXPORTING
DYNPRO = V_DYPNO
PROGRAM = V_PGMNA
TABLES
DYNP_FIELDS = I_DYNP_FIELDS
LINES = I_LINE
EXCEPTIONS
DYNPRO_NOT_FOUND = 1
OTHERS = 2.
once you get the list of fileds you can easily make outthat field is used or not.
or if you want to find in the source code, after getting the programs, read the source code to itab and use search command to find the table-field.
you can also take the reference program RSRSCAN1.
Both the ways you can do where used list.
Hope this will solve your problem.Let me know if you want more info.
Thanks & Regards,
Siri.
2005 Nov 03 10:38 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |