How to Design an Electronic Format in Electronic File Manager Format Definition
Transcript of How to Design an Electronic Format in Electronic File Manager Format Definition
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
1/27
SAP Business One
How -To Guide
PUBLIC
How t o Des ign an Elec t ron ic Fi le
Form at in Elec t ron ic Fi le Manager :
Form at Def in i t ion
Appl icable Releases:
SAP Busi ness One 8.8,
SAP Busi ness One 8.81
and
SAP Busi ness One 20 07 A SP01
Al l Count r ies
Engl ish
December 2010
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
2/27
SAP AG 2010 2
Table of Contents
Purpose ........................................................................................................................................... 3Creating a Format to Export Business Partners from SAP Business One .............................. 4Mapping between the source format tree and the target format tree ..................................... 10Creating Runtime Validation Rules for Target Nodes .............................................................. 15Other Reference Material ............................................................................................................. 26Copyrights, Trademarks, and Disclaimers ................................................................................ 27
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
3/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 3
PurposeThis how-to guide provides an example of using the Electronic File Manager: Format Definition add-on
to design a GEP (Generic Electronic File Format Project) format to export business partners from SAP
Business One.
You can use the source file (BPList.rpt) and the target file (BPList.xsd or BPList.xml) that are
attached to the how-to guide to complete the example. SAP also provides you with the completed
format (BPList.gep).
The how-to guide describes in detail each of the following steps used to create the format:
1. Create a format project.
2. Add a source file. You can use the attached source file (BPList.rpt).
3. Add a target file. You can use the attached target file (BPList.xsd or BPList.xml).
4. Set up property.
5. Map the format between source tree and target tree.
6. Add the validation rules.
7. Verify the format.
8. Conduct a test run of the format.
For other formats, such as BPP (Bank Payment File Format Project) and SSP (Special-Purpose File
Format Project), you can use the example as a reference.
For more information about the Electronic File Manager: Format Definition add-on, see the online help
for Electronic File Manager: Format Definition.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
4/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 4
Creat ing a Form at t o Ex por t Bus iness
Part ners fr om SAP Busin ess OnePrerequisites
You have started SAP Business One.
Procedure
1. From the SAP Business One Main Menu, choose Tools Electronic File Manager: Format
Definition.
2. To create a GEP format, do one of the following:
On the Start Pagetab, under Create a new format project, click Generic Electronic File
Format Project.
Choose (New) or choose File Newand do the following:
i. In the Create a New Formatwindow, select (Generic Electronic File
Format Project).
ii. To specify the path, choose the ellipsis button and choose the path.
iii. Specify the format name and choose the OKbutton.
A default mapping is created.
3. To add the source file for the GEP format, do the following:
a. Right-click the Sourcefolder and choose Source Add RPT.
b. In the Openwindow, select the BPList.rpt file, and choose the Openbutton.
The source file is added in the Sourcefolder and its format structure appears in a tree structureon the mapping tab.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
5/27
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
6/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 6
6. To add a target file for the GEP format, right-click the Targetfolder, choose Add, and selectXML.
7. In the Add XML Targetwindow, do one of the following:
Select Import an XML schemaand choose the OKbutton.
In the Open window, select the BPList.xsd and choose the Openbutton.
The imported XML schema file is added to the Targetfolder and its format structureappears in a tree structure as read only on the mapping tab.
In the opened window, select BPListas the root node for the XML structure and choosethe OKbutton.
Select Import the structure from an XML documentand choose the OKbutton,
In the Open window, select the BPList.xml and choose the Openbutton.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
7/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 7
The imported XML file is added to the Targetfolder and its format structure appears in atree structure on the mapping tab.
8. To view the target format tree in different views, do one of the following:
Full view or compact view: Right-click the format tree head and choose the view to which
you want to switch.
Customized compact view: do the following:
i. Display the XML format tree in full view.
ii. To hide a non technical node, click the non technical node until the node is greyed
out, for example, .
To display the non technical node, click the (Eye) icon attached to the node
until the node is enabled, for example, .
Note
All, Choice, and Sequenceare technical nodes.
iii. Display the XML format tree in compact view.
9. Map between the source format tree and the target format tree by mapping the following targetnodes to the relevant source nodes and configure the relevant mapping settings:
Source Node Target Node
Group Header #1 Country
GroupNameCountry1 Name
Details BP
CardType1 IsSupplier
CardName1 Name
Balance1 Balance
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
8/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 8
For more information, seeMapping Between the Source Format Tree and the Target Format
Tree.
10. Create runtime validation rules for all the target nodes except for the target node BPList.
For more information, seeCreating Runtime Validation Rules for Target Nodes.
11. To verify the format for the mapping settings or the validation rules of the target tree, do one ofthe following:
Click (Verify).
Choose ProjectVerify.
Press F6.
The verification checks the mapping settings of only the nodes required by the imported XMLschema and the validation settings of all the nodes.
After the verification is finished, a message listing errors, warnings, or information appears onthe Messagetab.
To display different types of messages, choose the Error(s), Warning(s), or Informationbutton.
By default, all types of messages are displayed on the Messagetab.
To export messages, right-click any space on the Messagetab and choose Export All. In theSave Aswindow, specify the file name, and choose the Savebutton.
12. To start a test run, do one of the following:
Click (Test Run).
Choose ProjectTest Run.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
9/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 9
Press F5.
You test run the format with the embedded value in the source .rpt file.
If the test run succeeds, the Outputtab automatically displays the simulated XML content. Tosave the test run results, right-click any space on the Outputtab and choose Export All. In the
Save Aswindow, specify the file name, and choose the Savebutton.
If the test run fails, the messages are displayed on the Messagetab. For runtime data validationfailure, the messages you specify on the Validationtab appear.
You can test run the format with external data. For more information, see the Test RunningFormats in the online help of the Electronic File Manager: Format Definition add-on.
13. To save the formats, do one of the following:
Choose FileSave.
Click (Save).
Choose FileSave As and specify the new format name.
Result
You can import the format into SAP Business One.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
10/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 10
Mapping Betw een the Source Format Tree
and the Target Form at TreeYou can map between the source format tree and the target format tree by creating connections and
mapping rules for each node required in your format solution.
Procedure...
1. To map a source node to a target node, do the following:
a. Click the node in the source format tree.
b. Drag and drop on the node to which you want to map in the target format tree. A
connection line is created.
c. To enable mapping setting, right-click the target node and choose Mapping Setting.
The Mapping Settingtab is enabled.
2. For the target node: Country, select No Valuefor Value.
No value is outputted; however, for each Group Header#1 node in the source file, a Countrynode is created in the XML file.
Note
The No Valueoption is automatically selected for the target nodes that are elementcontainers. The element container node cannot be filled with any value.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
11/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 11
3. For the target node: Name(under the Countrynode), select Copy Value From Source Nodefor
Value.
The output value for Nameis its source node value.
4. For the target node: BP, select No Valuefor Value.
No value is outputted; however, for each Detailsnode in the source file, a BPnode is created inthe XML file.
5. For the target node: IsSupplier, specify the following mapping condition details:
Mapping rules determine the value output at runtime execution.
Condition: If the condition is met at runtime, the relevant output value is used.
Else condition: If none of the conditions are met at runtime, the relevant output value is used.
a. Select the source node: CardType1.
b. In the Propertiesarea, in the Reference No. field, specify CardType.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
12/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 12
c. To add a condition, choose .
d. Specify the following details of the expression for the condition:
i. For Type1, select Function.
ii. For Arg1, specify substring(%CardType,1,1).
iii. For Op, select Equals to.
iv. For Type2, select Constant.
v. For Arg2, specify S.
The condition is met when the first character of CardType1 is S.
Note
You use %CardTypeas the reference no. for the source node CardType1. Reference no.is the reference code or alias of the node. You can use the reference code or alias torefer to the node in the function or the condition of another node.
substring(string, number, number?)
Description: Returns the substring of the first argument starting at the position specifiedin the second argument and having the length specified in the third argument.
The index begins at 1.
Sample: substring(12345,2,3) returns 234.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
13/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 13
Select the Constant Valueradio button and specify True. If the condition is met atruntime, no value will be outputted.
e. Select the Else Conditioncheckbox.
f. Select the Constant Valueradio button and specify False.
If the condition is not met at runtime, the output value is the constant value: False.
6. For the target node: Name(under the Sequencenode), select Copy Value From Source Node
for Value.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
14/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 14
The output value for Nameis its source node value.
7. For the target node: Balance, select Copy Value From Source Nodefor Value.
The output value for Balanceis its source node value.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
15/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 15
Creat ing Runt im e Val idat ion Rules for
Target NodesAt runtime, the validation rules check the relevant values retrieved from SAP Business One. You canprovide a warning or error message for any error that may occur during runtime validation:
Error message: If any error occurs, the message appears and the validation process fails.
Warning message: If any error occurs, the message appears but the validation process
continues.
Procedure...
1. To add a validation rule for a target node, do the following:
a. Click a node in the target tree.
b. Select the Validationtab.
c. Choose and select one of the following validation parameters:
Length
Number of Occurrence
Valid Value
Data Range
Customize
d. Specify the details for the validation rule.
Note
If you import the XML schema file BPList.xsd as the target file in step 6, the validationrules are already included in the file.
2. To add validation rules for the target node: Sequence, select Number of Occurrenceand specify
1 in the Fromfield and 1 in the Tofield.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
16/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 16
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to 1,Sequence).
3. To add a validation rule for the target node: Country, select Number of Occurrenceand specify
1 in the Fromfield.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
17/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 17
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to infinity, Country).
The country name is allowed to appear more than once at runtime. If the validation rule isbroken, the error message appears.
4. To add validation rules for the target node: Name, do the following:
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
18/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 18
Number of Occurrence: 1 in the Fromfield and 1 in the Tofield
The error message is automatically changed to format({0} - Number of occurrence isoutside range 1 to 1,Name).
The country name is allowed to appear only once at runtime. If the validation rule isbroken, the error message appears.
Valid Values: Add DE, GB, and USto the valid value list.
The error message is automatically changed to format( Name - {0} is not a validvalue in list DE, GB, US,.).
Only the value covered in the valid value list is allowed at runtime. If the validation rule isbroken, the error message appears.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
19/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 19
5. To add a validation rule for the target node: Sequence, select Number of Occurrenceand
specify 1 in the Fromfield and 1 in the Tofield.
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to 1,Sequence).
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
20/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 20
6. To add a validation rule for the target node: BP, select Number of Occurrenceand specify 1 in
the Fromfield.
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to infinity, BP).
The BP element container is allowed to appear more than once at runtime. If the validation ruleis broken, the error message appears.
7. To add validation rules for the target node: IsSupplier, do the following:
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
21/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 21
Number of Occurrence: 1 in the Fromfield and 1 in the Tofield
The error message is automatically changed to format({0} - Number of occurrence isoutside range 1 to 1,IsSupplier).
The IsSupplier attribute is allowed to appear only once at runtime. If the validation rule isbroken, the error message appears.
Valid Values: Add Falseand Trueto the valid values list.
The error message is automatically changed to format( IsSupplier - {0} is not a validvalue in list False, True,.).
Only the value covered in the valid values list is allowed. If the validation rule is broken,the error message appears.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
22/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 22
8. To add a validation rule for the target node: Sequence, select Number of Occurrenceand
specify 1 in the Fromfield and 1 in the Tofield.
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to 1,Sequence).
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
23/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 23
9. To add validation rules for the target node: Name, select Number of Occurrenceand specify 1 in
the Fromfield and 1 in the Tofield.
The error message is automatically changed to format({0} - Number of occurrence is outsiderange 1 to 1,Name).
The name is allowed to appear only once at runtime. If the validation rule is broken, the error
message appears.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
24/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 24
10. To add validation rules for the target node: Balance, do the following:
Number of Occurrence: 1 in the Fromfield and 1 in the Tofield
The error message is automatically changed to format({0} - Number of occurrence isoutside range 1 to 1,Balance).
The Balance attribute is allowed to appear only once at runtime. If the validation rule isbroken, the error message appears.
Data Range:Specify 0 in the Fromfield and select the Inclusivecheckbox. Leave the To
field empty and select the Inclusivecheckbox.
The error message is automatically changed to format(Balance Value {0} is outsiderange 0 to infinity,.).
The allowed balance range is from zero to infinity. If the validation rule is broken, theerror message appears.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
25/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 25
Note
You can create validation rule of data range for the only target fields with the type asNumber or Date. The target field type is determined in the XML schema. If you manuallycreate a target field, you cannot set the field type in the Electronic File Manager: FormatDefinition add-on. You can only create validation rule of data range for the target fieldswith the type as Number or Date that are imported from an XML schema.
-
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
26/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
SAP AG 2010 26
Ot her Reference Mat er ia lIn addition to the format GEP, the Electronic File Manager: Format Definition add-on for SAP Business
One 8.81 provides the following formats:
Bank Payment File Format Project (BPP): Bank payment format used for exporting payment
data from SAP Business One
This format is used to generate a bank payment file in the payment wizard.
Bank Statement File Format Project (BFP): Bank statement format used for parsing and
importing bank statement data into SAP Business One
BFP is the same format you edit in the Format Definition add-on of SAP Business One 2007and 8.8.
For more information about the Electronic File Manager: Format Definition add-on, see the online help
for Electronic File Manager: Format Definition.
The Electronic File Manager: Format Definition add-on for SAP Business One 2007 A SP01 and 8.8
provides the following formats:
Special-Purpose File Format Project (SPP): A generic format used for various special business
purposes with predefined structure
BFP: Bank statement file format used for parsing and importing bank statement data into SAP
Business One
BFP is the same format you edit in the Format Definition add-on of SAP Business One 2007and 8.8.
For more information, see the online help for Electronic File Manager: Format Definition and SAPNote1531223.
http://service.sap.com/sap/support/notes/1531223http://service.sap.com/sap/support/notes/1531223http://service.sap.com/sap/support/notes/1531223http://service.sap.com/sap/support/notes/1531223 -
8/7/2019 How to Design an Electronic Format in Electronic File Manager Format Definition
27/27
How to Design an Electronic File Format in Electronic File Manager: Format Definition
Copyr ight s, Tradem ark s, and Disc la im ers Copyright 2010 SAP AG. All rights reserved.
The current version of the copyrights, trademarks, and disclaimers
athttp://service.sap.com/smb/sbocustomer/documentationis valid for this document.
http://service.sap.com/smb/sbocustomer/documentationhttp://service.sap.com/smb/sbocustomer/documentationhttp://service.sap.com/smb/sbocustomer/documentationhttp://service.sap.com/smb/sbocustomer/documentation