Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need codes

Hi,

i am using a FM in the start routine for currency translation which is using a table tcurx for find the decimal.

I need a code if currency is EUR, then dont run the FM. and directly transfer into the bw.

here is the FM.

Currency conversion for CDRETPRI

IF NOT DATAPAK[] IS INITIAL.

LOOP AT DATAPAK INTO S_DATAPAK.

CLEAR V_INDEX.

V_INDEX = SY-TABIX.

IF S_DATAPAK-/BIC/CDRETPRI CO ' 0123456789.'.

CLEAR: V_AMOUNT, V_PRC.

V_AMOUNT = S_DATAPAK-/BIC/CDETPRI.

CALL FUNCTION 'RSAR_CURRENCY_CONVERT'

EXPORTING

I_CURRENCY = S_DATAPAK-CURRENCY

CHANGING

C_AMOUNT = V_AMOUNT.

V_PRC = V_AMOUNT.

S_DATAPAK-/BIC/CDRETPRI = V_PRC.

ENDIF.

*Currency conversion for EFWHLPRCE starts******************

IF S_DATAPAK-/BIC/EFWHLPRCE CO ' 0123456789.'.

CLEAR: V_AMOUNT1, V_PRC1.

V_AMOUNT1 = S_DATAPAK-/BIC/EFNKWHLPRCE.

CALL FUNCTION 'RSAR_CURRENCY_CONVERT'

EXPORTING

I_CURRENCY = S_DATAPAK-CURRENCY

CHANGING

C_AMOUNT = V_AMOUNT1.

V_PRC1 = V_AMOUNT1.

S_DATAPAK-/BIC/EFWHLPRCE = V_PRC1.

ENDIF.

Please help me

Thanks

Former Member
Not what you were looking for? View more on this topic or Ask a question