Hello, SAPers!

 

Quite recently I worked on implementation of budget payment orders (taxes, social payments etc.) for our Client. First of all, I compared the structures of ordinary and budget payment orders and found out that there is a dozen of extra fields in budget payment order that are not supported in an ordinary payment order. So the task boiled down to add these extra fields to the existing DMEE-tree (for ordinary payments), however output them only when certain conditions are met. I decided to implement this requirement using conditions in DMEE-tree. As it turned out, this functionality is quite simple, but when you try to use it for the first time it will take some time to understand the mechanics behind it.  Let’s take a closer look at this functionality.

 

Condition technique is a standard functionality in DMEE that enables you to control whether a node would be processed during the generation of payment orders or not. Basically, if the condition for a separate node is not fulfilled then the node will not be processed and hence not displayed in the file with payment orders. The conditions can be configured for any node type. If the condition should apply to several fields, you can apply it to a composite node (6. Composites.jpg) or a segment (3. Segment.jpg) that contain these fields.

 

For configuration of conditions you can reference either the field values in source structures (i.e. FPAYH, FPAYHX and FPAYP) or the values in another nodes of DMEE-tree. We will consider the implementation of both cases. The following are typical fields used in configuration of conditions:

 

Arg.1-1 contains reference value that should be checked (reference node, source structure (FPAYH, FPAYHX and FPAYP) or a constant value);

Arg.1-2 contains the field of the source structure or a node attribute that should be checked (e.g. 1A – contents in internal format; 1 – contents in output format if some conversion was applied etc.). The list of all options can be checked via help options (F1). In case you specified the constant value in Arg.1-1, this column should be empty.

Type contains the reference to an argument type of reference value (1 – constant value, 2 – field in source structure, 3 – reference ID).

Operator specifies which logical comparison should be applied to the reference value in order to fulfill condition criteria.

Arg.2-1 contains the comparison value against which the reference value should be compared (the same possible values as for Arg.1-1).

Arg.2-2 contains the attributes of the value (the same possible values as for Arg.1-2);

Type for the comparison value serves the same purpose as for the reference value.

Operator contains the linking operator and is used in case of several conditions (AND – if both conditions should be met; OR – if some of the conditions should be met).

 

1.1 Condition via Reference to another Node of DMEE-Tree

 

Case: for foreign vendors additional field with information on house bank SWIFT code should be displayed.

First of all, you have to configure the reference node. You can use the existing fields of the DMEE-tree or you can define technical nodes (2. Technical node.jpg) to store reference values that should not be displayed in payment order. If there are several technical nodes, you can create separate segment to group them together. In this example a segment with technical node will be used. In any case, specify meaningful reference ID for the node whose value should be checked e.g. VEND_COUNTRY. You can use all standard mapping options to fill this field. In this case a field from the source structure will be used (FPAYH-ZLAND). Example of reference node can be found below.

1. Reference node.jpg

Remark: DMEE-tree for this example uses segment with two elements LABEL and VALUE. Label element is mapped to a constant text value (tag) that by default equals to the name of the segment e.g. “CLN_BANK_SWIFT=”. Value element contains the actual value of the payment order tag. Typical example can be found below:

4. File Structure.jpg

5. Typical Elements.jpg

Condition will be applied on segment level, thus it will effect both elements. In order to meet stated requirements, the following condition was configured:

7. Condition 1.jpg

This solution might be good if you use the DMEE only for a specific country (e.g. Ukraine in my case). But if you want to configure it more flexibly in order to use across several countries you will have to modify and check whether vendor country equals the country of company code. This data is available in source structure (FPAYHX-LAND1). The condition should be configured the following way:

 

7. Condition 2.jpg

 

Alternatively, you can use complex condition containing the list of specific countries for which the condition applies e.g.:

7. Condition 3.jpg

In any case, the result would be the same (except the third option): there would be additional line with house bank SWIFT code for the second payment (payment to a foreign vendor).

 

8. Example.jpg

1.2 Condition via Fields of Source of Structure

 

