Understanding the Basics of Map Format Data for Payments

Objective

After completing this lesson, you will be able to understand the Basics of Map Format Data for Payments

Basics of Outgoing Payment File Generation Process

In this lesson you will learn how to use Outgoing Payment File Generation Process end-to-end in SAP S/4HANA Cloud Public Edition. You will analyze requirements from the bank towards the payment format, configure a format mapping in Map Format Data application that transforms data from payment structures to the output file and use developer extensibility for file post-processing. On top of that, you will configure a payment format, payment method and in the end generate the output file.

The payment file generation process begins with the invoice, where the accountant specifies the desired payment method for use during the Payment run. The principal aspect of file creation resides in the Payment Medium Workbench. This workbench is responsible for executing the Map Format Data engine, which is tailored for specific payment formats. It includes two key-user extensibility points and one point of developer extensibility.

The Custom Additional Reference Fields (Event 06) allows for the selection and integration of custom data sources. This is useful for incorporating extra data not originally present in the payment structures.

The Change File Name (Event 21) enables users to set a specific name for the payment file. This name is applied when the file is retrieved through the Manage Payment Media or when it is transmitted under this name to the MBC tenant.

Post-processing involves any modifications to the file, such as appending an envelope, before it is finally stored.

Scope of Delivery of Payment Formats in Map Format Data

SAP delivers its standard and localized templates via Map Format Data for Payments application in SAP S/4HANA Cloud.

SAP provides formats as country-specific templates, meaning they are initially designed for use within a particular country. However, there may be instances where specific requirements from banks or unique business needs arise. In such cases, customers may need to adjust these format templates during their projects to create a payment file that meets the bank's acceptance criteria.

The development and ongoing maintenance of these formats are guided by the CGI (Common Global Implementation – Market Practice) standards or by local country standardization organizations. Examples of such organizations include SIX in Switzerland and the NPC for Nordic countries. When visualizing this framework, SAP's delivery positions itself at an intermediary point, balancing between global market practice and local market practice.

SAP offers a comprehensive set of formats based on ISO 20022, which cater to the needs of most supported countries. The applicability of these formats depends on whether a particular country has adopted ISO 20022 standards.

Currently, SAP maintains an extensive collection of more than 90 country-specific payment formats. This includes 51 formats for credit transfers and 44 for direct debits. As ISO 20022 formats continue to gain adoption across more countries, the number of available formats is expected to increase.

To learn more about the scope of Country/Region-Specific Payment Format Mappings please follow link to SAP Help Portal: https://help.sap.com/docs/SAP_S4HANA_CLOUD/656a410b5ce14bcd82d40b88f26d8d74/582a919a8ca445e0b310a04d9d6fdcae.html?locale=en-US

Basics of Map Format Data for Payments

Map Format Data app allows you to configure the following:

  • Transformation of the structured data in the system into output file in XML or flat file format, for example, payments from the system are send in the specific XML format to the bank.
  • Transformation of the file content (XML or flat file) into the structured data that are consumed by the business process in the system, for example, data contained in the bank statement file needs to be interpreted and used for reconciliation.

Depending on the business process integration, incoming and outgoing directions are available in Map Format Data for configuration, as you can see in the picture below.

You can access the Map Format Data application through specific configuration steps in SAP S/4HANA Cloud Public Edition via SAP Central Business Configuration or Manage Your Solution application as they are listed per integration in the picture above.

In Map Format Data for Payments, you can define the rules for mapping or transforming data to enable data exchange with your financial institution in the required data format. You can create new format mappings or copy from existing ones, display the details of your existing format mapping, as well as import, export, edit, check, delete, and release these mappings.

In this activity, you can define how the system fills payment data in the payment format to generate the final payment file that you send to the bank. The configuration app supports both XML and flat file formats.

Workspace of Map Format Data

To begin developing a new format mapping, it's essential to first gain a comprehensive understanding of the various sections within the workspace. Let's proceed to examine each area in detail.

Header

