If you have a required data export and the existing export options do not support the data export's format, or if you need to export data for a custom base class, you must create a custom export. The custom export must be scripted and executed within a special user exit. The following sections describe how to implement a custom export.
The user exit is called once for each document that is exported. Once a document is exported, the export history is updated against the document so that it is not unintentionally exported a second time. The history can be cleared by resetting the document back to state 200. If an export is not successful, the user exit is called again during the next attempt.
The script contents of a user exit can be set to anything that your business needs require.
You should check the document class before developing any script that refers to fields using hard-coded field names, particularly if the project uses custom base classes. If a field is that does not exist is referenced against the document class, it results in a runtime error. The fnGetBaseClass global function, described in the Global Variables Scrip Class, can be used to check the document class.