cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting header line in receiver file adapter using fcc

Former Member
0 Kudos

Hi,

I need the field names to be populated in csv file in header along with another header.

Material group

MaterialNumber, Name

12345, Test

i have used the below in fcc in receiver file adapter.

Transaction.fieldSeparator'nl'
DETAIL.addHeaderLine2

DETAIL.headerLine   Material

DETAIL.fieldSeparator,
DETAIL.endSeparator'nl'
DETAIL.fieldNamesMaterialNumber,Name

When I tried to give addHeaderLine as 1 to see only the field names in csv, it is also not working. Cache content is upto date.

Mapping is simply one to one.

Please let me know if anything missing.

Accepted Solutions (0)

Answers (5)

Answers (5)

Vimalsap
Participant
0 Kudos

1. AF_Modules/StrictXml2PlainBean - Add this is module Name

2. xml2plain - Module key

3. Local Enterprise Bean

Parameter

addHeaderLine - fromConfiguration

headerLine - (give whatever you want to see in HeaderLine)

This is for receiver file adapter.

Former Member
0 Kudos

Thanks Amt. It worked. I am facing another issue like in name values are coming as test1,test2 for one material and in target csv file these two are showing in two different columns.

But client needs it in one column (test1,test2) and number in other column.

I used trim but it is not working.

Former Member
0 Kudos

Hello,

Don't club multiple questions in one thread.

So, close this thread and raise a new one.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit. I can see the header field names now.

But I need two header lines like :

Material Group

Material , Name

12345, test

I gave aadHeaderLine as 2 and headerLine as Material Group , but now it is only showing Material Group not field names.

I tried to give 3 but it is giving blank space but not field names. For 4 also no result.

Can you please tell how to get both.

Former Member
0 Kudos

Hello,

>>But I need two header lines like :

I am not sure using FCC we can do this, but there is a workaround.

In mapping, use duplicate subtree option on "Details" node and then map fields present under first instance of "Detail" node with constant values like:

Constant(Material) ----GroupIndentifier

Constant(Name)------Name

and then do normal mapping for the second instance of "Detail" node .

and eventually use below FCC:

Detail.aadHeaderLine  ------   3

Detail.headerLine -----------  Material group

Detail.fieldSeparator----------   ,

Detail.endSeparator----------   'nl'

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi,

I tried to give but no result.

Please find screen shot. When I used addHeaderLine 1 , only to see the header fields still no result found. In output file only values are showing not field names.

Former Member
0 Kudos

Hello,

IMO, u should change ur structure.

Remove Transaction node from target structure (MT_Name -> Detail)  and use below FCC:

Detail.aadHeaderLine  ------   1

Detail.fieldSeparator----------   ,

Detail.endSeparator----------   'nl'

Thanks

Amit Srivastava

former_member184720
Active Contributor
0 Kudos

Hi Swapna -

DETAIL.addHeaderLine2

DETAIL.headerLine   Material

As you can see below, you can mention(to store header line) .headerLine when addHeaderLine is set to 3. May be try setting it to 3.

Converting File Content in the Receiver Adapter (SAP Library - Partner Connectivity Kit)

NameA.addHeaderLine

Specify whether the text file will have a header line with column names. The following values are permitted:

  • – No
  • 1 – Header line with column names from the XML document
  • 2 – As for 1, followed by a blank line
  • 3 – Header line is stored as NameA.headerLine
  • 4 – As for 3, followed by a blank line


However can you share the screenshot of your receiver structure and sample output file. Could not understand the requirement.