on 09-26-2012 4:09 PM
Hello experts,
I have to pick up a .txt file from source directory that is basically a fixed length delimited file,',' being the delimiter.SAP help says:
NameA.fieldSeparator
■ If you made an entry for fieldFixedLengths, the extra length of the separator is taken into account, but no further consistency checks are performed.
This at least suggests that the fixed length delimited file can be converted to XML in file adapter by specifying both fieldSeparator and fieldFixedLengths parameters. Has anyone tried this ?
Thanks,
Monika
use field separator or Fixed lenght, dont try to use both and it is not recommended and you will face many issues if there is no value in flat file.
my suggestion is use field separator to convery yur text document to xml using File adapter FCC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Raja and Sagarika for your replies.
My file will look like below:
ABC ,123, ,DEF
GHI ,456, ,JKL
So, to pick up this file, should I go for fieldSeparator = ','.
Regards,
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monika,
...So if I go ahead with fieldSeparator parameter, then the fixed length fields that are coming with spaces...
No problem with spaces but you must have the separator, your comma, always. In this mode the FCC doesn't count the fields length. For example: " Field1 , Field3 , , Field2 "
or if no field is coming
If you want to say for example "Field1,,,Field2" or "Field1, , Field2, ", there is no problem, but you need the commas, of course.
I remind you that you can read the parameters behaviour in http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/frameset.htm and for my own experience is not bad idea to do a dummy example and you go changing the parameters and checking the results.
Regards.
Thanks Amit!! SAP documentation says so that we can use both the parameters, first will try using only field.Separator and see the behavior in case of leading/trailing spaces or spaces when fields are missing, if this works (should work since field length will be ignored), then good, else will try using both the parameters.
Regards,
Monika
Hi Monica,
I think you Can't use both the parameters, 'fieldSeparator' & 'fieldFixedLengths'.
If you are using 'fieldFixedLengths' then you can use 'endSeparator' inplace of 'fieldSeparator'.
Please find the thread http://scn.sap.com/message/8495404 which may be helpful for you.
Best Regards,
Sagarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.