cancel
Showing results for 
Search instead for 
Did you mean: 

Suppressing Field In Receiver File Adapter

Former Member
0 Kudos

Hi

I have a Data type with fields

1. name

2. No

3. city.

I am using File adapter @ receiver end to create a flat file using this data type. But the requirement is to have only 2 fields in the Output file( say name , no). How to suppress the city field from being populate in the target file( I dont want even separator/Delimiter or blank spaces for city field but separator is needed btwn name & no)

Appriciate ur help

Regards

Kishore

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Kishore~

One way is without mapping the field as mentioned. In this case you can disable the field in the target structure.

Second option- if you have separate node for the City, then you can use CUT parameter in the content conversion of the Receiever File Adapter.

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

Third option- little bit complex- Writing a Java Module in the Receiver File Adapter

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

option 1 is ruled out (it was mandatory to have the city field in target message as iam using it for variable substitution.)

I also tried ur 2nd options but it's creating extra line with 0 space.this will be a problem as i am using field separator it's coming extra.

3rd option is not possible as we don't have SP15 .

thanks for ur help

Regards

Kishore

Former Member
0 Kudos

Does any body know ho to suppress last lines in afile using file Adapter @ receiver side

thanks for ur help

Regards

Kishore

moorthy
Active Contributor
0 Kudos

Kishore-

Just have a look into this thread-http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

<i>I also tried ur 2nd options but it's creating extra line with 0 space.this will be a problem as i am using field separator it's coming extra.</i>

If you do City is a part of another node(e.g CityNode) in the Data structure, and then if you use this CityNode in the Content Conevrsion(Receiver) with Cut Parameters, then I don't thik so , you will get the extra field separator or space. Just check with the blog mentioned earlier.

<i>3rd option is not possible as we don't have SP15 .</i>

Inorder to write Adapter Java modules , it is not required to have SP15. It is there in much earlier SPs.

For this you can check this thread-

http://help.sap.com/saphelp_nw2004s/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/frameset.htm

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

That problem got solved. The thing is v need to define structure with single row instead of multiple fileds n use field separator as nl n end separator as 0.

Regrds

Kishore

moorthy
Active Contributor
0 Kudos

Hi Kishore,

If it is solved, please close the thread by marking helpful answers.

Thanks,

Moorthy

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

hi kishore,

like Udo mentioned, the best and d simplest way would be to not even map this field(name) when you do your mapping.

This way, it will not be created in your target message after mappping and therby you do not have to worry abt it during content conversion in your file adapter

Regards,

Bhavesh

udo_martens
Active Contributor
0 Kudos

Hi Kishore,

i think the easiest way would be, if you dont map that field - dont create a target field "city".

Regards,

Udo