on 04-05-2008 4:02 PM
Hi XI Guru's,
I have a scenario of FILE to FILE, In this I have few queries/problems which are mentioned below. Please any one help me in resolving these.
Scenario 1. I am getting a source file with only one line entry which will contain,
1 Header segment ( contains one of the field entry as H)
1..n Body segments ( contains one of the field entry as B)
1 Footer segment ( contains one of the field entry as F)
Q1.Is there any way to identify/differentiate the Header, Body and Footer segments?
Scenario 2. I am getting a source file as follows,
VOL...............
HDR................
HDR................
UHL................
....................10.................
....................10.................
....................10.................
.
.
.
....................10..................
....................90.................
UHL................
EOF................
EOF................
UTL................
END
Explanation of above file:
As shown above the source file always have first line beginig with VOL, second line with HDR, third line with HDR, fourth line doesnt have any identifier instead it will have value 10 in some perticular position. this record will repeats as shown above, similarly follows one more record will have 90 as identifier in the same position as 10 (this appears only once) and reamining file will have identifires in the begining as shown. Now the problem here is
Q1. How to identify each record seperately from the source?
Q2. Can we use more than one key field as have different
identifiers as VOL,HDR,HDR,UHL,10,90,UTLEOF,EOF,END
Helpfull answers are provided points as they need to be
Thanks in advance.
Shiv.
> Scenario 1. I am getting a source file with only one line entry which will contain,
> 1 Header segment ( contains one of the field entry as H)
> 1..n Body segments ( contains one of the field entry as B)
> 1 Footer segment ( contains one of the field entry as F)
>
> Q1.Is there any way to identify/differentiate the Header, Body and Footer segments?
Use Key Field in FCC to identify the header, body & footer.
Content Conversion ( The Key Field Problem )
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
>
> Scenario 2. I am getting a source file as follows,
>
> VOL...............
> HDR................
> HDR................
> UHL................
> ....................10.................
> ....................10.................
> ....................10.................
> .
> .
> .
> ....................10..................
> ....................90.................
> UHL................
> EOF................
> EOF................
> UTL................
> END
>
> Explanation of above file:
> As shown above the source file always have first line beginig with VOL, second line with HDR, third line with HDR, fourth line doesnt have any identifier instead it will have value 10 in some perticular position. this record will repeats as shown above, similarly follows one more record will have 90 as identifier in the same position as 10 (this appears only once) and reamining file will have identifires in the begining as shown. Now the problem here is
>
> Q1. How to identify each record seperately from the source?
As you said each value is coming at fixed position, i.e. u r getting a file with fixed field length, so below mentioned blog will solve your problem.
How to send a flat file with fixed lengths to XI 3.0 using a Central File Adapter
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
> Q2. Can we use more than one key field as have different
> identifiers as VOL,HDR,HDR,UHL,10,90,UTLEOF,EOF,END
See my first ans in the top.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarvesh,
Thanks for the reply but you didnt get my questions clearly.
In first scenario Im getting complete data ina single line, so before applying key field property how to split this single line into respective segments?
In the second scenario, Im having some one segment consisting of value 10 is repeating, will your solution work for this. And if we use keyfield property hear ,will it work as key field for all lines have size 3 but for some we have 2 i.e., 10 & 90. Can key field can be used in such scenarios?
Regards,
Shiv
Hi Shiva kumar
kindly follow thes links
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure
/people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
search tag is as follows
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_weblog&query=filetofilecontentconversion&adv=false&sortby=cm_rnd_rankvalue
thanks
Sandeep
Ps: if helpful kindly reward points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
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.