cancel
Showing results for 
Search instead for 
Did you mean: 

Sender FCC , problem with Repeating Field under a Sub-structure

Former Member
0 Kudos

Hi,

I have an Input File as

D,TH_ ,10/31/2008,ABC,pieces

PF, 10/31/2008,11/2/2008,11/3/2008,11/4/2008

P,mat,CS,100,120,130,125,150,170,120

P,mat,CS,100,120,100,110,140,120,110

I need to Implement an FCC to convert this to

a Structure like this

Recorset

Header 1....1

Unique Id

date Time

CustomerCode

Code

Unit

Dates 1

date 1....n

Products 1....n

product 1

unit 1

quantity 1.....n

This this is a Variable recordset type ( i.e each ROW has a Different Structure) the following keys D,PF,P are defined, for the header, dates, and Product Information.

The Following FCC parameters are applied

Document Name : MT_FILE_INPUt

Document NameSpace = http://xyz.com

Recordset Name = "Recordset"

Recordset structure = Header,1,Dates,1,Products,*

keyname = Key

Keytype = String

Header.FieldSeprator = ,

Header.FieldName = Unique Id,date Time,CustomerCode,Code,unit

Header.keyValue = 'H'

Dates.FieldSeprator = ,

Dates.Fieldname = 'date'

Date.keyValue = 'PF'

Products.FieldSeprator = ,

Product.FieldName = product,unit,quantity

Product.KeyValue = 'P'

Now the Problem is as Follows:

1) I have a Repeating Field Quantity under the Product and Date under the Dates Sub-structure, This is not getting Repeated at all.

Is there a Way to achieve the same

2) Another Point is That, i do not want to take the key Value in the XML structure after converion, is there a way to avoid it

Please let me know if any blogs are available

Any help would be appreciated.

Thanks,

Best Regards

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The Problem is that we are not sure how many Such Quantites be comming

Former Member
0 Kudos

i haven't seen this scenario for now.. but what you can do is

1) Sender FCC, get the entire quantity in single field.... NameA.additionalLastFields

2) Use message mapping and create UDF which will split the quantity and do mapping to get target structure

you can use fixedLength to indentify P, mat, CS and rest of it as Product... Then do as mentioned above...

P,mat,CS,100,120,130,125,150,170,120

P,mat,CS,100,120,100,110,140,120,110

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Anand,

Thanks answer

The key Issue would now be resolved

But In case of problem 1, I have the date and the quantity Fields Repeating, can this be achieved.

The above Blog does not help me in the same

Regards

Abhishek

Former Member
0 Kudos

can u try.. i haven't tired this.

quantity is occuring multiple times, but if that is fixed no# of occurance,, you can can try with this?

P,mat,CS,100,120,130,125,150,170,120

Product.FieldName = product,unit,quantity,quantity,quantity,quantity,quantity,quantity

let me try ..

As long as the quanitfy defined under Product.FieldName are more than the input msg quantity values (100,120..), you will be safe...

Edited by: Anand on Oct 31, 2008 3:54 PM

Former Member
0 Kudos

> 1

Try :

> 2) Another Point is That, i do not want to take the key Value in the XML structure after converion, is there a way to avoid it

>

NameA.keyFieldInStructure=ignore