on 09-07-2008 2:36 PM
Hi all,
I need to read a flat file and convert it,
The file structure is a long row with different types of segments:
For example:
AA111222333BB4455
where AA - the first segment and BB the second segemnt,
I want to convert this string to -
<AA>
<first>111<first/>
<second>222<second/>
<third>333<third/>
<AA/>
<BB>
<first>44<first/>
<second>55<second/>
<BB/>
I tried impliment this by using endSeparator and beginSeparator as AA,BB, but I get an error -
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 1: missing structure(s) in last recordse
anyone????????
Thanks,
Naama
Hi Naama,
Try this ,
Document name = message type
Document Name space = name space
Recordset structure = Data,1000(depends on the length of data)
Data.fieldNames = ROW ( this is the name of the structure created in IR)
Data.fieldSeparator = 'nl'
ignoreRecordsetName = true.
This configuration will fetch the whole data in the ROW part then u can split the data.
Regards
Archanaa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Declare the message type as:
mt
*record
**AA 1
***key 0..1
***first
***second
***third
**BB 1
***key 0..1
***first
***second
content conversion parameters:
Document Name: mt
Document Namespace:http://xxxxx
Document Offset:
Recordset Name: record
Recordset Namespace:
Recordset Structure:AA,1,BB,1
Recordset Sequence:Ascending
Recordsets per Message:1
KeyField Name:key
KeyField Type:String(Case-Sensitive)
Additional Parameters:
AA.fieldFixedLengths 1,3,3,3
AA.fieldnames key,first,second,third
AA.keyFieldValue 1
AA.keyFieldinStructure ignore
ignorerecordsetname true
BB.fieldFixedLengths 1,2,2
BB.fieldnames key,first,second
BB.keyFieldValue 2
BB.keyFieldinStructure ignore
Thanks,
Durga
Edited by: NagaDurga Nannapaneni on Sep 8, 2008 1:11 PM
Edited by: NagaDurga Nannapaneni on Sep 8, 2008 1:15 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you have several lines( i mean recordsets) as
AA111222333BB4455 one below the other in the input file.
And we are specifying
Recordsets per Message:1
Change the 1 to * and also include the parameter:
BB.endSeparator 'nl'
Thanks,
Durga
Edited by: NagaDurga Nannapaneni on Sep 8, 2008 2:24 PM
Hello Naama,
Try using AA.keyFieldValue and BB.keyFieldValue. Also you may also want to add
AA.fieldFixedLengths and BB.fieldFixedLengths as well. You can check SAP documentation for further info on how to use these properties.
Warm regards,
Glenn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check this scenario in saptechnical.com you have detailed step by step file content conversion scenario.
Regards ,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
find the below configuration, i hope now clear
Document name = message type
Document Name space = name space
Recordset name = data
recordset structure = row,,row1,**
keyfield name = key
row.keyFieldvalue AA
row.fieldFixedLengths 3,3,3
row.fieldNames A,B,C
row1.keyFieldvalue BB
row1.fieldFixedLengths 2,2
row1.fieldNames D,E
ignoreRecordsetName true
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.