Skip to Content
Author's profile photo Former Member

Program for download/upload contents of SAP Dictionary table into/from a file

Hello,

this post reviews a Z program which could download and upload contents of a SAP dictionary table.

   Example for data download:

1.JPG

      Example for data upload:

2.JPG

Additionall functions:

3.JPG

Sometimes i need to download contents of SAP  table into a file – for backup, checks, excel calculations etc.

I have used transactions SE11, SE16 and SE16N to do this but i have had bad experience with these.

The reason is that using these SAP transactions I have received files with truncated columns content or missing columns (for some tables with many columns of bigger width).
So i have created a program which could do the things correctly.

This program could download content of a SAP internal table into a file with UTF-8 encoding.
Data is downloaded in internal SAP format.
There is possibility to download column IDs and column descriptions.
File could be downloaded on the SAP server or on the user PC.
In order to download file on the SAP server the option “Run in background” have to be checked. If this option is not checked then the file is downloaded on the user PC. User could use selection criteria’s during data download to restrict the table contents which is going to be downloaded. Also user could specify and restrict table columns which are going to be used into the output file by typing column IDs.

Upload data from a file with UTF-8 encoding residing on the SAP server into SAP dictionary table is the other option. File have to have exactly the same dictionary structure as the dictionary table and have to be tab separated. During upload full file name could be specified (file + path) or just a file name in which case home directory is going to be used. Be careful when typing file name of files residing on the application server because lower/uppercase could be important.

I have added two buttons which call standard SAP transactions for download/upload of files from/to SAP server.

I hope this program will be useful for you and will help you to save time.

Assigned Tags

      19 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      A screenshot of the selection screen would've been helpful.

      Didn't notice any authorization checks, whoa...

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hello Jelena,

      thank you for the idea. I have added screenshots.

      Program does not have authorization object, at this version.

      I could add one at the next update.

      Regards,

      Rosen

      Author's profile photo Former Member
      Former Member

      Hello Rosen,

      this looks like something that would be of great help to us,

      i cant seem to be able to copy / paste into an ABAP editor though (have to replace all spaces in the editor one-by-one!)

      is it possible for you to post a link to the code in a txt file or something like that?

      Thanks

      Jim

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hello Jim,

      i have attached the source code.

      I hope it will be fine now.

      Regards,

      Rosen

      Author's profile photo Former Member
      Former Member

      works great 🙂 thanks!!

      Regards,

      Jim

      Author's profile photo Former Member
      Former Member

      where is source code.. i did not find anywhere.

      Author's profile photo Luís Pérez Grau
      Luís Pérez Grau

      Hi,

      Nice job Rosen! shame that doesn't work 100% in CRM, we don't have the transactions CG3Z and CG3Y 🙁

      Regards,

      Luis

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      FM: "ARCHIVFILE_CLIENT_TO_SERVER" colud be used to copy GUI file on the SAP server. It is presented on the SRM system.

      Author's profile photo Former Member
      Former Member

      Hi Rosen,

      Can you please share the program , i could not find it here.

      thanks
      v

      Author's profile photo Former Member
      Former Member

      Hi,

      Can I have the source for the program?

      Author's profile photo Christopher Solomon
      Christopher Solomon

      How is your name "Support Department"? hahaha

      and why are you digging up a dead post from 2012?

      Author's profile photo Former Member
      Former Member

      Can you please provide the source code. Thank you

      Author's profile photo Tobias Blum
      Tobias Blum

      Hi @all,

      the download is missing or where i will find it

      Author's profile photo Former Member
      Former Member

      Can you tell em, where i can find the source code ???

      Thanks, Torsten

      Author's profile photo Muthu R
      Muthu R

      Hi,

      Could you please share the program.

      Thanks

      niva

      Author's profile photo CROSSN2 SAP SUSTAIN
      CROSSN2 SAP SUSTAIN

      Hi Folks,

      Could you please, provide me this Program Code?

      Author's profile photo Santosh Kumar Sangramsingh
      Santosh Kumar Sangramsingh

      can you please share the source code for this?

      Author's profile photo Rosen Petrov
      Rosen Petrov

      Hello,

      you could get the source of the program here:

      https://github.com/rpetrov77/p01/blob/master/ZTABLE_MNG

       

      Regards,

      Rosen

      Author's profile photo Nicolò Poletto
      Nicolò Poletto

      Hi,

      Very usefull report! Thank you.

      What if I need to create 1 file containing values of multiple tables?
      The problem I am facing is in Uploading: I cannot recognize which value is linked to a specific table.