cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file name from input payload (RFC 2 flat file)

Former Member
0 Kudos

Hi,

I have an RFC to flat file scenario. The output flat file has not an XML structure, it's just a plain text file generated with abap mapping.

In my source interface (RFC), I have a field called <FILENAME>, I want to use the value of that field to create the target file using dynamic file name. But if in variable substitution I use payload:ZRFC_NAME,1,FILENAME,1 It doesn't work because the dynamic variable substitution try to access to output payload, not the source one...

What can I do?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marshal,

You can add a extra node to your target strucutre like

FileName- Node

--FileName - Element.

do the mapping from the field filename of RFC to FileName field in u r target strucure. And use this field path at Refrence in variable subtituion.

In the Content converison add the Name & Values as below

FileName.fileldNames -- FileName

FileName.fieldFixedLengths -- 0

FileName.fixedLengthTooShortHandling -- Cut

So the extra field in u r target structure would not populate in u r target text file.

Cheers

Veera

Former Member
0 Kudos

Thanks for your proposals but I can't use that solution

Because my target file is a very complex flat file that can't be generated by content conversion and I generated it by ABAP Mapping.

But the abap mapping process deleted all the XML headers and tags and XI can't access to the payload because it don't have any structure and It's useless add a node because is not accessible.

Former Member
0 Kudos

Hi,

You can have one extra field in receiver side to receive the name of file in receiver. You can always suppress this field to stop this field to come in payload.

You can see Sravya Talanki blog to suppress the field to come in output.

Kulwinder

Reward if Helpful

Former Member
0 Kudos

The blog is:

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12