DMEE Tree Creation

advertisement
DMEE Tree Creation
Steps to Create a DMEE Format
1. Run transaction DMEE.
2. On the DME Engine: Initial Screen, specify the following and choose Create.


Tree type: PAYM (standard tree type for Payment)
Format tree: specify the name of the tree you want to create (for example, Z_JP_EMC_XML)
3. In the next dialog box, choose the type of file ((Flat file or XML file) that you want to create.
4. On the DMEE: Create Format Tree screen, specify the following:

In the Administrative Data tab page, specify the short description for the format tree

In the Format Attributes tab page, specify the name of the format-specific structure
Note
You use format parameter structure to specify additional information or choose additional file
structure formatting options while executing the DMEE format.
With a certain transaction, the user can create variants for the formatting options per house
banks per payment method.
To do this, run transaction SPRO and choose SAP Reference IMG. In the IMG tree, choose
Financial Accounting > Accounts Receivable and Accounts Payable > Business Transactions
> Outgoing Payments > Automatic Outgoing Payments > Payment Media > Make settings for
payment medium formats for payment medium > Create/Assign Selection Variant.

In the Levels tab page, specify the levels with their repetition factors
In the above screen shot, you have specified three levels: Level 0, Level 1, and Level 2. The
repetition factor specified against each level indicates the number of times the information at
a particular level can be repeated in the DMEE file.
This means that you have all these levels in your DMEE format. The level 1 information can
come only once in the output file, but level 2 information can be repeated up to 9999999
times in the file.

In the Sort/key fields tab page, you can set the levels for the fields along with the structure
name
If sort field is selected as key field, then a change to the value in this field causes the
corresponding format level to end. You need to define the key fields correctly to ensure that
during file generation the sequence of the different levels is output as they are defined in the
format.
Example:
If you want the company code (FPAYH-ZBUKR) to be at level 1, specify it as shown in the above
screen shot. As the repetition factor for Leve1 is 1, this information is only displayed once in the
DMEE file. If you have 2 company codes, then the DMEE file would be split and two separate
output files are created for the two company codes.
If you want the payment document (FPAYH-DOC1R) to be at level 2, specify it as shown in the
example. As the repetition factor for Level 2 is 999999, level 2 information can come up to 99999
times in the DMEE file.

In the File Data tab page, you can specify the characters that you want to allow and disallow in
your DMEE file.
5. For creating new nodes, right click on the node DMEE tree: properties present on the left hand
and choose the node type (for example, element, atom, technical node) to be created.
Type of Nodes:
a) Element
An element is used to get output values in the target file for a defined tag. For each
element, you specify the value or the source field to be used to fill this tag. You can
define further elements and XML attributes as subnodes of an element.
b) XML Attribute
An XML attribute is used to further specify the values of an element.
You can choose either a value or a source field.
c) Technical Node
A technical node is an element that is not output to the target file. It stores values that
are used in other tree nodes (elements, atoms) by reference to the technical node.
For this reason, a technical node generally contains a reference ID.If you wish to
output the contents of the technical node to the target file, then you can convert the
node to an element.
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.
d) Atom
You need to create an atom when you define more than one mapping rule for an
element.
You need to create atoms as subnodes of an element in the following scenarios:
 Several mapping rules exist for the element that are to be applied if certain
conditions are met
 Different parts of the tag are to be filled separately with values
e) Reference ID of node
A node that contains a reference ID can be referenced from other nodes in the format
tree. You can specify such a reference when you define mapping rules, conditions, or
aggregation. You must assign unique reference IDs (within the tree). When you delete
a node that contains a reference ID, be sure that no references to this node exist.

In the Attributes tab page, specify the following:
o
o
Under Attributes section, specify details such as name, short description, length, type and
level
Under Mapping Procedure section, select one of the following source type:

Constant
Used if any constant value is the source

Reference to tree node
Used if the node value is determined by the value of another node in the format tree. You
can assign this relationship by means of a reference ID.

Aggregation
Used if the value of this node results from the aggregation of other node values.

Atom Handling
Used if the final value of an element is derived by combining the values of atoms in
different ways

No Mapping
Used if no source value is assigned to the node.

Structure
Used if the source field is from the payment specific structures such as FPAYH,
FPAYHX, and FPAYP. You can see the structures in transaction SE11.

