/
SFTP Reception - “Parameters” -> “Processing”

SFTP Reception - “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:

  • Mode of the file construction. Modes supported are:

    • Create: The file is always created, if there is a file with the same name it is overwrote.

    • Append: Creates the file, if there is a file with the same name the message content is appended to the existing file keeping its content.

    • Add Time Stamp: Creates a file whose name is the name defined in the channel configuration with a timestamp added.

    • Add Message ID: Creates a file whose name is the name defined in the channel configuration with the message ID added.

    • Add Counter: Creates a file whose name is the name defined in the channel configuration with a counter added.

    • Mode to put the file. If the adapter transfers the file to a temporary file and later move it to the wanted file (“Via Temporary file”) or if the file is directly created since the transfer beginning (“Directly”).

    • The maximum number of concurrent connections allowed against the SFTP server for this channel can be defined. If the maximum number of connections is reached, the processing of the following files will throw an error. If the communication is synchronous, it will throw an error. If the communication is asynchronous, these messages will be set in “waiting” status in the adapter being reprocessed automatically.

    • The processing of empty files, with the following options:

      • An empty file is wrote.

      • The message is ignored and no file is created.

      • Definition of the file type indicating if it is binary or text.


Parameters to define these functional aspects are:


File Construction Mode: How to create the file with 4 possible options:

  • Create: Selecting this option the following parameters will be shown:

    • Overwrite Existing File: Selecting this option, the existing file will be overwrote. If the file is not found, an error will be thrown.

    • Append: If the file exists, appends the information at the end of the file.

    • Add Time Stamp: Creates the file with the defined name concatenated to the timestamp of the creation time.

    • Add Message ID: Creates the file with the defined name concatenated to the PI message ID.

Put File (Not defined if the mode is append): How to transmit the information:

  • Directly: Create the target file directly.

  • Via Temporary File: Use a temporary file during the data transmission. Using this option, the name of the temporary file must be defined.

    • Temporary File Name Schema: Temporary file name schema used during the data transmission to avoid collisions. The communication channel will automatically add the unique ID behind the name defined in the configuration.

Empty Message Handling. How to process the empty PI messages:

  • Write Empty File: Creates the file without information.

  • Ignore: Ignores the message and creates nothing.

File Type: How to transmit the files:

  • Binary

  • Text

File Encoding (only for type text): Define 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