Skip to Content
author's profile photo Former Member
Former Member

Flat File load

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 08:59 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 09:01 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 09:04 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 09:05 AM

    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).

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 10:22 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.