Let’s consider another case building on a previous one. Suppose you want to display IBAN number for a foreign vendor (if it is configured in master record). For a local vendor, bank account number should be displayed instead (if there is no IBAN number).

The first complex condition checks whether the country of vendor is the same as the country of company code and there is no IBAN in master record. If both of these conditions are met, the segment will be processed and bank number will be output (source: FPAYH-ZBNKN). If one of them is not met, the segment will not be processed.

9. Condition 4.jpg

 

The second condition checks whether the country of vendor differs from the country of company code and there is IBAN in master record. Similarly, if both conditions are met the segment will be processed and IBAN number will be output in file (source: FPAYH-ZIBAN).

9. Condition 5.jpg

As can be seen from the attached screenshot, bank number of the local vendor is displayed in tag RCPT_ACCOUNT and IBAN number for a foreign vendor in tag RCPN_IBAN.

10. Example.jpg

 

I hope you will find this information useful if you are interested in topics around payment medium workbench and DMEE-trees.

All suggestions are welcome!

 

Best regards,

The Wirtschaftsmann

 

P.S. Disclaimer.

All sensitive information (bank accounts, company names etc.) used in this example is invented by my own. If there is some coincidence with real-life companies, it is a purely accidental one. The structure of the DMEE-tree represents a real-life example alghouth I modified it for the purposes of this blog post.

P.S. This post can also be found on Medium platform under the following link.

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Ondrej Zatopek

    Hi,

    that is a nice explanation. However I am facing an issue with conditions that use reference ID. In my particular instance I want to set the condition: If the reference field (which is exit module) is empty…I get a message that reference ID CHRG cannot be used. The condition looks like this:

    CHRG    1    3    =    ”                             1

    Any ideas what might be the case? Are there any limits what can and cannot be referenced?

    Thanks a lot.

    Regards,

    Ondrej

    (0) 
  2. Alexandra Fischer

    Thank you very much for the description.

    Could you give some more information regarding using constants in the condition ?

    I am facing in a existing DMEE and do not know what the following set up actually does:

    Arg1-1 Arg1-2 Type Operator Arg2-1 Arg2-2 Type Operator

    1                        1         =           2                     1

    and in another case

    1                         1        =            1                     1

    Thanks

    Alex

    (0) 
    1. Bohdan Petrushchak Post author

      Hello Alexandra,

      Sorry for late response. Your conditions look quite complex and the reason for that is that at first look it’s not clear what ‘1’ in the field Arg1-1 stands for. But my first impression is that you just compare two constants ‘1’ and ‘2’ / ‘1’ and ‘1’, which to say the truth doesn’t make any sence for me.

      If, on the other hand, you have some node that has reference ID ‘1’ and you would like to compare it’s value against constant, I would suggest the following:

      – to reconsider the naming conventions for reference IDs (just for convenience sake when you customize conditions you know for sure what business information reference ID represents).

      – second to configure the condition as follows:

      Arg1-1 Arg1-2 Type Operator Arg2-1 Arg2-2 Type Operator

      1         1           3       =             2                     1

      This condition will have the following meaning: compare if the value of node with reference ID ‘1’ in output format (Arg1-2) equals (=) constant value ‘2’.

      Alternatively, if you want to compare a structure field against a constant, you should configure it the following way:

      Arg1-1   Arg1-2 Type Operator Arg2-1 Arg2-2 Type Operator

      FPAYH  ZIBAN   2       =             2                     1

      In this case, put the name of the structure in the Arg1-1 field, and the name of the structure component into Arg1-2 field. The condition means: compare if value of structure component (FPAYH-ZIBAN) equals constant value ‘2’.

      Hope this should help you!

      Best regards,

      The Wirtschaftsmann

      (0) 
      1. Alexandra Fischer

        Thank you for the reply.

        The DMEE is a standard DMEE created by SAP – very strange. I know from regular coding things like “check 1 = 2” if you want to exit a loop etc. But it does not really make sence here.

        (0) 

Leave a Reply