Exit Module
Used if the information is retrieved by an exit module.
Steps to create exit modules:
a) Run transaction SE37.
b) In the Function Builder: Initial Screen, specify the following in the Function module
field, and choose Copy
 DMEE_EXIT_TEMPLATE_EXTEND_ABA (for releases 500 and above)
 DMEE_EXIT_TEMPLATE_EXTENDED (for 470 release)
c) In the Copy Functional Module dialog box, specify the following and choose Copy:
 Fr Function Module: Name of the standard template exit module
 To Function Module: Name of the exit module that you want to create
 Function Group: Name of the function group in which you want to create the
exit module
d) Save and activate the function module in your package.



In the Source tab page, specify the constant or structure field from where you want to get the
information.
In the Condition tab page, specify the conditions, if any
In the Comment tab page, specify comments, if any
6. Similarly, you create the various nodes in the DMEE tree.
7. Save and activate your DMEE format
Customizing settings for DMEE Format
(Note) Here, we use the DMEE format “CGI_XML_CT”, which has a format parameter structure, as an
example. The DMEE format CGI_XML_CT has the format parameter structure “FPM_CGI”.
Create Payment Medium Workbench (PMW) Format:
1. Run transaction OBPM1
2. Choose New Entries.
3. Enter the name of your DMEE format in the Format field, and populate the other fields as shown
below:
4. In the Dialogue Structure tree, click on Event Modules for Payment Formats
5. Attach function module name for event 05, which is used to fill the reference fields. To do this,
choose New Entries in the menu bar and select Event 05 as shown in the screen shot below:
Events of PMW:
The Payment Medium Workbench contains several predefined events (positions in the coding). If during
the process flow of the PMW, such an event is reached and if a function module is assigned to this event
in the customizing (transaction OBPM1 and OBPM3), then this function module will be executed.
The following events are available for the usage by SAP:
Event no.
Event name
00
Fill sort field
05
Fill additional reference fields
10
Check format parameters
20
Start/File header
25
File close/open
30
Order/transaction record
40
End/file trailer
Process:
1. Event 20
Function module DMEE_START is called and the DME file is opened
2. Event 05
Fills the reference fields for the REGUH records
3. Event 30
Calls the function module DMEE_PUT_ITEM in a loop for every entry of table
REGUP that corresponds to the first REGUH entry
4. Event 25
Calls the function module DMEE_NEW_FILE and checks whether a new file needs to be created
according to the key field settings in the format tree definition.
5. Event 40
Calls the function module DMEE_END and closes the DMEE file
If required, it prints the SAPScript form.
6. In the Dialog Structure tree, click on Text Fields for Reference Information and make any necessary
changes to the number and length of text fields as shown below:
Define Payment Method for Country
1. Run transaction FBZP
2. Choose Pmnt methods in country
3. Choose New Entries and populate the fields for your country format as shown in the example below.
Here, the payment method T(Bank Transfer) of the country TH has the DMEE format CGI_XML_CT.
4. In the Payment medium group box, select Use payment medium workbench radio button and
populate the Format field with the value of name of your DMEE format
5. In the Dialog Structure, choose Note to Payee by Origin in the dialog structure and assign the note to
payee to the transaction
Note:
Before specifying the Note to Payee in the above dialog box, you need to create the Note to Payee
structure in transaction OBPM2 per your business requirement.
Create Note to Payee
1. Run transaction OBPM2
2. Choose New Entries
3. In the subsequent screen, maintain entries as follows:
4. In the Dialog Structure box, select Default Note to Payee
5. Choose New Entries and maintain entries as follows:
6. Save the changes and assign the Note to Payee to the format using transaction FBZP.
Assign Payment Method and Country to Company Code
1. Run transaction FBZP
2. Choose Pmnt methods in country
3. Choose New Entries and populate as shown in below screen shot
4. Save your changes
Generation of DMEE File
Once you do create vendor master data, post vendor invoice, and then execute the payment run or
payment proposal or payment run (by F110), you execute the report SAPFPAYM or transaction FBPM to
generate the output DME payment file.
1. Run transaction FBPM
2. Specify the details as shown in screen shot
3. Choose Execute
Creation of Variant
You can create the variant for a particular payment run date and identification.
1. Run transaction FBPM
2. Specify the following details:
 F110 Run Date
 Identification


Select Proposal run check box if you have only executed the proposal run ad not the
payment run
Payment medium format name
3. Choose Save (Ctrl +S) to save the variant. The system displays the following screen:
4. Specify the variant name, description, and choose Save. The system saves the variant
Download