Blogs

Consultant’s Tools Part 1: Moving DB Table Content without CTS between Web AS ABAP systems
Stephan Heinberg SAP Employee
Business Card
Company: SAP Deutschland AG & Co. KG
Posted on Jul. 04, 2008 01:09 AM in ABAP

Subscribe.Subscribe
Print. Print
Permalink Permalink

This is a small series about some useful tools making consultant's life a little easier dealing with Web AS ABAP.

Introduction

Wouldn't it be nice, if you can share database table content between different Web AS ABAP systems?
I recently worked for a customer who installed a brand new empty ERP 6.0. When I looked at the shipped customizing of the units of measure, the whole data was complete messed up. (Important UoMs where missing, ISO codes were not set, not everything was translated.) Instead of manually correcting the data using transaction CUNI (which is quite old and not user friendly) I downloaded the data from a system where I new data were consistent and uploaded the relevant tables into the customers system.
For this I have deleloped a small tool, I would like to share with you:
Usage cases can be:

  • Moving quickly table content between different systems.
  • Backing up data into a file, to restore it later, e.g. to repeat a demo
  • Moving only selected data from productive to QAS or development system.

The Solution

To download the data base tables into XML files use the following program:

To upload the tables again, here's the program:

How does it work?

The programs are quite simple. They benefit from the ABAP feature that the WebAS kernel can serialize ABAP data to XML and backwoods to deserialize the data. (Command CALL TRANSFORMATION, it is called Simple Transformation because it does not support XSLT in this mode, but this is fine for this program)
Any type of table data is supported. ABAP loads the data into Unicode-enabled XML via bytestring, the files are down- and uploaded binary, to there won't be problems with any codepages, as long as you WebAS supports Unicode.
You can find the source code as SAPLink nugget here.

Warning

The tool should only be used by professionals. Uploading DB table data may cause inconsistent business objects. So please only use the feature when you know what you are doing.

Conclusion

I have collected my tools during the last few years and I would like to share it with you now. Many bits and pieces are based on the work of others and some concepts have already been blogged in SDN. Feel free to add similar blogs to keep a cross-reference.
At the end the IP rights for ABAP coding remain anyway with SAP AG ;->

Stephan Heinberg is a Solution Consultant and Project Manager for Product Lifecycle Management and an enthusiastic fan of ABAP.


Add to: del.icio.us | Digg | Reddit


Comment on this article
Comment on this weblog
Showing messages 1 through 3 of 3.

Titles Only Main Topics Oldest First

  • SAPlink supports this as well
    2008-07-04 07:29:12 Rich Heilman SAP Employee Business Card [Reply]

    There is a plugin for SAPlink called "Table Contents", which does exactly this, but integrated directly in the SAPlink tool which also uses XML.


    http://saplink-plugins.googlecode.com/files/CLAS_ZSAPLINK_TABLE_CONTENTS-0.1.0a.slnk


    Regards,
    Rich Heilman

    • SAPlink supports this as well
      2008-07-04 07:38:44 Stephan Heinberg SAP Employee Business Card [Reply]

      Hi Rich,
      I know this plug-in. It is still labeled alpha release. It would be nice to have one tool which does it all.
      The main reasons why I would not use the SAPlink plug-in for up-and-downloading table data is an architectural decision of SAPlink that I won’t agree with: SAPlink up-and-downloads their XML nuggets in text and not binary mode, and unfortunately there is no plain text! I had a few problems with SAPLink using non-Ascii7 characters, so I would not recommend using it for write DB table content, especially language tables.
  • Warning
    2008-07-04 07:07:23 Jürgen Mayer Business Card [Reply]

    Hello Stephan,


    this looks nice and helpful but for all the dummies like me I think you should highlight the chapter 'Warning' in UPPERCASE BOLD RED letters.


    Regards
    Jürgen


Showing messages 1 through 3 of 3.