on 08-17-2015 8:07 AM
Hi Experts,
I am very new to SAP PI and need help to resolve issue related to FCC in sender file adapter.
We have requirement as below :
file structure will be like
NameA A 1111 2222 33333
NameB B 1111 2222 33333
NameC C 1111 2222 33333
NameD D 1111 2222 33333
NameA A 1111 2222 33333
NameB B 1111 2222 33333
NameD D 1111 2222 33333
Substructure NameC is optional, if there is any value then we need to use it otherwise ignore it.
I have mentioned below values in parameters.
NameA.keyFieldValue
NameA.fieldFixedLengths
NameA.endSeparator
NameA.fieldNames
In Recordset Structure : NameA,1, NameB,1, NameC,*, NameD,1
All is working fine when we have value for substructure NameC but when it not there is file then getting error as below :
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 4: missing structure(s) before type 'NameA').
I have gone through multiple blogs but not got any resolution for this specific error.
Warm Regards,
Naveen K
Hi,
Can you please share your structure.Could you please let us know what is the field separtor between the fields.It seems field separator paramter is missing.As per the above ex:It looks like the separator is space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
I believe you have set the Sequence of your Recordset as Ascending in your Channel FCC Config TAB due to which its trying to search for the Tags / Records in the sequence that you have mentioned in your FCC Structure.
Please change the Sequence from drop down to Variable and test.
Reference:
Converting Text Format in the Sender File/FTP Adapter to XML - Advanced Adapter Engine - SAP Library
You define the start and end of recordsets containing a variable number and arrangement of structures as follows:
Hope it helps
Regards,
Azhar
Hi Azhar,
Thanks for your response.
I have made the changes you suggested but no luck.
I have already gone through the link you have shared but all the parameters talk about any field related to substructure like NameA.XYZ but no such parameter available if NameA itself is missing in the file structure.
Anything else that I can check for this issue.
Warm Regards,
Naveen K
Hi Azhar,
Please find the FCC settings below :
Recordset Name : Recordset
Recordset Structure : SHP_QM,1,L11_DL,*,NAM_02,1,LOC_PK,1
Recordset Instance : Variable
Key filed Name : RECORD_TAG
Parameters :
SHP_QM.keyFieldValue SHP_QM
SHP_QM.fieldFixedLengths 20,9,6,103,8,6
SHP_QM.endSeparator 'nl'
SHP_QM.fieldNames TP_EDI_ID,TRX_CONTROL_NBR,RECORD_TAG,HEADER_INFO,FILE_DATE,FILE_TIME
L11_DL.keyFieldValue L11_DL
L11_DL.fieldFixedLengths 20,9,10,30
L11_DL.endSeparator 'nl'
L11_DL.fieldNames TP_EDI_ID,TRX_CONTROL_NBR,RECORD_TAG,DELV_LOCATION
L11_DL.missingLastfields : add
NAM_02.keyFieldValue NAM_02
NAM_02.fieldFixedLengths 20,9,10,60
NAM_02.endSeparator 'nl'
NAM_02.fieldNames TP_EDI_ID,TRX_CONTROL_NBR,RECORD_TAG,DELV_RECIPIENT
LOC_PK.keyFieldValue LOC_PK
LOC_PK.fieldFixedLengths 20,9,10,30
LOC_PK.endSeparator 'nl'
LOC_PK.fieldNames TP_EDI_ID,TRX_CONTROL_NBR,RECORD_TAG,EXCEPTION_DESC
error :
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 4: missing structure(s) before type 'SHP_QM.').
HI Naveen,
i guess u created structure like below
<MT_test>
<Recordset>
<SHP_QM>
1
2
<L11_DL>
1
2
<NAM_02>
1
2
<LOC_PK>
if yes , try to remove that <<Recordset>> in structure.
i mean like this(direct under MT and make sure in channel remove that Record set name)
<MT_Test>
<SHP_QM>
1
2
<L11_DL>
1
2
<NAM_02>
1
2
<LOC_PK>
Hi Naveen,
In the channel level, in FCC the structure L11_DL occurrence mentioned a * which means variable number of times, can you check for the same structure, the occurrence maintained in the source structure, is it 0:unbounded or 1:unbounded.
If it is 0:unbounded, then it should not be the issue.
Check this out and let me know.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.