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 find list of transactions for a given component

Former Member
0 Kudos
3,718

Is there any table that holds information about transactions.

My requirement is to retrieve all transactions for a particular component.e.g. list fo transactions for SD or MM.

I am into java and have need to develop a program to retrieve teh above information using sap jco.

Hence if there is any RFC or table holding this info please let me know.

Thanks and Regards,

MNGHosh

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,194

Hey

The table TSTC stores the details of every transaction but its not specific regarding the modules .

for eg : giving input as V * will probably give u the t codes related to SD , n giving M* for MM ,but wat about the t cod ewhich are used in integration as OBYC which is used in MM and FI integration .

Please specify the the inputs ...!

Hope it wiil bbe useful .

Regards

Swapnil

16 REPLIES 16

Former Member
0 Kudos
1,195

Hey

The table TSTC stores the details of every transaction but its not specific regarding the modules .

for eg : giving input as V * will probably give u the t codes related to SD , n giving M* for MM ,but wat about the t cod ewhich are used in integration as OBYC which is used in MM and FI integration .

Please specify the the inputs ...!

Hope it wiil bbe useful .

Regards

Swapnil

Former Member
0 Kudos
1,194

ghosh

all the transactions in sap are in the table TSTC. u can get details of all of them there.

if u want specific to a module like SD,MM and FI then fetch the values based on the conditions like for SD transaction starting with "V%" for MM its "M%".

hope it gives some solution to ur prblm.

pelase allocate points to useful answers and close the thread if u r done.

0 Kudos
1,194

THere are many tables starting with TSTC* to know transaction code details.

TSTC: Tcode details

TSTCT : TCode text

TSTCC, TSTC_SRT etc,,,

as per above methods you can pass a name and add * to it to get all relevant tcodes.

else:

goto SE80 tcode: give the package name(need sap functional or technical help), then see all the tcodes in that package

0 Kudos
1,194

Thanks for the information.

I am trying to find a generalised logic through which I can invoke RFC_READ_TABLE from java using sap jco and retrieve this information.

Will try out the tables mentioned by you.

Edited by: MNGhosh on Sep 15, 2009 7:31 AM

0 Kudos
1,194

Thanks for the information.

I am trying to find a generalised logic through which I can invoke RFC_READ_TABLE from java using sap jco and retrieve this information.

Will try out the tables mentioned by you.

Edited by: MNGhosh on Sep 15, 2009 7:32 AM

0 Kudos
1,194

in this FM :RFC_READ_TABLE

pass

QUERY_TABLE                     TSTC

and in options table pass exactly this

TCODE like 'VA%'

and execute.

you will get all the details in

FIELDS                             0 Entries
                  Result:           6 Entries
 DATA                               0 Entries
                  Result:           61 Entries

0 Kudos
1,194

That was very helpful.

There is one open question here wrt to the code snippet that you have provided.

My java program retrieves the list of all the sap components and displays to the user.

The user then selects a particular component.

Now if I use the above code to fetch all tcodes for the selected component,currently, with limited SAP knowledge I know that for SD I will set VA% and for MM its MM%.What about other components.

Which table can give me this information so that I can come to a generalised logic.

sreeramkumar_madisetty
Active Contributor
0 Kudos
1,194

Hi

Let me explain this witha na example.

Let us assume that one developer received a requirement on Material Management Module.

(Create Material)

Step1:

Go to the Transaction Code : SDMO.

Step2 :

Execute SDMO Tcode from SE93 or Press /nSDMO

Step3:

It will prompts for you a Dynamic menu with text box.

Step3 :

Enter your required description in that text box and press F8 or press execute button.

Here Iu2019m entering u201CMaterialu201D as description and pressing F8.

Step5 :

We will get the list of Transaction Codes associated with the description u201CMaterialu201D as Follows.

Step6 :

In the above list, we will get all Transaction Codes associated with the description u201CMaterialu201D

Search for your required transaction code based on your need.

Suppose if our requirement is to create a material then search with the word u201Ccreateu201D in the above list.

Step7 :

It will gives you the sub list of Transaction codes associated with Material and Create search terms

Step6 :

