Point 1)- Define the fixed position Check file required by the third party software AND
Point 2)- Map our required text file against the standard Oracle Payments Disbursement XML file.
OK - let's get to the meat of the solution.... building the actual ETEXT template.
Point 3)- Build an ETEXT template according to the structure defined in point 1 and based upon the XML file from point 2.
ETEXT templates are used to generate Fixed or delimited text files from BI Publisher.
All commands are created within a RTF document( i.e. MS Word).
ETEXT templates start with global commands and then have line commands for each line required in the file and field commands for each individual field within the line i.e. to produce our 3 line text file from Part 2:
NCKEVIN WOODROW 01-JUN-20081872 1000,000.00 |
12 HOLLYWOOD BLVD LOS ANGELES |
CALIFORNIA 90210 |
The ETEXT template structure is:
- GLOBAL FILE COMMANDS
--- NEW LINE COMMANDS
------ FIELDS WITHIN LINE COMMANDS
--- NEW LINE COMMANDS
------ FIELDS WITHIN LINE COMMANDS
--- NEW LINE COMMANDS
------ FIELDS WITHIN LINE COMMANDS
GLOBAL FILE COMMANDS:
These are the commands and parameters that affect the whole text file being produced. This includes:
- TEMPLATE TYPE: the type of text file being created i.e. Fixed or delimited
- OUTPUT CHARACTER SET: the appropriate character set
- NEW RECORD CHARACTER: the character used to mark the end of a line and the start of a new line i.e. carriage return
NEW LINE COMMANDS:
These commands affect the line as it written to the text file i.e.
- LEVEL: the corresponding parent tag or level within the XML file.
- DISPLAY CONDITION: any conditions that must be met before the line is written
- NEW RECORD: the addition of a new line marker to the file
FIELDS WITHIN LINE COMMANDS: These commands add each individual field to the current line. They include: - POSITION: the starting position of the field on the line(for Fixed position files) - LENGTH: the length of the field - PAD: any required padding of the field - DATA: the source of the field i.e. a default value or an element fromthe XML file
For greater explanation, check out Chapter 4 of the BIP User Guide.
OK - that's the talk finished!!!
Here is an example ETEXT template and Payments XML file to build the 3 line text file specified in Point 1 in Part 2 of this blog series:
Use the 'Template Viewer' supplied with Oracle BI Publisher desktop to test them for yourself.
OK, I admit that it is a simple example - but I hope that it is just enough to get you started with your own template!!!
As always, let me know :-)