Create External Output File via Assistant
Explanation
Use this activity to create an output file, by reading source data,
packing it and then reading the lines to the file.
The assistant can handle any file type and file template defined in External
Files. This means that this is a multi-purpose assistant that
can handle the same actions as existing interfaces, e.g. the External Supplier
Invoices Interface in Invoice.
A special feature is when you want to extract data from
a source view. This is easily done by doing the following:
- Create a file type and a file template by using the
special create function in the External File Types window.
- Start the assistant and supply the created file type
and template. Supply parameter values, i.e. select conditions, and start the
processing.
- Look up the created file on disk.
In this special case the general output method
External_File_Utility_API.Create_External_Output is executed, that will mainly
use the associated parameter values to define select criteria when reading data
from a source view. The parameter value can be specified according to the
following:
Critera |
Notation |
Equal |
1010 |
Not equal |
!= |
Larger than |
> |
Less than |
< |
Larger than or equal to |
>= |
Less than or equal to |
<= |
LIKE |
10% |
NOT LIKE |
!10% |
IN |
1010;1020;1030 |
NOT IN |
!1010;1020;1030 |
BETWEEN |
1010..1030 |
NOT BETWEEN |
!1010..1030 |
Prerequisites
- An external file type must be available.
- A parameter set must be available if it should be
possible
to supply parameter values during the output phase.
- A valid and active file template with template
definitions for output files that is associated with the file
type must be available.
- If an output file is defined then the file path must
be valid if Online processing. For Batch processing the file path and name is
of course essential but can not be validated before starting the process.
System Effects
The output process will gather data, pack them to a
string according to the file template and then write the data to an output
file.
Restrictions
Unicode Restrictions
- File Generation in Finance
Window
External File Assistant
Related Window Descriptions
External
File Assistant
Procedure
- Open the External File Assistant.
- Choose processing mode, Online or Batch.
- Click Next.
- Supply file options on this page, i.e. external file
type, parameter set, external file template and the file name.
The file direction is set automatically according to the following:
- If the referenced parameter set has the parameter
FILE_DIRECTION_DB defined then the direction according to the value for this
parameter will be used.
- Else if the file template has definitions for
either input files or output files then the existing definition will decide
the direction.
- If the file template has definitions for both
input and output files then output will be the suggested direction.
Make sure that the file direction is OutputFile.
- Click Next.
- If a parameter set was supplied that has associated
parameters then these parameters will be displayed along with defined default
values. The values supplied are normally used as select criteria. Modify the values for each parameter if necessary. Click List,
if available, to get valid values for each parameter. The field might
also support a drop down list with valid values.
- If the processing mode is Online then click
Finish to start the process, else click Next.
- If the processing mode is Batch then define
the scheduling of the batch job and start the process by clicking Finish.