Show TOC

Background documentationIntegrating the Document Processor in Your Own Programs

Prerequisites

You have configured the transfer of data from the interactive form to the SAP system in Customizing for the correspondence tool (see Start of the navigation path Cross-Application Components Next navigation step General Application Functions Next navigation step Correspondence Next navigation step Inbound Processing Next navigation step Make Specifications for Processing of Interactive Forms End of the navigation path).

Activities

The document processor represents the smallest usable unit of inbound processing. It extracts the XML data from a PDF form and derives the ABAP data from the XML data.

You access the document processor using the method S_CREATE of factory class CL_IFP_DOCUMENT_FACTORY. This method creates an instance of the document processor as a singleton and returns a reference to the interface IF_IFP_EXTRACT_DATA. This interface provides the following methods:

  • For setting the document as a PDF document or XML data

    • SET_PDF_DOCUMENT (Set PDF document, extract XML data)

    • SET_XML_STREAM (Set XML data)

    • SET_PDF_CLUSTER PDF (Set as cluster, extract XML data)

    • SET_XML_CLUSTER (Set XML data as cluster)

  • For processing the document

    • EXTRACT_DATA (Transform XML data into ABAP data)

  • For providing the ABAP data of the form name, of the PDF, or of the XML data

    • GET_ADOBE_FORM (Return form name)

    • GET_PARAMETERS (Return ABAP data as parameter of interface)

    • GET_XML_STREAM (Return XML data)

    • GET_DOCUMENT (Return PDF document only if PDF was set)

    • GET_DOCUMENT_TYPE (Return type of document (PDF/XML))

    • GET_PDF_CLUSTER (Return PDF as cluster only if PDF was set)

    • GET_XML_CLUSTER (Return XML data as cluster)

The document processor offers numerous options for processing. You can set a PDF document or XML data, process the document and make the ABAP data available for further processing.

You can first set a PDF document, make the PDF and the XML data available as a cluster, and persist the cluster. In the second step, you can set the already extracted XML data as a cluster, process the document and make the ABAP data available for further processing. (See the following class diagram.) You can process a wide range of received documents. You can process mixed PDF data and XML data. For setting the XML data, use the method Set_Xml_Stream instead of the method Set_Pdf_Document. However, before using the method, you have to determine what the document type is of the current document.