cancel
Showing results for 
Search instead for 
Did you mean: 

addHeaderLine FCC parameter not working with complex receiver structure in PI 7.31

Former Member
0 Kudos

Hi All,

I am doing file to file scenario in sap pi 7.31.

I have a requirement to get field names at receiver side txt file for the below structure:

Recordset     0...unbounded

Header          1

LineItem          1...unbounded

I am using the below FCC but it is not working:

Header.addHeaderLine3
Header.headerLinekey,EBELN,LIFNR,BEDAT,UNSEZ,WAERS,ZTERM,INCO1,INCO2,EKORG,EKGRP,BUKRS,F06
LineItem.addHeaderLine3
LineItem.headerLinekey,UNSEZ,EBELP,MATNR,TXZ01,MENGE,MEINS,EEIND,MATKL,NETPR,WERKS,LGORT,KZABS,KOSTL,WEPOS,MWSKZ,NAME1,STREET,CITY1,REGION,POST_CODE1,COUNTRY,F03,F01
Header.fieldNameskey,EBELN,LIFNR,BEDAT,UNSEZ,WAERS,ZTERM,INCO1,INCO2,EKORG,EKGRP,BUKRS,F06
Header.fieldSeparator|
Header.endSeparator'nl'
Header.missingLastFieldsadd
Header.keyFieldValueH
LineItem.fieldNameskey,UNSEZ,EBELP,MATNR,TXZ01,MENGE,MEINS,EEIND,MATKL,NETPR,WERKS,LGORT,KZABS,KOSTL,WEPOS,MWSKZ,NAME1,STREET,CITY1,REGION,POST_CODE1,COUNTRY,F03,F01
LineItem.fieldSeparator|
LineItem.endSeparator'nl'
LineItem.missingLastFieldsadd
LineItem.keyFieldValueL

Please see that I am able to do this for simple structures at receiver side.

Can anyone provide me some inputs for the same.

Thanks

Neha

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Neha,

make the header line to 0 and poulate the header at mapping level itself as required i.e. duplicate subtree and pass the field names as first then your actual mapping later.

Regards

Prasad Konda

Former Member
0 Kudos

I guess there should be some way in fcc only rather than doing mappig explicitly.

Former Member
0 Kudos

Hi Neha,

Please check below link:

http://help.sap.com/saphelp_nw73/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm?frameset=...

○  NameA.addHeaderLine

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

■  0 – No header line

■  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 in the configuration and is applied

■  4 – As for 3, followed by a blank line

This specification is only permitted if exactly one structure is defined.

Thanks,

Beena

Former Member
0 Kudos

Hi,

PFA the xml file getting generated after mapping.

Thanks

neha