On the top of the screen, apart from the name and description you can see the mapping attributes like:

  • Direction: Outgoing or Incoming (e.g., for bank statements)
  • Mapping type: Payment Medium Format, Treasury Correspondence Format, End-of-day Bank Statement etc.
  • Output Format Structure (XML or Flat file).
  • Last changed on and Last changed by information.

Upper right corner contains Generate Backup button which creates a snapshot of your format mapping which can be used for retrieval of unwanted changes.

Mapping Structure

The left side of the screen contains the section where the structure of the mapping is defined.

It contains a search button which can be used to search for a specific node and below there are activity buttons to create, copy, cut, paste, duplicate or delete a selected node.

Three dots unveil additional functionality.

  • Deactivate button excludes the node or the whole branch from the output.
  • Convert to Original is used in case your mapping is copied from a parent mapping and this brings the node back to the functionality used in parent.
  • Convert to Technical Node converts the selected node to a technical which does not appear in the output file and is used typically for aggregations.
  • Expand All and Collapse All is to display or hide the whole structure just for the display in the screen.
  • Set Tracepoint is used for troubleshooting when you want to analyze how the value from the payment structure field is processed in certain node. It can be applied on entire format mapping or selected nodes. More about tracing functionality here.
  • Legend shows all nodes which can be created with their description.
  • Filter allows you to select to display deactivated nodes. These will be shown as greyed out in the format mapping structure and will be excluded from the output file generation process.

Format Mapping/Node Attributes

On the right side of the screen, you can specify attributes for entire format mapping or specific nodes to specify their behavior.

This section changes based on the type of the selected node.

The "Format Mapping Properties" node is present in XML and Flat files and is not part of the output. This node defines global attributes of the format mapping.

Format Mapping Properties consists of multiple sections:

Format Mapping Attributes

  • Description: information shown as a label when searched for the mapping
  • Format Tags
  • Format Parameter Structure: structure which is handed over to the format mapping and contains the constants for the current run. For Payment Medium format needs to be entered also on the format and then you can define the Selection variant with these constants.

File Data

  • Character Set Options:
    • Characters where the Character set field then defines the characters which are allowed or excluded.
    • Regex pattern which allows to define a regular expression for allowed or excluded characters.

Levels

Level together with the Sort/Key Fields define the inner loops in the mapping where the Level section defines how many levels can be in the file (Header, Batch, Payment, Detail would be 4) and the Repetition Factor which defines how many repetitions of certain level can be. In case that the level 3 reaches its limit the level 2 will be generated again.

Sort / Key Fields

  • As mentioned in the Levels section, Key fields define repetitions in the file. Together with the repetition factor of the level the key field defines a component which change causes that the given level is generated again. E.g., when the FPAYH-DOC1R (Payment document reference) changes then the level 3 is generated again.
  • Key Field flag defines whether the Field is used for the triggering of a new level creation.
  • No Sorting flag is used to exclude the field from the sorting. This option is only for the payment mapping type and is used by the payment medium workbench to sort the data before sending them to the mapping engine.

Variables

  • Variables allow you define additional carrier of the information which can be used in calculations. They can have initial value or their value will be determined in a calculation node.
  • There are two types of calculations, Date and Numeric (currency amounts are handled via aggregations).

Post-Processing

Logic for removing empty elements was moved from the post-processing functions to the Empty Element Processing. It defines how to handle these cases and also provides option to consider the content of the attribute of a tag.

  • Do not remove – tags like ﹤Id﹥value﹤/Id﹥ or ﹤Id/﹥ or ﹤Id attr="value"/﹥ will be in output.
  • Remove elements w/o content disregarding attribute values above mentioned nodes will be removed. Node which has value ﹤Id﹥value﹤/Id﹥ will be part of the output.
  • Remove elements w/o content if they have empty/no attributes – where from the above mentioned the ﹤Id﹥value﹤/Id﹥ and ﹤Id attr="value"/﹥ will be part of the output.

Functions are SAP’s hardcoded postprocessing logic.

Validation

