Hello ,
i have a requirement, the cube contains multiple data in the Group Currency for multiple company codes. & I want to convert these amounts to another KF as local currency using planning sequence only (not using transformation, as the users want to do this when they require.)
For this, i defined a Aggr level , filter & Planning function with Currency translation selecting the source field as AMOUNT_GC & target field as AMOUNT_LC using the Currency Translation type ZCTGCLC.
The target currency is not know beforehand, as it depends on the company code of each records that comes in.
Hence, Currency translation type uses a Customer exit variable 'Z_R_0026' for target currency.
This is customer exit variable which searches the Master data table of the Company code & replies back with the local currency of that particular company code (derived value from the company code variable also in teh filter).
However, when i execute this planning sequence, it gives me an error saying, "no value found for variable 'Z_R_0026'
1. when edit the CMOD code, to return only say "EUR" the planning sequence runs fine.However when i use this select statement to fetch the corresponding value of the currency using the company code reference from the company code master data table, it gives the above error. it seems to be a problem with the select statement.
below is the code for that exit
when 'Z_R_0026'.
data: l_curr type /BI0/OICURRENCY.
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'Z_S_0003'. " Company Code Single
CLEAR l_s_range.
Filling Currency Key from Company Code
select single currency
from /bi0/pcomp_code
into l_curr
where comp_code = loc_var_range-low
and objvers = 'A'.
if sy-subrc = 0.
l_s_range-low = l_curr.
else.
l_s_range-low = 'ABC'.
endif.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
clear l_s_range.
EXIT.
ENDLOOP.
ENDIF.
2. there is a option of using infoobject for target currency in the RSCUR itself, however, when i try to input the 0COMP_CODE for finding the attribute currency from this infoobject, it doesnt accept.
has anyone tried this earlier ?
Any help/suggestions , guys, pls?
Thanks
John