on 04-19-2006 11:45 AM
Hi,
I have a file to file scenario wherein there are txt files in the source system, some of which has header and some without header.
How does the sender adapter dynamically identify a file with header and without header.
I knew that File content Conversion in the sender adapter with "Recordsets per message = 1" can read the header. But how to handle dynamically.
Thanks in advance for suggestions and advice.
Regards.
Praveen
Hi,
Let me give a more clear picture:-
One of my file which has header and the corresponding values is listed hereunder:
PERNR;KID;PNALT;NACHN;NAME2;VORNA;TITEL;TITL2 and so on.....
;1200;1200;Angus;; and so on.........
Other file which has no header but only values in it:-
1200;1200;;Werner;Angus and so on.......
The structure remains same for all the files. The only difference is that some of the file has header in it and some without header. The Message Type is mentioned hereunder:-
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2 and so on......
I read the file in record row. The file conversion parameters in the file sender adapter are mentioned hereunder:-
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA,TITEL,TITL2 and so on........
How do we dynamically identify whether the file has header or not. Even if the file has header or without header, the file needs to be picked and transferred to the target system. Kindly clarify.
Regards.
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create the flat data type as follows and read the data in single string.
<Record>
<Row>
</Row>
</Record>
Thanks,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try reading the file in a RECORD-ROW style ?
I guess that should solve the problem. But then you will have to involve a different logic for your mapping if any .
Ref: /people/sravya.talanki2/blog/2005/11/29/night-mare-processing-huge-files-in-sap-xi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.