XML Message Identifier defines a XSD schema which is stored in the system and can be used to validate the output.

Accompanying Sheet

  • Accompanying sheet is used to generate subtotals which can be used in the printout. This printout can be used got e.g., for manual validation of the content of the payment file.
  • The Key Field determines the basis on which the subtotal is calculated.

Element

Elements represent tags of an XML file. Element can contain a value taken from different sources, but typically the payment structure field or it can be used to output element hierarchy as sub nodes.

  • Attributes section of node type element:
    • Name: defined the name of the XML tag e.g. ﹤Header﹥
    • Short Description: For documentation purposes. In the ideal case description should contain the information what the node does.
    • Status:
      • Standard: Node will be outputted regardless of its value
      • Mandatory: If the value of the node is empty, error will be raised in the processing log. Log is accessible from Manage Automatic Payments app after the payment run.
      • Optional: Node won’t be outputted if the value is empty. Note: The sub nodes are not considered. This options only considers the value of the node itself.
    • Length: Visible length in the output. In most scenarios you don’t need to specify length in XML files.
    • Node ID: Technical identification. You can use it for searching.
    • Reference ID: You can use reference ID to refer nodes in conditions and aggregations. Note: In general, you can only refer to the nodes that were processed before. However, you can output aggregation above the node that is aggregated. E.g.: You need to output sum of all items before items are outputted.
    • Name in Accompanying Sheet: Technical name in the accompanying sheet
    • Level: You can assign a level to the node to specify iterations of the file.
    • Target Offset: In case the target offset differs from 0, it defines from which position in the output the value will be placed.

      Note

      Typically, not needed in XML files. You can use it for concatenations of atoms.
    • Type: Defines the type of the outputted values, possible options are:
      • Characters: alphanumeric representation of the value.
      • Numeric: numeric value without decimal places.
      • Currency Amount: numeric value with decimals.
      • Curr. Amt. w. +/- Sign: numeric value with decimals with +/- sign.
  • Source
    • Defines the source of the value which is used in the node.
      • Constant: You specify a fixed value of the node using constant.
      • Source Field: You use source field to fill the value to the node from the payment structure.

        Note

        You can use lengths and offsets with ABAP notation to takeover only part of the field’s value e.g.: FPAYH-REF01(4)+2. For value 123432, 32
      • Reference to Node: value of preceding node with Reference ID
      • Aggregation: You can use aggregation to calculate sum or occurrences of the node.
      • Variable: You use this option to output current value of a variable.
      • Own Mapping: Value is created with use of Atoms which are defined as sub nodes of this node.
      • No Mapping: Typically used for inner nodes in XML files that contain other nodes as sub nodes.
  • Conditions
    • If the result of the condition is false, then the node is not outputted nor further processed. Condition is evaluated at the very beginning of node processing.
    • You can compare values of Constants, Structure fields, Reference ID and Variables.
    • You can use brackets to specify priorities in the expression.
  • Attribute
    • Can be created only as a sub node of an element and is represented as an attribute of the element in the target file. It provides detailed information for an element and can contain atoms as sub nodes (for example, to use conditions).
    • Example: An account number, represented by an element, is output to the target file. The attribute determines whether it is the account number of the payer or payee. ﹤AccountNumber Type="payer"﹥123454321﹤/AccountNumber﹥
  • Calculation Node
    • An element that is not output to the target file. It stores the result of a unary or binary mathematical operation in the variable. The source or sources for this operation can be constants, reference IDs, structure fields, or variables. Variables can be created on the Variables tab page in the Format Mapping Properties node. If you want to output the content of the calculation node to the target file, you can reference the variable in another node.
  • Technical node
    • An element that is not output to the target file. It stores values that are used in other nodes that reference this technical node. For this reason, a technical node generally contains a reference ID. If you want to output the content of the technical node to the target file, you can convert the node to an element.
  • Atom
    • Used either to output more than one value to a single element or, based on conditions, to control which value is output to an element. You must create an atom when you define more than one mapping rule for an element.

Log in to track your progress & complete quizzes