cancel
Showing results for 
Search instead for 
Did you mean: 

Flat File load

Former Member
0 Kudos

I have a flat file from which I need to get a date from the first line and load the data from the other lines. My thought was as follows, could someone confirm that this is feasible and/or an alternative/better solution? Thanks

1) In the comm/transfer structure create a field for the date populate this via a routine (this is always the same for each load i.e. is the same value in the header line). If this is feasible can someone advise me on the logic

2) Load the other comm/transfer structure fields via one to one mapping

Or will I have a problem since the file has a header line which is different in structure to the detail lines?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Niten,

For all the data you can choose the option "ignore header line" in the infopackage. Foe considering only the header line you may need to write a routine.

Bye

Dinesh

Former Member
0 Kudos

Thanks for that, what would you recommend for the routine

Former Member
0 Kudos

This might be a problem (as BW will expect all records to have same structure), and you may get errors due to data format mismatch.

Ignore the header if you can derive this date field from somewhere else, and map all the other fields as usual.

If not, another option would be to define one field of sufficient length and type (to read the complete record), and map all other fields by splitting the record (read in one field).

Former Member
0 Kudos

Thanks for that.

Dinesh,

How can I ensure that the first line is only loaded and in the second load ensure that the load is from line 2?

Former Member
0 Kudos

Hi ,

In the info pack external data tab u have option to ignore the lines there u can ignore 1 or more lines.

Thanks

Sankar

Former Member
0 Kudos

Hi Niten,

Where are you loading this file to? If it is to the cube then you can try this.

1. Load all the other data and ignore the header line so the date is not populated.

2. Now carry out a second load and only load the header line.

3. When the data is summarized in the cube you would get the correct results.

If it is to the ODS then try this:

1. Load all the other data and ignore the header line so the date is not populated.

2. Now carry out a second load and only load the header line - ie the date load to a master data info-object..

3. Now in the update rule of the ODS populate the date with the date in the info-object master data.

-


Some Correction:

The cube solution would not work. But the same ODS solution suggested can be used for Cube as well.

-


Bye

Dinesh

Message was edited by:

Dinesh Lalchand

Former Member
0 Kudos

Niten,

Since the data is retrieved one row at a time either in ASCII or CSV.

I think it might not be possible to get date from the header row.

You will have to do it separately.

Thanks

Pranab

Former Member
0 Kudos

I don't think this is possible, has you said you cannot have different record type loading flat file.

If possible ask people that produce this file to put this date in all records.

Hope it helps.

Regards