cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Rule and File name

Former Member
0 Kudos

Hi,

I have to load data for 15 markets to a single cube and there is a field MARKET.

I have created different Infosorces for loading data for different markets to the cube.

There is a field MARKET hardcoded in the transfer rule with the corresponding Market Code.

The Market Code is coming from the data file which is being loaded via Infopackage.

Is there any way we can pick the Market code from the file name loaded from the Infopackage and use it in the Transfer Rule for MARKET.

Any Routine and where to write it?

If the above case is possible then I will be using one Infosource instead of 15.

Thanks in advance..

Accepted Solutions (0)

Answers (3)

Answers (3)

udayabhanupattabhiram_cha
Active Contributor
0 Kudos

Hi:

Eventhough you use 1 infosource, you can still do Parallel loads.

Just use different infopackages for different MARKETS as selections.

Also, in the Transfer Structure, make Market Code as Selection for this to work.

Then, in Infopackage, you can hardcode your Markets that you want to do parallel loads.

Chamarthy

Message was edited by:

Chamarthy

Former Member
0 Kudos

hi subash,

Do not go with 15 info sources.

You can do this in the update rule start routine.

Take 15 info packages for the 15 different files.

then write the routine based on the info packages.

DATA: BEGIN OF itab OCCURS 0,

logdpid LIKE rsseldone-logdpid,

seldate LIKE rsseldone-seldate,

seltime LIKE rsseldone-seltime,

END OF itab.

data: temp_logdpid LIKE rsseldone-logdpid,

temp_market(20). " Declare this based on the required length.

SELECT logdpid seldate seltime FROM rsseldone INTO TABLE itab

WHERE source = '<your Info Source/data mart>'.

SORT itab DESCENDING BY seldate seltime .

READ TABLE itab INDEX 1.

temp_logdpid = itab-logdpid.

IF temp_logdpid EQ 'ZPAK_41ES14MGN0OV9NB55YQAJBD0M'.

temp_makket = 'market1'.

ELSEIF temp_logdpid EQ '<Info Package 2>.

temp_makket = 'market2'.

.

.

.

.

ELSEIF temp_logdpid EQ '<Info Package 15>.

temp_makket = 'market15'.

loop at data_package.

data_package-MARKET = temp_market.

modify data_package.

endloop.

Regards, Siva

Former Member
0 Kudos

This idea is really great but this will not work if we have parallel loading to the Cube.

Thanks a lot....

Former Member
0 Kudos

Hi,

Parallel loading will be a problem if you go for 1 InfoSource.

Regards, Siva

Former Member
0 Kudos

Hi,

From where do you load this data.... is it from Application server or from your local desktop?

Regards, Siva

Former Member
0 Kudos

from Application Server

Former Member
0 Kudos

Hi,

i have a different approach here..

We can go with the Info Package routine in the External TAB.

Befor you load data you open the file in Application server and add ad extra column in the Flat File with MArket but this will have to change the transfer structure.

Let me know if you like this approach and need any help.

Regards, Siva

Former Member
0 Kudos

Subhash

You need not create 15 infosources if you have similar (exactly same) data files to load for all 15 markets. You could have created 1 infosource and 15 transfer rules. then for each transfer rule, hardcode the market code.

Better simple - you can do this with only 1 infosource and 1 transfer rule only-

Maintain market code field in all your data files with appropriate values. Then you put the same field in transfer structure and ensure that it has same datatype and length as in data file. Then you don't need to hardcode market code since each file will contains its own market code. Thus load all the data files one after another

rgds

Pradip