Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
ttrapp
Active Contributor
0 Kudos

Every company regularly needs to print large numbers of documents with a special design, think of invoices for example. Therefore we define the content, layout and use a special output technology such as SAPscript, SAP Smart Forms or Adobe Forms. Documents can be output to a printer, a fax device or as e-mails or even as Adobe Interactive Forms.

Benefits of Output Management Systems

In most cases above technologies are able to solve all your problems, but in some cases you need additional tools, so called Output Management Systems (OMS). Such tool are the first choice for mass processes: think of some 10.000s or say 100.000s or even more documents which must be given in out in a very short time. Here the SAP system creates XML which is assigned to a layout and rendered  by a highly specialized and optimized tool which also has monitoring capabilities and allows the user even to scan the documents automatically and even modify them manually in appropriate cases.

Of course usage of OMS will cause some additional effort if you want to archive these documents using special APIs like SAP Archive Link or even SAP Records Management or if you have additional processes (think of CRM callbacks for example). These problems can be solved, but this is not the topic this blog entry is about.

There is also another thing to be considered: digital signatures are getting more and more important. If the output creation is done outside the SAP system then those documents have got to signed by those systems. But is not surprising: In automized mass processes there is no SAP user that can sign every single document manually and the same problem has to be solved by the OMS as well. But this is far beyond of the scope of this blog entry because I had to introduce and discuss the consequences of legislation first (an in fact I know only german and european laws).

XML Data Streams as Input for Output Management Systems

From the point of view of an output management system documents are generic XML container that will be transformed to the appropriate format – think of HTML, eMail, PDF and so on. Then those documents will be put into the right channel for sending them.

The generic XML container defines the content of an document that has to be created but usually it makes no sense to add any layout information because this is contained in special templates maintained by the OMS. You can create such XML containers for instance as XSF (XML for SAP Smart Forms) output of a Smart Form. Please remark that XSF contains only content information because it makes no sense to give layout information to an OMS that contains already layout templates.

So in mass processes I need tools for XML generation. Usually the SAP systems has default information about the are relevant for archiving the generated output think of content repositories or type and ID of an business object the generated output should be assigned and so on. Also I would expect that there is a the possibility to define additional information that I need for further processes that are triggered outside the SAP system.

The Problem with Non-Generic Interfaces and APIs and a Generic Work Around

Function modules that create Smart Forms have fix parameter interfaces. If I have to create a huge number of output dociment types I usually have to create the same number of Smart Forms which usually is very time consuming. If I want to reduce this effort there are different solutions:

  • I can create one Smart Form for all documents that contains all data to be printed out. There is one additional information (think of correspondence type) that guides the OMS. This solution is possible but gets too complicated if we have many document types with complicated parameters.
  • We create a generic container that contains a table consisting of a NAME and VALUE structure. So most of the output data can be coded within that structure so that we can define a single table for (nearly) all output data and so a single Smart Form for XSF creation.

The following example shows an example of the generic approach. Within the Smart Form we define a loop section consisting of structure containing the name of an attribute (PRICE resp. PRODUCT) and the corresponding values (1.746,20 resp. TICKET):

Let me mention some additional things we have to take care of:

  • We have to write a service class that converts the ABAP data into that generic structure.
  • It is useful to introduce repetition groups to the structure above so that we can code tables and nested structures.
  • The generic content must be transparent to the creators of the OMS templates perhaps by using customizing.
  • Of course we have to wrap the calls perhaps using BAdIs so that we can easily reimplement this technique. I learned in the past that output technologies tend to come and go. And even if they remain they will change because they have to support new features like signatures for examples.

Summary

XML is a generic syntax and so it allows to define generic containers. If we want to create generic XML documents using Smart Forms it can be useful to create generic Smart Forms although this can mean to use some tricks.