In the above list, we will get all Transaction Codes associated with the description u201CMaterialu201D

Search for your required transaction code based on your need.

Suppose if our requirement is to create a material then search with the word u201Ccreateu201D in the above list.

Step7 :

It will gives you the sub list of Transaction codes associated with Material and Create search terms.

Step8 :

If you observe the list, we got many Transaction Codes including

MM01 u2013 Create Material in the Sub list.

In this way we will get the required Transaction Code using the description only.

This is applicable to any module.

Regards,

Sreeram

0 Kudos
1,194

Thanks for responding to my query.

What you have suggested is wrt to SAP GUI.

My requirement is to retrieve the list of Transactions for a given component using sap JCO.

As I am developing java program that fetches the list of sap components and displays to the user. The user then selects a particular component and then I need to retrieve the list of transctions for that component.

Using RFC_READ_TABLE I can read the tcodes from TSTC.However, the question here is twhat needs to be passed in the Option.

How do I know or is there a table that tells me that for SD I need to set OPTION as TCODE like 'VA%' and for MM I need to set the OPTION as TCODE like 'MM%' .

Being a java developer, I have limited knowledge of SAP. Hence it would be very helpful if you can tell me which table or rfc can give me this info for all teh components

0 Kudos
1,194

Hi

The table DF14L~PS_POSID holds the application component. So if your invoking application component (like SD, MM... ) from your Java interface.

Just try to incorporate this logic in your FM:

TABLES: DF14L, TSTC.

DATA: BEGIN OF ITAB OCCURS 0,
          TCODE LIKE TSTC-TCODE,
      END OF ITAB.

PARAMETERS: P_APPL TYPE DF14L-PS_POSID.

SELECT PS_POSID FROM DF14L INTO DF14L-PS_POSID WHERE PS_POSID = P_APPL.

ENDSELECT.

IF DF14L-PS_POSID = 'SD'.

    SELECT TCODE FROM TSTC INTO TABLE ITAB WHERE TCODE LIKE 'VA%'.

ELSEIF DF14L-PS_POSID = 'MM'.

    SELECT TCODE FROM TSTC INTO TABLE ITAB WHERE TCODE LIKE 'MM%'.

ENDIF.

LOOP AT ITAB.
  WRITE:/ ITAB-TCODE.
ENDLOOP.

0 Kudos
1,194

Thanks for your help .Will try this out.

However, how do Iknow that for SD I need to set TCODE in where clause to 'VA%' and for MM its 'MM%' ?

0 Kudos
1,194

Hi

Why can't u try the Transaction : SDMO to get the required Tcodes in any modules.

Regards,

Sreeram

0 Kudos
1,194

MNGhosh ,

as i suggested before

call the FM

RFC_READ_TABLE

this has some import, ,and table parameters which you can pass and retrieve values..right?

for FM RFC_READ_TABLE

in import parameter :

QUERY_TABLE : you will pass 'tstc'

and in tables parameters:

there is one table called OPTIONS.

this options table has only one column as TEXT.

so you need to pass : TCODE LIKE 'VA%' to this TEXT field of the OPTIONS table.

now on execution you will get values in the table parameter: DATA

any more confusion please revert back

---

and for knowing which module holds which tcodes you need to consult SAP functional people who use the tcodes and you can also search in web about tcodes for each module. which will give you idea about tcodes of each module

Edited by: Soumyaprakash Mishra on Sep 15, 2009 1:00 PM

0 Kudos
1,194

My requirement here is to invoke some RFC from java layer and get the details . Hence I am looking for some standard RFC as this will be a all java program where I need to use only the standard RFC.Or if there is a table which has this info I can read it using RFC_READ_TABLE.

I am not into SAP hence have limited knowledge.Hence not sure if theres a way to retrieve information by invoking a transaction from java layer.

0 Kudos
1,194

I am clear on this.

My question here is how do I know that for SD I need to pass VA and for MM i need to pass MM% in OPTIONS. Is this information available in any of the tables.I would need to know the same for other components as well.

0 Kudos
1,194

Thanks for the help.

The second part of your answer is what I was looking for inorder to use the RFC mentioned by you in a more generalised manner.