on 11-20-2009 9:16 AM
Hi Experts,
I have the following strucrure.
Cust no
Sales org
Dist Channel
division
Indicator1
partner function1
partner no1
Indicator2
partner function2
partner no2
Indicator3
partner function3
partner no3
Here The customer no will appear some times salesorg,dist channel,Division wont appear
Indicator1,Partnerfunction1,partnerno1 will appear and the rest indicator2-partfunc2--- indicator 3 wont appear.
I have given in
Record.fieldNames : Customer_Number,Sales_Organization,Distribution_Channel,Division,Partner_Indicator1,Partner_Function1,Partner_Number1,Partner_Indicator2,Partner_Function2,Partner_Number2,Partner_Indicator3,Partner_Function3,Partner_Number3
Record.fieldFixedLengths 10,4,2,2,1,2,10,1,2,10,1,2,10
ignoreRecordsetName true
Record.missingLastFields=true
Still getting the error -Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Record':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this
Could any one please let me know how to fix this issue.
Regards
Kiran
The question is answered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
You can try following option
As you said Customer number field may appear if it does not appear then whether there will be 10 zeros or a space?.
In this case create a string as a source structure .Treat the record in the file as a string.
1) Case 1 : 10 zeros.
In message mapping split the string by length using substring function into target structure.
2) case 2 : Space.
Check whether in string if first character is space then calculate the length using space and distribute in target structure
else use logic mentioned in case 1.
In communication channel maintain following entry:
ignoreRecordsetName = true
Row.fieldNames = line
Row.endSeparator = 'nl'
Row.fieldSeparator = 'nl'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
How the fields in the file are separated by tab or Pipe?
Those fields which may occur or cannot occur then put their occurrences in data type as 0 to 1
The fields which will appear put their occurrence as 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ravi,
I havent specified any fieldSeperator anywhere.
The structure defined in IR:
Record.fieldNames
Customer_Number,Sales_Organization,Distribution_Channel,Division,Partner_Indicator1,Partner_Function1,Partner_Number1,Partner_Indicator2,Partner_Function2,Partner_Number2,Partner_Indicator3,Partner_Function3,Partner_Number3
Record.fieldFixedLengths 10,4,2,2,1,2,10,1,2,10,1,2,10
ignoreRecordsetName true
Record.missingLastFields=true
the particular i/p file contains customer_no followed by empty spaces fpr (SO,DCHANNEL AND DIVISON).
Later on it contains value for Partner_Indicator1,Partner_Function1,Partner_Number1.
Regards
Kiran
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.