on 11-08-2004 7:00 PM
Hi everyone,
I'm trying to extract two records from COPA into one in a custom cube for SEM.
<i>e.g. from COPA</i>
<u>CurType Currency Gross Sales</u>
10 EUR 1000
B0 USD 750
<i>in SEM cube </i>
Account becomes from KYF a CHAR and gets a # assigned
Based on CURTYPE in COPA I identify what fields I write currencies and amounts into.
(this is what I get, wher 'X' is empty field)
<u>LocC LocA GroupC GroupA Account</u>
X X USD 750 4550500
EUR 1000 X X 4550500
(would like to have)
<u>LocC LocA GroupC GroupA Account</u>
EUR 1000 USD 750 4550500
Any input? Thanks
Ramona
Hello Ramona,
just post your records like
LocC LocA GroupC GroupA Account
EUR 0 USD 750 4550500
EUR 1000 USD 0 4550500
You don't need a return table for this, this can easily be done with a simple routine with unit conversion.
regards
Siggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might first load them into an ODS where LocalCurr and GlobalCurr are in the data fields not in the key. Or you do a simple coding in the start routine of the update rules. It could look like this:
(Prerequisites: GAMOUNT,LAMOUNT,GCURR,LCURR are in the delivering InfoSource, but empty. If they aren't in the InfoSource or ODS, enter them as dummys.)
data: dp_line like line of data_package.
LOOP AT DATA_PACKAGE into DP_LINE.
if dp_line-curtype = 'B0'.
dp_line-/bic/GAMOUNT = dp_line-amount.
dp_line-/bic/GCURR = dp_line-currency.
else.
dp_line-/bic/LAMOUNT = dp_line-amount.
dp_line-/bic/LCURR = dp_line-currency.
endif.
clear dp_line-curtype.
modify DATA_PACKAGE from dp_line.
ENDLOOP.
Best regards
Dirk
Assuming doc# is the key for the data records in your example and that you are only dealing with these two currencies:
1- I would extract data records for each currency into a separate ODS. The two ODS would have data structure similar to your 'would like to have' layout.
2- You would map the fields from COPA to the ODS just as you wish.
3- Then, use the export data source of one ODS and map it to the second one to fill the remaining fields (this can only be done if you have the common key field i.e. doc#.
4- From this complete ODS you can then load your SEM cube.
It's not a sophisticated solution with a few assumptions but it should work for you without the ABAPing headache.
Message was edited by: Joe Nguyen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.