*****************************File************************************************************************

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_PurchaseOrderDD xmlns:ns0=http://abc.com/>

   <Recordset>

      <Header>

         <key>H</key>

         <EBELN>4500000193</EBELN>

         <LIFNR>0010000002</LIFNR>

         <BEDAT>08/21/2013</BEDAT>

         <UNSEZ/>

         <WAERS>PHP</WAERS>

         <ZTERM>0001</ZTERM>

         <INCO1>CFR</INCO1>

         <INCO2>Test</INCO2>

         <EKORG>JB01</EKORG>

         <EKGRP>001</EKGRP>

         <BUKRS>1010</BUKRS>

         <F06/>

      </Header>

      <LineItem>

         <key>L</key>

         <UNSEZ>4500000193</UNSEZ>

         <EBELP>00010</EBELP>

         <MATNR>000000002000000091</MATNR>

         <TXZ01>Mock IT FERT (Do Not Touch)-1</TXZ01>

         <MENGE>30.000</MENGE>

         <MEINS>KGM</MEINS>

         <EEIND/>

         <MATKL>121645</MATKL>

         <NETPR>120</NETPR>

         <WERKS>JB01</WERKS>

         <LGORT/>

         <KZABS/>

         <KOSTL/>

         <WEPOS/>

         <MWSKZ/>

         <NAME1>JB  JWSL Depot</NAME1>

         <STREET>Bicutan KM 17 West Service Road, Br</STREET>

         <CITY1>Parañaque City</CITY1>

         <REGION>NCR</REGION>

         <POST_CODE1>1234</POST_CODE1>

         <COUNTRY>PH</COUNTRY>

         <F03/>

         <F01/>

      </LineItem>

      <LineItem>

         <key>L</key>

         <UNSEZ>4500000193</UNSEZ>

         <EBELP>00020</EBELP>

         <MATNR>000000002000000122</MATNR>

         <TXZ01>burger</TXZ01>

         <MENGE>20.000</MENGE>

         <MEINS>PCE</MEINS>

         <EEIND/>

         <MATKL>121645</MATKL>

         <NETPR>20</NETPR>

         <WERKS>JB01</WERKS>

         <LGORT/>

         <KZABS/>

         <KOSTL/>

         <WEPOS/>

         <MWSKZ/>

         <NAME1>JB  JWSL Depot</NAME1>

         <STREET>Bicutan KM 17 West Service Road, Br</STREET>

         <CITY1>Parañaque City</CITY1>

         <REGION>NCR</REGION>

         <POST_CODE1>1234</POST_CODE1>

         <COUNTRY>PH</COUNTRY>

         <F03/>

         <F01/>

      </LineItem>

      <LineItem>

         <key>L</key>

         <UNSEZ>4500000193</UNSEZ>

         <EBELP>00030</EBELP>

         <MATNR>000000002000000061</MATNR>

         <TXZ01>Finished product-1</TXZ01>

         <MENGE>15.000</MENGE>

         <MEINS>EA</MEINS>

         <EEIND/>

         <MATKL/>

         <NETPR>15</NETPR>

         <WERKS>JB01</WERKS>

         <LGORT/>

         <KZABS/>

         <KOSTL/>

         <WEPOS/>

         <MWSKZ/>

         <NAME1>JB  JWSL Depot</NAME1>

         <STREET>Bicutan KM 17 West Service Road, Br</STREET>

         <CITY1>Parañaque City</CITY1>

         <REGION>NCR</REGION>

         <POST_CODE1>1234</POST_CODE1>

         <COUNTRY>PH</COUNTRY>

         <F03/>

         <F01/>

      </LineItem>

   </Recordset>

</ns0:MT_PurchaseOrderDD>

******************************************EOF***************************************************************

praveen_sutra
Active Contributor
0 Kudos

Hope you are using same parameters.

I am doubting because your line items are not coming in new line eventhough you have given.

LineItem.endSeparator'nl'

and in the screenshot there is only one line item generated.

thanks and regards

Praveen T

Former Member
0 Kudos

No...this recordset structure is givng error.

Former Member
0 Kudos

Hi,

The file is getting generated but not the header lines.

I am using this in Receiver File channel.

See below the output txt file(PIPE delimited) which I am getting without field names:

praveen_sutra
Active Contributor
0 Kudos

Hi Neha,

Instead of

Header.addHeaderLine3
Header.headerLine

key,EBELN,LIFNR,BEDAT,UNSEZ,WAERS,ZTERM,INCO1,INCO2,EKORG,EKGRP,BUKRS,F06

Use

Header.addHeaderLine 1

No need to give Header.headerLine

thanks

Former Member
0 Kudos

Hi Praveen,

I have already tried with value as 1 but still no change in output.

Muniyappan
Active Contributor
0 Kudos

Hi,

could you please share us the xml file (after the mapping executed) ?

Regards,

Muniyappan.

praveen_sutra
Active Contributor
0 Kudos

Hi Neha,

Probably just try for Header and not for line Item see if it works.

thanks and regards,

Praveen T

praveen_sutra
Active Contributor
0 Kudos

Hi Neha,

Do you mean the header line is not coming in the file generated or the file itself is not getting generated?

Could you please go to receiver communication channel and see if there is any error in logs ?

if yes then please paste the error.

thanks and regards,

Praveen T

Muniyappan
Active Contributor
0 Kudos

Hi,

which side are you using FCC in sender or receiver?

for me it looks like you are combining both the sender and receiver FCC parameters.

correct me if i am wrong.

check this link if it helps you: http://scn.sap.com/message/13943977

Regards,

Muniyappan.