cancel
Showing results for 
Search instead for 
Did you mean: 

FCC Content convertsion problem

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The question is answered.

Former Member
0 Kudos

How did you resolve?

abhay_rajhans2
Contributor
0 Kudos

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'

abhay_rajhans2
Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi

The i/p file same comes as

000001234 MZR000952234

000003423 MZR000952234

000009678 MZR000952234

Regards

kiran

Former Member
0 Kudos

Hi Experts,

000001234 we have a empty spaces for (salesorg,distribution channel and division. ) .Next represents indicator and function and no.

Regards

Kiran

former_member181962
Active Contributor
0 Kudos

Hi Kiran,

Did you specify any fieldSeperator anywhere?

Can you show us the strtuctre that you have defined in IR and the other settings you have made in the file sender adapter?

Also, check if there are any empty lines at the start of the file.

Regards,

ravi Kanth Talagana

Former Member
0 Kudos

Hi Ravi,

I have forwarded the structure and the test data to you. please let me know where i am going wrong

Regards

Kiran

Former Member
0 Kudos

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