cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File Adapter - File Content Conversion

Former Member
0 Kudos

Hi,

We are in XI 3.0 SP12. We have a scenario, where we have the

following structure to be written in the file.

Root

|__Item1

|__Item2.

We want to write a file with name Item2.txt(which is achieved with the

help of SP12) but the data in the file should not contain the value of

Item2. How we can achieve the same??

In the File content conversion, we are giving the parameters:

Recordset : Root

Root.fieldNames Item1

Root.endSeparator 'nl'

Root.fieldSeparator ,

In the content conversion parameter we are not mentioning Item2 at

all, still in the output, Item2 is being written. How can we avoid this

scenario.

Thanks & regards,

Jayakrishnan

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Guys,

I found out Solution for this problem, this is how it works. Configure as following in Receiver File Adapter:

Recordset Structure: |__Item1, |__Item2

|__Item1 - Your configure what you want.

|__Item2.addHeaderLine 0

|__Item2.fieldFixedLengths 0

|__Item2.noOfColumns 0

|__Item2.fixedLengthTooShortHandling Cut

This will supress all the data in |__Item2 node. But the it will leave a blank line as a net result. So if the other party can handle with blank at the ends you should be good.

Tip: Please always put the structures you want to supress in the end of the structure definition otherwise it will result in blank lines in the middle.

Hope this helps.

Thanks and Regards

Sujan

Former Member
0 Kudos

Hi Moorthy,

The solution to your problem is don't map the <ITEM2> field of IDOC with the output file structure.

There is no solution using file content conversion.

Hope it helps

Regards

Arpit Seth

Former Member
0 Kudos

Hi,

My source & target structure is as follows

Root

|__Item1

|__Item2

Am mapping Item1 & Item2 and its 1:1 mapping only.

Now as mentioned earlier, i want to name my output file with the value of Item2 and in the file data only Item1 should be there in the file. Hope am clear.

Thanks & regards,

Jayakrishnan

stefan_grube
Active Contributor
0 Kudos

I think there is no solution for this problem.

The only idea i have (but not tested so far) is hiding the parameter you need for the filename in a substructure or attribute, so the content conversion would not "see" it.

Regards

Stefan

Former Member
0 Kudos

Hi,

Is it possible to retrieve the attribute value of a field as the file name scheme? If so how it can be done...<b>Message:message_id</b> and <b>payload:root,1,e1,1</b> is also working fine...

Thanks & regards,

Jayakrishnan

stefan_grube
Active Contributor
0 Kudos

Sorry - no, Attributes don't work.

There is no solution for CSV conversion.

Regards

Stefan

Former Member
0 Kudos

Hi,

My scenario is like, my target structure is as follows:

Root

|__Item1

|__Item2

Here from this structure, i'll be using the value of Item2 as the file name and <b>in my file data only Item 1 should go in</b>. I have used the configuration mentioned above in adapter config.

But as Moorthy as replied, am getting Item1, Item2 in the file data. How i can avoid the same???

Thanks & regards,

Jayakrishnan

Former Member
0 Kudos

Hi jayakrishnan,

I think a solution to your problem lies in the message mapping.

Can you tell us how have you done the mapping?

Regards,

Divya

Former Member
0 Kudos

Hi Jaykrishna

1)Please elaborate your problem as it is not very clear.

2)The File content conversion parameters which you are giving is of which side sender or reciever.

3)I'll suggest you to please review your sender and reciever datatype structure with that given in help.sap.com.

4)And last but not the least give the input data which you are tryng to send.

Regards

Arpit Seth

moorthy
Active Contributor
0 Kudos

Hi Arpit,

I am also facing the similar problem.

My scenario: IDOC->XI->File

In my Outbound Message(i.e from XI) I have 2 fields under Root Segment.

But in my output file I need to get only one field.

For eg. Message is like this

<Root>

<Item1>"test"</Item1>

<Item2>"Hello"</Item2>

</Root>

My output should look like this:

"test"

But now I am getting

"test","Hello"

Here I don't want "Hello", in my output.

As we know it is very limited properties for content conversion in receiver side of the File Adapter, we are unable to restrict the output.

Actually I need to print only one field in my output file. i.e I need to get Item1 contents.

But I am getting both Item1 contents as well as Item2 contents.

I think it is not required to see the Message types/Data types. Because I need to print only some fields in my file. Not everything. But all the fields are required for to execute my logic.

I think it will help you understanding my scenario.

R/

Moorthy

Former Member
0 Kudos

Hi Jayakrishnan,

If you don't want the File to contain value of item2 then at the time of message mapping please don't map item2 from the sender data type to your receiver data type.

Or you can even omit the inclusion of item2 in the receiver data type.

And if you are facing some problem in the configuration of receiver file adapter then please refer this link, a good weblog by Mr. Arpit Seth.

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

I hope it helps.

Thanks & Regards,

Varun Joshi

Former Member
0 Kudos

In my earlier reply i mentioned data types. I am sorry for that, i meant message types. Message mapping is always between message types.

please try what i have written in that reply at the time of message mapping and feel free to get back for more doubts.

Thanks and Regards,

Varun Joshi