Show/Hide Toolbars

Additional Resources

When opening the Send to SAP configuration for the first time, the connection settings dialog is immediately displayed. This dialog requires the settings to connect to the desired SAP system. Settings can be taken from the corresponding SAP Logon Settings.

SAPCon_WorkflowIntegration_SendtoSAP_001

After successfully connecting to the SAP system and loading the metadata for the required function, a list of functions and parameters is prepared to receive the mapping information.

For example, in the screenshot below you can see that information for the SAP Functions BAPI_INCOMINGINVOICE_PARK, ARCHIVE_CONNECTION_INSERT and BAPI_TRANSACTION_COMMIT are prepared. Each of these function calls needs to be configured to receive the correct values either hardcoded or from a Thereforeā„¢ index data field.

SAPCon_WorkflowIntegration_SendtoSAP_002

In this sample for sending header and line item data for an invoice with PO to SAP, the mapping below was defined.

 

Header Data

SAPCon_WorkflowIntegration_SendtoSAP_003

Item Data

SAPCon_WorkflowIntegration_SendtoSAP_004

Some values are set from regular Thereforeā„¢ index data fields, while some are set from Table index data fields (see Item Data) and others are set to a default value, for example ItemData.POUnit.

 

Settings for ARCHIVE_CONNECTION_INSERT:

SAPCon_WorkflowIntegration_SendtoSAP_005

oThe [@CreateNewGUID] macro creates a new unique GUID for this document. This is required for SAP to uniquely identify the document. Note that this value also needs to be updated in Thereforeā„¢, so make sure the Save To Therefore value is set to ā€œSAPDOCIDā€.

oARCHIV_ID: Needs to be Content Repository ID the document should be linked to. This value can either be defined here or taken from the Thereforeā„¢ index data field ā€œSAPREPIDā€

oAR_DATE: Needs to get any valid date.

oAR_OBJECT: Defines the object type of the linked object. This also defines the display text in the SAP GUI. This needs to be correctly customized on the SAP side (SAP_OBJECT and AR_OBJECT need to be a valid combination), otherwise this call will fail.

oDOC_TYPE: Type of document (TIF, FAX, PDF, ā€¦)

oOBJECT_ID: The ID of the SAP Object the item should be linked to. In the example above this needs to be [!INVOICEDOCNUMBER][!FISCALYEAR], which are values returned by the call to BAPI_INCOMINGINVOICE_PARK.

oSAP_OBJECT: The SAP Object Code the document should be linked to.

 

info

You can concatenate multiple values into one variable by adding it to the mapping manually. For example, ā€œ[!INVOICEDOCNUMBER][!FISCALYEAR]ā€ combines both values into one variable which is then passed to the SAP function.

If you only need to get a sub-string of a value to be set to a variable you can use a (start, length) syntax inside the macro. For example: [!OBJ_KEY(10,4)].

Padding is also supported by using RP (=Right Padding) or LP (=Left Padding) in the assignment macro. For example, [!EV_BRKRS(RP,4,0)] would right-pad the value in EV_BRKRS with 0 until it is four characters in total.

The sample configuration above gives a basic idea about the information needed to successfully park an invoice in SAP. Is just uses a minimal amount of data to be transferred. For other scenarios it may be required to add/use other variables or structures which can be easily configured using this connector.

If the configuration for the calls is different for different types of document, it is recommended to identify those document types during the Thereforeā„¢ workflow and add different Call COM DLL Taks for each of the different configurations.

 

Ā© 2022 Therefore Corporation, all rights reserved.