cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Header Node in File Content Conversion

Former Member
0 Kudos

Hi Guys,

In our scenario receiver payload is

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

<ns1:MarketInventoryResponse xmlns:ns1="PRINCIPALS/MarketInventory">

<Header>

<CurrentDate>200809</CurrentDate>

</Header>

<MarketInventory>

<Local_ProductCode>121</Local_ProductCode>

<WH_QTY>20</WH_QTY>

<WH_Cost>3000</WH_Cost>

<Store_QTY>40</Store_QTY>

<Store_Cost>5000</Store_Cost>

</MarketInventory>

</ns1:MarketInventoryResponse>

We are using File content conversion method. Now we got the output is

200809

121#20#3000#40#5000

But We need below mentioned format.

121#20#3000#40#5000

we don't need CurrentDate which is in Header node. So, how to ignore Header node in FCC method. Please any one help me.

Note : Now we using following parameters in FCC

Recordset Structure : MarketInventory

MarketInventory.addHeaderLine : 0

MarketInventory.fieldSeparator : #

MarketInventory.endSeparator : 'nl'

Thanks & Regards

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Either do not map the Header in the mapping or use the following FCC in additional

Recordset Structure : Header,MarketInventory

Header.fieldFixedLengths = 0

Header.fixedLengthTooShortHandling = Cut

Header.endSeparator = '0'

Thanks

SaNv...

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

Prevent mapping of Header node and thats it.

Regards,

Prateek

Former Member
0 Kudos

Hi Vijaya,

Are you using mapping program in your scenario? If so, don't map header and Current Date nodes.

Carlos

Former Member
0 Kudos

Hi Carlos,

Sorry, Actually my requiremnt is receiver file name assigning to dynamically. Example file name is INV_CurrentDate. INV is static and CurrentDate is Dynamically getting from payload. So we using Variable substitution method. In Sender payload doesn't send Current date. In Mapping level we using node functions and getting the current date and mapped to receiver payload. But we need output format is above mentioned. So how to supprise(ignore) the Header node.

Regards

Vijay

santhosh_kumarv
Active Contributor
0 Kudos

Hi Vijay,

You can either remove the node using the FCC that I replied or you could use Dynamic UDF to set the filename rather than using the Variable substution.

Refer My Wiki [More with the File Adapter |https://wiki.sdn.sap.com/wiki/display/XI/MorewiththeFileAdapter]Scenario#2 for the Dynamic UDF Code. By this you could avoid the mapping of the Header field

Thanks SaNv...

Former Member
0 Kudos

Hi Vijaya,

You have two options:

1.- Sãnthosh Kûmãr V Solution:

Recordset Structure : Header,MarketInventory

Header.fieldFixedLengths = 0

Header.fixedLengthTooShortHandling = Cut

Header.endSeparator = '0'

2.- Use Adapter-Specific Message Attributes in your File adapter.

In the last one you would have to set the name of your file in FileName atributte.

Carlos