on 2006 Oct 11 12:23 PM
Hi all,
I need to read first 9 fields in Content conversion from text file and ignore all the others.The problem is I don't know exactly the number of fields(it varies from file to file).
I try to use the following in my content conversion:
item.fieldSeparator = ;
item.fieldNames = "Names of item fields"
item.lastFieldsOptional = NO
ignoreRecordSetName = true
Now it works with files with 9 fields,but doesn't with more than 9...
I tried with item.lastFieldsOptional = YES as well but it didn't help...
Anyone any suggestions?
Thanks in advance
Hi dimitry,
If no File comm. channel parameters can fullfill your need
you can allways convert all the fields (if its not too many..)and simply ignore them during message mapping in the IR.
Nimrod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help,
Solved the problem,
The soltion was to add some fictitious fields and configure the adapter like the following:
item.fieldSeparator = ;
item.fieldNames = "real field names,some fictious fields"
item.lastFieldsOptional = YES
ignoreRecordSetName = true
item.endSeparator = 'nl'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is I don't know exactly the number of fields(it varies from file to file).
>>>> then how do you write your FCC ? because the mandatory parameters fieldFixedLengths or fieldSeparator and the fieldNames will expect a defined set of values and not dynamic.maybe you can read the file record row kind and then extract the fields u need.
item.lastFieldsOptional
>>>
this is to ignore only the last field.
<i>xml.lastFieldsOptional=YES|NO
This parameter specifies whether the last fields can be omitted (YES) or not (NO) in a CSV structure. If you do not make a specification, the default value is NO.</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check these links on file content conversion:-
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards.
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.