on 10-31-2008 2:23 PM
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
The Problem is that we are not sure how many Such Quantites be comming
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.