Skip to Content
0
Former Member
Oct 05, 2012 at 11:03 AM

BI Abap Start routine in Transformation - fixed currency calculation

78 Views

Hi dear Experts

I need your help.

I need to set up in the Start routine a currency conversion with a fixed value. = 1,21

It also has to change the Currency from EUR to CHF when a comp code is there.

Is my coding correct?

thanks in advance for your help

ciao

Manu

data:
l_t_source_package type _ty_t_sc_1.

data:
l_s_source_package type _ty_s_sc_1.


***********

loop at source_package

into
l_s_source_package.

if
l_s_source_package-comp_code = 'CH01'
and' l_s_source_package-currency = 'EUR’.

l_s_source_package-currency = 'CHF’.

l_s_source_package-amount = l_s_source_package-amount * 1.21.

endif.

modify source_package from l_s_source_package.

endif.

endloop.



* Sortierbare Hilfstabelle anlegen

l_t_source_package[] = source_package[].