cancel
Showing results for 
Search instead for 
Did you mean: 

FTP receiver file-data sequence is not correct

Former Member
0 Kudos

Hi Experts,

I am configuring Proxy to file (content conversion scenario) . I am working on PI 7.1 SP9

I have used canonical data type. its structure is as below:

Stock

Item

INV_DT

STOREID

AM_PART_NO

AM_PART_DESC

AVAILABLE_QTY

In receiver side i am creating a TAB delimited file. in this file sequence of data field should be same(as in data structure).

when i run the proxy the data field sequence is same but once file at FTP is getting created, in that field sequence is not same

i checked in ESR->Message mapping

since both side same data structure is there . once i fill up the values and press execute , i see that result side(target side),

field sequence is changed. but i want the same qequence.

please suggest me how to maintain the sequence in target side so that i can get tab delimited file which contains field values in the same sequence.

Thanks

sandeep sharma

Accepted Solutions (1)

Accepted Solutions (1)

abhijitbolakhe
Advisor
Advisor
0 Kudos

Hi Sandeep

This happens if no value is populated for some fields...it will skip the blank records.

You should use 1..1 cardinality while creating your target data type and see to that in the mapping if the source side element is not present, even then you should create the target element.

use if-else function or use Mapwithdefault function.

As long as your target message has the empty element, the file will generate properly.

Regards

Abhijit

Former Member
0 Kudos

Hi Abhijit

thanks for the reply

Ist: i can't use 1:1 crdinality (as per my business requirement)

2nd: i am not leaving any field blank i am passing values to all fields.all the value are coming in target side

just order is coming random

reagrds

sandeep

Edited by: sandeep sharma on Dec 3, 2009 6:44 AM

former_member187339
Active Contributor
0 Kudos

Hi Sandeep,

The query looks confusing can you provide an example for the source and target XML structure. Also the FCC parameters in receiver file adapter..

Regards

Suraj

Former Member
0 Kudos

Hi Suraj

i have made a data structure whose structure is as below:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Stock xmlns:ns0="urn:sample.com:StockReport:C_CANONIC">
   <item>
      <INV_DT/>
      <STORE_ID/>
      <AM_PART_NO/>
      <AM_PART_DESC/>
      <AVAILABLE_QTY/>
      <RETURNED_QTY/>
      <CUST_ID/>
      </item>
</ns0:Stock>

this is canonic structure which i am using for sender and receiver data type. i have done simple 1-1 mapping.

for this i want a tab delimited file to be generated at FTP. In that file field value should be in the same sequence as in the data structure. As below:

INV_DT         STORE_ID         AM_PART_NO   AM_PART_DESC       AVAILABLE_QTY         RETURNED_QTY        CUST_ID

but i can see filed values are not in this order but it is in random order even if i am passing all values and no blank values.

when i test this in ESR mapping, after filling test values once i press execute , i can see random order values in target side.

please suggest how to maintain sequence.

Thanks

sandeep

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all

my issue is resolved

since i have changed this sequence but i have not refreshed the cache so values are coming in the previud order

i have refreshed the cache and now values are coming in the right oreder.

Regards

sandeep