Hi Techies!
This method can be used to set the file name from the
information in the payload. You can assign values in the receiver payload to
the file name using this method. File adapter has the option of defining
variable and assigning the variable to the file name.
In the below example
<poNumber> field in the receiver structure is assigned to the file name
in the format <po number>_Date-Time.XML.
First find the element in the target structure which you
need to assign to the file name.
Define a variable for the data element in the receiver file
communication channel.
1, 1, 1 are the occurrence of the data element in the payload. Variable is set from the first occurrence of the poNumber tag of the first occurrence of the orderDetail tag in first order tag.
Assign the variable to the file name.
Test results
PO number of the first occurrence is assigned to the file
name.
SAP PI, SAP PI 7.31 single stack, variable substitution,
file adapter, dynamic file name, file scenario in PI, payload, ASMA, message monitor, XML communication, variable substitution, Isuru Fernando