on 11-12-2007 5:15 AM
Hello experts,
We have two generic datasources populating one custom cube in BI. The first datasrce has fields like batch no., date, client, version,qty, etc. The second datasource has fields like batch no., client, version and zvendor. This datasource would populate only an additional field zvendor. This field can be populated when the batch no, client, version against that zvendor is same as the batch no., client & version from the first datasource.
So zvendor field from the second datasource can be populated in the cube using a routine in the transformation.
How will the routine look like? Can someone with ABAP expertise post this routine for us? Thank you in advance...
The easiest solution would be to store the data from the second source in a DSO, when loading the cube do a lookup.
After creating the DSO to store the zvendor along with the other key values.
Then modify the transformation for the first datasource.
Step 1. Create a start routine.
Create an internal table (lets say your DSO's table name is MAM02540 and the key is only batchno)
data: itab type standard table of /BIC/AMAMO254000,
wa_itab like line of itab.
Select *
into corresponding fields of table itab
from /BIC/AMAMO254000
for all entries in source_package
where batchno = source_package-batchno.
sort itab by batchno.
You cannot sort or group by in a "for all entries" select.
Step 2 in the transformation create a new rule mapping into batchno,
and use the following code.
read itab into wa_itab with key batchno = source_fields-batchno binary search.
if sy-subrc = 0.
result = wa_itab-zvendor.
endif.
Thats pretty much it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hubert,
Can I avoid the DSO in this case? I would not want to populate an additional infoprovider on a daily basis.
Is it possible to pick the zvendor from the second datasource based on the common batch no. and populate the cube directly?
First datasource will give all the details and the second will only give the zvendor against those batches/records coming from first datasource.
Can someone help?
thank you....
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.