Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

correlation using filename of target filename and ack filename

Hi everyone, need your help once again.

i have a file->file scenario.The source will send a file which needs to be transformed to the target structure.At the time of placing the file in the target folder, we need to use some of the fields of the target structure in the target filename.

For eg.if the target filename has got the following fields:

<name>

<class>

<college>

then the target filename will be <name>.<class>.<college>.out

For each file placed in the target, an acknowledgement is generated which is based on the target file and is of the followign format-

<name>_<class>_<college>_out.ack

This mean that we have to replace the '.' in target filename with an '_' and add an .ack in the end to make the ack filename.

We have to correlate the 2 files i.e. target and ack.

i'm usign a BPM and am usign this filename as a correlation field.However, the 'filename' field is never present in either the target file structure or the ack filename.I have extracted both the filename in the mapping.

My problem is after i have extracted the targetfilename in the mapping, i need to have a send step in order to use correlation.However, there is no folder available to keep this file which contains the target filename.Can anyone tell me an alternative to the send step?

I'll tell each step in BPM in detail so that you guys get a clear picture of what the question demands.

1) a receive step to receive teh file placed in the source folder.

2) i use a block in which i place a fork.The fork has 2 branches.

2a)In the first branch, i use transformation step to get teh desired target structure.

2b) In the second branch, i use a transformation step to get the target filename in another dummy DT which has got a field name for storign the target filename.Now in the mapping i have the filename to use for correlation.However, no correlation field comes in the properties section for activation.

3) In another block i receive the Ack file and get the filename into a DT.I choose Correlation in the properties.

Please note that i cant use a send step after 2b step since i have no folder to place the dummy file into.Also without a send step, correlation field wotn appear in the properties section..

Your help will be highly appreciated.

Former Member
Former Member replied

Easier way would be to place the file with your desired name. Then before picking it up again, use Script or OS command to rename the file as per your requirement and then correlation will identify it correctly.

Regards,

Prateek

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question