cancel
Showing results for 
Search instead for 
Did you mean: 

Download DD03M table filtered on specific table automatically

former_member730404
Participant
0 Kudos

I have a list of table names, and I need to download their respective DD03M tables with the columns ROLLNAME REPTEXT and SCRTEXT_S. Preferably all going into the same file, however this is not necessary. Is it possible to do this automatically? I have hundreds of tables, so it would be tedious to do so manually.

This is needed because the current tables I have on my machine have their REPTEXT headers, but I need their ROLLNAME headers to be displayed instead. I have written a python program that can parse the file from the downloaded DD03M table and automatically alter the tables as needed.

I am having trouble getting the correct ROLLNAMES and REPTEXTS, however. If I do not filter DD03M by table, then the amount of data is too large, and I find that REPTEXTS and up being mapped to multiple different ROLLNAMES. I figured that filtering by table would allow me to extract only the data needed, however as I said, this would be tedious, as there are hundreds of tables that need to be filtered.

Is there any way to automate this process? I am new so I am a bit uninformed. Is it possible for ABAP or Python to accomplish this? Or a different method? Thanks

Sandra_Rossi
Active Contributor

So you have a Python program which works more or less, but you say "I am having trouble getting the correct ROLLNAME and REPTEXT values". So, could you explain what is your issue, precisely?

former_member730404
Participant
0 Kudos

Hi Sandra. My issue is that, without filtering the data, I would have REPTEXTS mapped to multiple different ROLLNAMES. Now, a solution to this would be to include the table name as a column in the DD04T table, that way my program would be able to tell which one applies to which table. However, as I mentioned in the post, without filtering, the DD04T file is just too large for SAP to handle. I currently have it at 999,999 entries, and it still misses some of the REPTEXTS in the tables. If I increase it to 9,999,999, then SAP fails to load the table, with a message saying there is too much data

Sandra_Rossi
Active Contributor

I don't understand why you don't select the lines you want instead of all?

Let me reuse Tuncay word, your question looks hypothetical and I still don't understand why you can't do so simple selections. After days of getting nowhere, maybe it's time that you post your code so that to clarify your problem?

former_member730404
Participant
0 Kudos

Sandra, let me try and go into greater detail about what I am doing, hopefully this will clear things up. I am currently downloading the DD04T table as a text file with columns being tab-separated. My program then parses this text file into a dictionary. Then, my program goes through the tables with the wrong headers (which are also text files), and uses the dictionary to 'translate' the headers into the correct ones. My program does not actually interact with SAP at all, which is why I am unable to do select statements. I am new to all of this, so I am unsure if there is a way for my program to interact directly with the DD04T table instead of accessing it through a downloaded text file. Because my program does not access SAP, and my trouble lies within downloading the correct data, not parsing it, I did not think posting my code would be relevant. If you still think it is after this explanation, then I would be glad to.

Sandra_Rossi
Active Contributor

To read a table from your Python program, either you access directly the database (ODBC, etc.) or you do it via the ABAP system via PyRFC to call RFC_READ_TABLE for instance.

If you prefer to extract from SAP GUI, you may use "SAP Query" to join DD03L-DD04L or create your own ABAP program.

How many tables do you need to extract, how many data elements are referred by these tables?

former_member730404
Participant
0 Kudos

Hi Sandra, let me try that out, thank you for the information. The only table I need to extract is DD03M, as this contains the information need to 'translate' the other already extracted columns. I am not sure the amount of data elements referred to by these tables, but it is a large amount

former_member730404
Participant
0 Kudos

Sorry, I am a bit confused. I am looking now and I see that neither DD03L or DD04L contain the REPTEXT column, so I am unsure as to how joining those two tables will benefit me. Can you elaborate on that for me? Thank you

Accepted Solutions (1)

Accepted Solutions (1)

TuncayKaraca
Active Contributor

Hi Alex,

It's me Tuncay again 🙂

With ABAP it means you need one internal table variable for table names that you have the list (you can upload the list from file to internal table) and one for DD03M list. Then loop lt_table for table names; inside the loop loop lt_dd03m search TABNAME so you can get correct DD03M values.

With Python it's a kind of same logic; you need one array for table names, and one array for DD03M and by looping table names array search DD03M values with related field TABNAME. There must be easier way doing with Python since Python is very good with datasets.

I know all my answer is hypothetical but it seems the solution somewhere there - using two arrays (two internal tables) and search & match; then update, etc..

Hope that helps.

Thanks,
Tuncay

former_member730404
Participant
0 Kudos

