cancel
Showing results for 
Search instead for 
Did you mean: 

File Receiver Channel : variable substitution

Former Member
0 Kudos

Hi

I am using variable substitution in my multimapping.   I have created separate structure for file name field. My structure is below

<MyMessage>

     fileName

     <Item>

          field1

          field2

          field3

     </Item>

</MyMessage>

In my content conversion, i am only using Item node.

File is being created with correct file name however, there is blank empty line is being created as first line because of fileName field in the structure.

I don't want that empty blank line at top .

I can not use dynamic configuration or operating system command/ file after message processing.

any idea.

Accepted Solutions (0)

Answers (6)

Answers (6)

zameerf
Contributor
0 Kudos

Hello,

You can place the fileName field below the Item node as suggested.

If the structure cannot be changed for some reason and if the output file is fixedLength, then you may try configuring the below parameters.

fileName.fieldFixedLengths 0

fileName.fixedLengthTooShortHandling cut

fileName.endSeparator '0'

-Zameer

Former Member
0 Kudos

Hi All,

Putting file name field below my structure will create empty line at the end of the file and  I don't want that.

@Zameer, my file is not fixed length file, its CSV file.

Former Member
0 Kudos

Hi,

Ch my reply in below thread:

http://scn.sap.com/thread/3152116

Thanks

Amit Srivastava

former_member472138
Active Contributor
0 Kudos

Placing FileName node parallalally below to  Item node will solve your prob. Don't use this in FCC parameters.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,


File is being created with correct file name however, there is blank empty line is being created as first line because of fileName field in the structure.

I don't want that empty blank line at top .

You can place the fileName field at the bottom of your structure

<MyMessage>

     <Item>

          field1

          field2

          field3

     </Item>

     fileName

</MyMessage>

Hope this helps,

Mark

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

Instead of using an empty value for the separators for the fileName element that Greg has mentioned use the following specification and PI will not include any separator at all:

fileName.endSeparator:  '0'

If you couple this with the approach Greg has mentioned above then it should solve your problem.

Regards,

Ryan Crosby

baskar_gopalakrishnan2
Active Contributor
0 Kudos

We discussed similar situation, You might want to check the link  This is pretty fcc behavior.  Check the Greg's reply on this.

http://scn.sap.com/thread/3166709

former_member184681
Active Contributor
0 Kudos

Hi,

If you only use one recordset structure in receiver FCC, PI uses the attributes given for all the nodes in the XML structure (including fileName in your case), which is why it puts the new line. In order to fix it, you can try the following set of FCC parameters:

Recordset Structure: fileName, Item

fileName.endSeparator (empty - do not provide any value)

For Item, use the set of parameters as of your requirement.

I'm not quite sure if PI will be able to interpret the empty end separator properly, but it seems worth trying. If this doesn't help, then Dynamic Configuration is your only solution.

Regards,

Greg