cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a Flat File ...

former_member215107
Active Participant
0 Kudos

Hi everybody,

I want to load the following data in an infocube:

Airport ¦ CALMONTH ¦ VALUE

These data come from a flat file which has the following structure:

Airport | 01.08 | 02.08 | 03.08 ... | 12.08

CDG | 2112 | 2878 | 2999 ... | 2450

BCN .....

How can i proceed to load this data in my infocube ?

I would like this format:

CDG | JAN.08 | 2112

CDG | FEB.08 | 2878

CDG | MAR.08 | 2999

....

Thanks

Rodolphe.

Accepted Solutions (1)

Accepted Solutions (1)

claudio_ciardelli2
Participant
0 Kudos

With a file format as yours, I would suggest either

1) to ask the provider of the file to change his layout to : Airport : Yera/Month : Amout

2) to convert to the right format yourself via an ABAP program that read the file with 12 amounts per line and outputs a file with format Airport : Yera/Month : Amout

I believe both these solutions would be easuer than to try to build a transformation that does the conversion from 12 amounts per line to 1 amount per line.

Claudio

do not hesitate to give points if the answer is useful to you

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rodolphe,

for BW3.5 I use an infosource with the appropriate fields, that is "Airport, January, February, March...". I assume one file per year, but if this is not enough, you can change the names.

Then you create a update rule using a routine with "return" table.

It is a fast way to realize this (in terms of system performance), but I cannot just give you the coding. SAP Course PDEBWB has all the rules and how to implement this.

As far as I know this solution is not possible for BI, because routines using "return" tables are not available anymore.

Another way to import the file would be to use Analysis Process. Take a file as datasource, use "Transform List into data record" and store the result in a transactional ODS (Direct Update DSO). This you can use to load your data further.

But all in all I think Jon Dens suggestions is the easiest way for implementation.

Kind regards,

Jürgen

Former Member
0 Kudos

You need the following format as-is:

Airport Calmonth Value

CDG|200801|2112

CDG|200802|2878

CDG|200803|2999

Notes: Airport must be capitalized, Calmonth must be in the format YYYYMM, and value is what it is.

Brian

Former Member
0 Kudos

Hello Rodolphe,

You could create a Rule Group for each month you have in your source file.

As per my understanding of your scenario, your file will contains 12 months of data.

Let's assume your file as the following fields:

- AIRPORT

- JAN

- FEB

- MAR

- APR

- ...

- DEC

DTP -- > Default rule group

Assign the Airport to your Airport Characteristics

Assign the JAN Key Figure to your Info Cube Key Figure

Assign a Constant 2008.01 to your Time Characteristics

Now, add a new Rule Group and name it "February"

Assign the Airport to your Airport Characteristics

Assign the FEB Key Figure to your Info Cube Key Figure

Assign a Constant 2008.02 to your Time Characteristics

etc etc...

In my example, I use constant value for the Month but if you want it more dynamic, I'm sure you could use a little of ABAP routine to get the Header information from your file and generate the appropriate Time Characteristic.

Best regards,

John