Hi Tuncay, thanks for sticking with me 🙂

One issue I have been running into is that the data set is too large. Currently, I am using the DD04T table and have it set to have 999,999 entries. This, unfortunately, is still missing a significant amount of elements. When I try and increase the amount to 9,999,999 entries, SAP fails to load the table, giving a message saying there is too much data and it timed out, so I am unable to download it. This is why I need to somehow filter the table in SAP to reduce the number of entries.

Thanks,

Alex

TuncayKaraca
Active Contributor

Hi Alex,

How do you download data from DD04T table? Do you use SE16 and download the result as a file? How many table names do exist in your list of tables?

Thanks,
Tuncay

former_member730404
Participant
0 Kudos

Hi Tuncay,

How you described it is how I download data from the DD04T table. Also, I had an idea to use the table name to ensure each table had the correct mapping. However, this does not work with DD04T, as DD04T does not include the option to have the table name as a column. As a result, I used the DD03M table. However, I realized that for some reason, not every element is showing up. For example, the CSKS table has a column with ROLLNAME: LTEXT and REPTEXT: Description, but this mapping does not appear in the DD03M table filtered on CSKS. do you know why?

Also, to answer your question, I have about 100 table names in my list of files

Thanks,

Alex

TuncayKaraca
Active Contributor

Alex,

1-) If you are using SE16 to display DD03M view data and manually downloading (System > System List > Save > Local File); you could filter based on TABNAME on selection screen of SE16 of DD03M. You can easily copy a row of table names -for example an Excel- and copy paste on TABNAME on selection. That way you can get DD03M list for only the required table.

2-) LTEXT column name is not in CSKS table but in CSKST table which is Text Table of CSKS. in DD03M > TABNAME = CSKST, FIELDNAME = LTEXT, ROLLNAME = KLTXT

Thanks,
Tuncay

former_member730404
Participant
0 Kudos

Tuncay,

Thank you, this has helped me.

Regarding your 2nd point, that helped me in regards to the CSKS table, however, I am encountering a similar issue in the EKKN table. One of the items that does not show up is Data Filter Value for Data [A]ging (for some reason answers.sap does not actually allow me to put the full word [a]ging, so for reference, pretend the brackets aren't there), however, this appears when searching for just EKKN in se16, rather than going through DD03M first. The EKKNT table does not exist either.

Also, am I able to filter for multiple tables at once? I tried space separating the table names, as well as comma separating, but that did not work. Would I have to do them one by one? Let me know

Thank you,

Alex

former_member730404
Participant

Just as an update, I ended up altering my program to keep track of which tables were not successfully translated. I then went through these failed tables one by one, to see if I could figure the issue with them. For the some, I was able to resolve it, however, others did not contain the REPTEXT in SAP for some reason. Not sure if this is an issue with how the tables were first extracted, or if I am not looking in the correct place. Just to give an example, the USR02 extracted table has the header "user master record version", but this header does not appear in SE11 filtered on USR02. Something similar occurs with 7 more of the tables.

TuncayKaraca
Active Contributor

Alex, USR02 table's column (field) name VERSN (User master record version) and its data element is XUVERSION's (User master record version) text fields (REPTEXT, SCRTEXT_S, etc.) has no value, all are blank in both English and German languages. You can see the field VERSN for table USR02 with SE11; but data elements has no text value.

So for this type of scenarios you can use DDTEXT instead of REPTEXT - just like if REPTEXT is blank use DDTEXT which is the description of the data element.

former_member730404
Participant
0 Kudos

Ah that's my bad. I was looking under SE11, but I guess I must have missed it!

Something similar is happening with the tables T161S, TVPT, and TVKGR. All of them contain the column "Description", but this does not appear in SAP. I am fairly certain I am not merely just accidentally missing this, because TVPT only has 3 entries in SE11, and none of them are close to "Description". Any ideas? Thanks

TuncayKaraca
Active Contributor
0 Kudos
  • T161S table's text table is T161U and field FKZTX with data element FKZTX
  • TVPT table's text table is TVAPT and field VTEXT with data element BEZEI20
  • TVKGR table's text table is TVGRT and field BEZEI with data element BEZEI20
former_member730404
Participant
0 Kudos

Tuncay, I ended up having the remaining tables re-extracted with the correct headers, so my program only needed to make cosmetic adjustments. Thank you for sticking with me through all this, I really appreciate your help!! Have a good day 🙂

TuncayKaraca
Active Contributor

Alex, good news! You are welcome. I'm glad to be helpful. Have a good day too 🙂

Answers (0)