Output of Electronic Documents as a Structured ZIP File

by Jürgen Gotthardt

Recently, one of our customers requested help with sending electronic documents as a structured ZIP file, where the folder structure of the ZIP file corresponds to the BOM structure. You’ll see how we accomplished this in the following application.

The customer’s SAP system contains multi-levelBOMs for electronic devices, such as:

2.xxx-xxx

— 4.xxx-xxx Circuit board

——-6.xxx-xxx Electronic hardware component 1

——-6.xxx-xxx Electronic hardware component 2

——-6.xxx-xxx Electronic hardware component 3

——-6.xxx-xxx Electronic hardware component 4

——-6.xxx-xxx Electronic hardware component 5

Diverse electronics documents may be attached to every material number in the BOM. Our customer wanted tohave these documents put in a ZIP file where the folder structure of the ZIP file corresponds to the BOM structure.

To do this, we developed a userexit that detects the progression of the material numbers of every document and takes over this progression as parameter in the order. The output script creates the corresponding directories for each level. The documents are stored there, and then a ZIP file is created. For the actual zipping method, the output script uses the Perl Module Archive::Zip.

The result looks like this:

Notes on the structure:

  • The ZIP file2.816-192.0.zip was created for user AW03464
  • The directory at the highest position has exactly the same name as the ZIP file.
  • At the second level, there are three directories for the relevant material numbers; the second of these material numbers has an additional subdirectory, containing the found originals of the linked document info records.
  • If several document info records are linked, their originals are stored in the same directory (material number).
  • The original filename will be used as the filename (KPRO_DOCFILE).
  • The originals may represent various application types. For example, a JT and a STEP file were also created along with the PDF file.

 

In this way, we fulfilled our customer’s request with relatively little effort.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

* = Required field

  • Blog Categories

  • Next Events

    1. SAP for Utilities

      10. September 2017 - 14. September 2017
    2. PLM World Intermountain Regional Users Group

      21. September 2017
    3. TechEd

      25. September 2017 - 29. September 2017
    4. DSAG Congress

      26. September 2017 - 28. September 2017
    5. PLM World Cincinnatti Regional User Group

      26. September 2017