cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver FlatFile

Former Member
0 Kudos

Experts please help...

I have a scenario where I want to use content conversion on the Receiver side...

My structure is like this...

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

<ns33:MT_dhlManifestFlat xmlns:ns33="urn:dhl.com:scm.logistics.manifest">

<Header>

<RECORD_TYPE>HD</RECORD_TYPE>

<METER_NO>34001</METER_NO>

<FILE_DATE>30/09/2005</FILE_DATE>

<RUN_NUMBER>001244</RUN_NUMBER>

<NO_RECORDS>00000007</NO_RECORDS>

<LAYOUT_VERSION>000002</LAYOUT_VERSION>

<GAZ_VERSION>0086</GAZ_VERSION>

</Header>

<SenderAddress>

<RECORD_TYPE>AS</RECORD_TYPE>

<COUNTRY_CODE>GB</COUNTRY_CODE>

<BRANCH_CODE>077269</BRANCH_CODE>

<ORG_NAME>A Company</ORG_NAME>

<DEPT_NAME />

<ADDR_LINE1>19999 Clayton Road</ADDR_LINE1>

<ADDR_LINE2>Salthouse Road</ADDR_LINE2>

<TOWN>Northampton</TOWN>

<POSTCODE>NN4 7EZ</POSTCODE>

<CNCT_TITLE />

<CNCT_INITS />

<CNCT_SNAME />

<CNCT_JOBTL />

<CNCT_TEL>01255666666</CNCT_TEL>

<CNCT_FAX>15444488</CNCT_FAX>

<CNCT_VAT />

<ACNT_IN_PARTNER />

<EUROEXPRESS_ACNT />

</SenderAddress>

<ConsignmentHeader>

<REC_TYPE>CO</REC_TYPE>

<ACNT_NO>061181072</ACNT_NO>

<CONT_NO>1111116</CONT_NO>

<COLL_PT>0004</COLL_PT>

<MANIFEST_NO>0000000000</MANIFEST_NO>

<NOTE_NO>001</NOTE_NO>

<COLL_DATE>20/09/2005</COLL_DATE>

<START_PAR_NO>065410315526</START_PAR_NO>

<END_PAR_NO>065410315526</END_PAR_NO>

<NO_PARCELS>000001</NO_PARCELS>

<NO_PALLETS>000</NO_PALLETS>

<SVCE_OPTION />

<NO_CONS>0001</NO_CONS>

<CONS_WGT>0100.00</CONS_WGT>

<CONS_LEN>0000</CONS_LEN>

<CONS_WIDTH>0000</CONS_WIDTH>

<CONS_HGT>0000</CONS_HGT>

<SENDER_REF>0800000270</SENDER_REF>

<COST_CENTRE />

<RECEIVER_REF>YURN921</RECEIVER_REF>

<MANIFEST_TYPE>FTP</MANIFEST_TYPE>

<VOLUME>0000.00</VOLUME>

<NETT_WEIGHT>0000.00</NETT_WEIGHT>

<NO_UNITS>000001</NO_UNITS>

<SERVICE />

<PAYMENT_TYPE />

<REFRIGERATED />

<HAZARDOUS />

<CONTENTS />

</ConsignmentHeader>

<DeliveryAddress>

<RECORD_TYPE>AD</RECORD_TYPE>

<COUNTRY_CODE>GB</COUNTRY_CODE>

<BRANCH_CODE>077269</BRANCH_CODE>

<ORG_NAME>WOOLWORTHS</ORG_NAME>

<DEPT_NAME />

<ADDR_LINE1 />

<ADDR_LINE2>28/32FERRYQUAY STREET</ADDR_LINE2>

<TOWN>LONDONDERRY</TOWN>

<COUNTY />

<POSTCODE>BT48 6JD</POSTCODE>

<CNCT_TITLE />

<CNCT_INITS />

<CNCT_SNAME />

<CNCT_JOBTL />

<CNCT_TEL>01923 425000</CNCT_TEL>

<CNCT_FAX />

<CNCT_VAT />

<CNCT_E_MAIL />

<ACNT_IN_PARTNER />

<EUROEXPRESS_ACNT />

</DeliveryAddress>

<Parcel>

<RECORD_TYPE>PA</RECORD_TYPE>

<MANIFEST_NO>0000000000</MANIFEST_NO>

<NOTE_NO>001</NOTE_NO>

<PARCEL_NO>065410315526</PARCEL_NO>

<PARCEL_WGT>0000.00</PARCEL_WGT>

<PARCEL_LEN>0000</PARCEL_LEN>

<PARCEL_WIDTH>0000</PARCEL_WIDTH>

<PARCEL_HGT>0000</PARCEL_HGT>

<NETT_WEIGHT>0000000</NETT_WEIGHT>

<VOLUME>0000000</VOLUME>

<KIND>PARCEL</KIND>

<FACT_ID>J </FACT_ID>

<IOD_REQUESTED> </IOD_REQUESTED>

<EE_IDENT_CODE>025410315521</EE_IDENT_CODE>

<INBOUND_REF />

<PARCEL_CONTENT />

</Parcel>

<Trailer>

<RECORD_TYPE>TR</RECORD_TYPE>

<NO_RECORDS>00000007</NO_RECORDS>

</Trailer>

<MetaData>

<fileNo>244</fileNo>

</MetaData>

</ns33:MT_dhlManifestFlat>

<b></b>So you can see that I have flattened the structure<b></b>

My conversion parameters are....

Header,SenderAddress,ConsignmentHeader,DeliveryAddress,Parcel,Trailer,

Header.fieldFixedLengths 2,5,10,6,8,6,6,

Header.endSeparator 'nl'

