SFTP Sending - “Parameters” -> “Processing”
In this section, the file processing parameters for the channel are defined. Furthermore, the running of operative system commands in SAP NW PI before or after processing each of the files can be configured.
“Processing Parameters”
Parameter list, to be report in the channel, to configure the file processing. The following aspects can be defined:
Quality of Service can be Best Effort (BE) – synchronous, Exactly One (EO) – asynchronous or Exactly One in Order (EOIO) – asynchronous with messages arriving in order.
Trigger mode defines the activation mode of the message collection. “Trigger by polling” means that every certain time the adapter channels search files to be processed in the corresponding file systems. “Trigger by file” means that a particular file must be present to process the specified files. Different trigger modes are:
Trigger by polling: The files are processed every certain time, which is previously parameterized.
Trigger by polling and by file (one trigger file per file): The files are processed every certain time, which is previously parameterized, if and only if the specified trigger file is present for each file. If the trigger file is not present, the file will not be processed and will be ignored.
Trigger by polling and by file (one trigger file per all): The files are processed every certain time, which is previously parameterized, if and only if the specified trigger file is present. In this case, only this file must be present to process all files that comply the criteria for selecting files to be processed in the channels. If the trigger file is not present, the files will not be processed and will be ignored.
Polling interval to collect files.
File processing mode. There are 3 pre-established modes to process the files collected by the adapter:
Test – Collects the files from the directory and creates the respective messages to be processed in SAP NW PI, but the file is not deleted from the directory so in the next poll it will be processed again. If the message processing is configured with a trigger file and/or a signature file and/or a checksum file, these files will not be deleted either.
Archive – Collects the files from the directory and creates the respective messages to be processed in SAP NW PI. The file is deleted from the source directory but it is archived again in the configured directory of the file system of the configured SAP NW PI or in the directory of the file system of the configured SFTP server. When the file is deleted from the reading directory of the channel, this file will not be found in the next poll. This mode controls the file name so the “message system” of the AAE will not allow processing a file with the same name. If the message processing is configured with a trigger file and/or a signature file and/or a checksum file, these files will also be archived. There is an exception, if the check “Delete Trigger File” is activated the trigger file will be deleted.
Delete – Collects the files from the directory and creates the respective messages to be processed in SAP NW PI. The file is deleted from the source directory. When the file is deleted from the reading directory of the channel, this file will not be found in the next poll. This mode controls the file name so the “message system” of the AAE will not allow processing a file with the same name. If the message processing is configured with a trigger file and/or a signature file and/or a checksum file, these files will also be deleted.
The empty file processing, with the following options:
The file is collected but a message is not created in SAP NW PI (Do Not Create Message).
The file is collected and an empty file is created in SAP NW PI (Process Empty files).
The file is ignored, is not collected and no message is created in SAP NW PI (Skip Empty Files).
The archiving of messages with errors. A directory of the file system of SAP NW PI can be configured, where the files collected by the adapter are stored and whose processing in the "module processor" threw an error.
Definition of the file type being able to define if it is a binary or a text type.
The parameters to define these functional aspects are:
Quality of Service (QoS): 3 possible values:
Best Effort (BE): Synchronous call
Exactly Once (EO): Asynchronous call
Exactly Once in Order (EOIO): Asynchronous call defining the queue so messages are compulsorily processed in order.
Queue Name (Only for QoS EOIO): Queue name to be used in the processing.
Trigger Mode: Defines the mode of file collection. Possible values are:
Trigger by polling: File processing is launched each time interval defined by “Poll interval”.
Trigger by polling and by file (one trigger file per file): File processing is launched each time interval defined by “Poll interval”, if and only if for each file to be processed there is a trigger file whose name complies with the name schema defined in the parameter “Trigger file name schema”.
Trigger by polling and by file (one trigger file per all): File processing is launched each time interval defined by “Poll interval” if and only if there is a trigger file whose name complies with the name schema defined in the parameter “Trigger file name schema”.
Trigger file name schema: This parameter must only be defined if “Trigger Mode” is set as “Trigger by polling and by file (one trigger file per file)” or “Trigger by polling and by file (one trigger file per all)”. It is the name schema of the trigger file. If the trigger mode is “Trigger by polling and by file (one trigger file per file)”, the following special characters for the parameter value are allowed.
%f: File name to be processed.
%fwoe: File name to be processed without extension.
On the other hand, if the trigger mode is “Trigger by polling and by file (one trigger file per all)” special characters are not allowed.
Poll Interval (secs): Time interval in seconds between each attempt to read new files to be processed by the adapter.
Poll Interval (msecs): Additional wait time in milliseconds for the interval of file collection.
If “Poll Interval (secs)” is “null”, the polling interval will be “Poll Interval (msecs)”.
If “Poll Interval (secs)” and “Poll Interval (msecs)” are “null”, the polling will only be done once.
Retry Interval (secs): Wait time in seconds for the adapter to process an erroneous file again.
If the entered value is higher than 0 and lower than “Poll Interval”, a reprocessing is done after “Retry Interval (secs)” seconds.
If the value is empty or higher than “Poll Interval”, the reprocessing will be done in the next poll.
Processing Mode: How to process the file after reading:
Archive: If this option is selected, files are archived with the following parameters:
Delete Trigger File: Flag to delete the trigger file in the message processing.
Add Time Stamp: Flag to archive the file with the original name preceded by the time stamp of the processing time (with “yyyyMMdd-Hhmmss-SSS” format).
Archive Directory: Directory where the file is archived.
Archive Files on SFTP Server: Flag to archive processed files on the SFTP server. If it is not selected, files are stored in a directory of PI.
Test: No action is taken after reading.
Delete: Detete file.
Empty File Handling: How to process empty files:
Do Not Create Message: The file is processed (it is archived or deleted as specified), but no message is generated in PI.
Process Empty Files: The file is processed as usual.
Skip Empty Files: The file is ignored.
Archive Faulty Source Files: Flag to store files processed incorrectly. These files will be stored in directories visible to SAP NW PI by NFS. A timestamp can be added to the file name depending on the configuration.
File Type: How to transfer files:
Binary
Text
File Encoding (only for file type text): Defines the encoding of the text file reading.
“Run Operating System Command Before Message Processing”
Runs an operative system command (in SAP NW PI) before processing the message.
Command Line: Command to be executed.
To define file paths in the command, the native directory separator of SAP NW PI must be used. This means that if the machine is Windows directory paths use “\” separator, but if the machine is Linux use “/” separator.
Timeout (secs): Execution timeout. A timeout for the command execution can be forced. If a timeout is not define, the system default timeout is 5 seconds.
Terminate Program After Timeout: Flag to end the execution after the timeout. If it is not selected, command execution will continue in the background until it end or the adapter timeout is reached (5 seconds).
“Run Operating System Command After Message Processing”
Runs an operative system command (in SAP NW PI) after processing the message.
Command Line: Command to be executed.
To define file paths in the command, the native directory separator of SAP NW PI must be used. This means that if the machine is Windows directory paths use “\” separator, but if the machine is Linux use “/” separator.
Timeout (secs): Execution timeout. A timeout for the command execution can be forced. If a timeout is not define, the system default timeout is 5 seconds.
Terminate Program After Timeout: Flag to end the execution after the timeout. If it is not selected, command execution will continue in the background until it end or the adapter timeout is reached (5 seconds).
Related content
Avvale 2024