SenderAddress.fieldFixedLengths 2,3,6,35,35,35,35,35,9,8,12,35,35,25,25,17,17,17,

SenderAddress.endSeparator 'nl'

ConsignmentHeader.fieldFixedLengths 2,9,7,4,10,3,10,12,12,6,3,1,4,7,4,4,4,35,5,35,8,7,7,6,4,1,1,1,70,

ConsignmentHeader.endSeparator 'nl'

DeliveryAddress.fieldFixedLengths 2,3,6,35,35,35,35,35,35,9,8,12,35,35,25,25,17,40,17,17,

DeliveryAddress.endSeparator 'nl'

Parcel.fieldFixedLengths 2,10,3,35,7,4,4,4,7,7,6,2,1,35,35,70,

Parcel.endSeparator 'nl'

Trailer.fieldFixedLengths 2,8,

Trailer.endSeparator 'nl'

Now the problem is that on the receiver side my file is coming out blank....

Could someone let me know what I am missing...

Message was edited by:

SAP XI

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

See this link is very usefull to you,

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

The other way is

As per my understanding , one field is in sender side , but you want in receiver side payload also ,but in output you want exclude it ,

take such type element

create a UDF with resultlist , create one global variable set the value into that and map to root it will come into receiver payload value,later in Adapter use specific parameters .. "in mapping", you can eliminate in the output

let me know if you are not clear..

Regards

Chilla.

Former Member
0 Kudos

I have that in there but I dont understand how this will help?

I still have to specify the field and its fixed length or I get an error... I have tried fixed length=0 but I get an error

Former Member
0 Kudos

Ok Guys, Thank you for your help...

It turns out that there was a node/structure in the payload which I didn't specify... which was causing the error... As soon as I added it to the parameters it worked...

So my next question is how do I exclude that particular structure? Basically I have a node called Metadata... which I have added to my target structure purely so that I can use variant substitution. I take the value of this field and use it in my filename... However I dont want it in my end File...

Is there a way which I can exclude it or does it have to be present?

Former Member
0 Kudos

Hi,

Just right click on the node and click on Disable Field. Then it will not consider further.

---Satish

Former Member
0 Kudos

Satish this doesnt work because then the field which I need for the Variable substitution does not occur....

So Basically I need this field/node to be present in the inbound payload for the variable substitution but I do not want it in my target File...

Can I do this?

Former Member
0 Kudos

Ok then do onething. You add this field in the end. Then in the receiver content conversion you dont specify this field. Also add in the content conversion the parameter NameA.absoluteRowWidth=<noOfColumns> In this you dont specify this column. Then it should work.

Go through this help for further info:

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

---Satish

Former Member
0 Kudos

Thank you Satish...

As you mentioned I added field MetaData into my trailer element and didnt specify it in the conversion... I used the parameters as you mentioned... see below....

I used the following paramters

NameA.absoluteRowWidth=<noOfColumns> 2

I received the following error message....

Last message processing started 16:06:52 2007-01-29, Error: Message processing failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '244')', probably configuration error in file adapter (XML parser error)'

Former Member
0 Kudos

Hi,

First I would rather suggest to make your scenario work. Then you can try the variable substitution. So first disable this field and dont do variabe substitution in receiver comm channel. First let the scenario work.

Once this is done then you can go with variable substitution. This are my views. If we do this it will be difficult to troubleshoot also because we dont whether the error is with variable substitution or with the scenario itself.

---Satish

Former Member
0 Kudos

The content conversion does work... the scenario works fine... But when it comes to excluding the MetaData Field from the scenario then it all goes wrong...

So the MetaData field is within the Trailer Element.....

The trailer element has three sub elements including the metadat field and this is specified in the conversion parameters.

I then added your last suggestion in an attempt to exclude the metadata field from the final file but sure enough it is present in the file....

Former Member
0 Kudos

can anyone share some information on how to exclude a field that must be present in the outbound payoad from XI but wehn it goes through a file adapter with content conversion should be excluded?

Shabarish_Nair
Active Contributor
0 Kudos

use the option - fixedLengthTooShortHandling - cut

Ref: /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12 for more details.

Former Member
0 Kudos

OK I was using the separator just to see if the structure was ok for Content Conversion which it was... so I am not using a field separator anymore...

There are no errors... I receive a file but it is empty...

In SXMB_MONI the payload is populated as expected but when I get the final file there is nothing in there

prabhu_s2
Active Contributor
0 Kudos

using the payload in MM testing do you get the target strucutre? If yes then check in CC monitoring in RWB.

Former Member
0 Kudos

Ok since you say your message is getting in sxmb_moni then the sender side is ok. Now can you please test your mapping as given in this weblog:

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

If this is working can you please check whether you have any errors for the receiver communication channel in adapter monitoirng.

---Satish

Former Member
0 Kudos

I thought it might be worth mentioning that when I use the following parameters the file is received ...

Header

Header.fieldSeparator ,

Header.endSeparator 'nl'

These are the only parameters... I do not mention any of the other nodes

the above parameters produce a flat file but the problem is that the fields are not formated correctly so I cannot use this

Message was edited by:

SAP XI

prabhu_s2
Active Contributor
0 Kudos

check with the weblog:

<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion:///people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Former Member
0 Kudos

Hi,

You are saying the file is Fixed length file. If it is that is there any reason why you want to use <b><i>Header.fieldSeparator ,</i></b>

Anyway first check whether your file is receiving in XI or not. For this check whether you can see the message in SXMB_MONI. If you receive then take the payload from SXMB_MONI and then check your mapping. If your mapping is working fine then please check your receiver communication channel in adapter monitoring. Let us know if you have any errors in this steps.

---Satish