Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_CURRENCY_CONV_TO_EXTERNAL

former_member227595
Active Participant
0 Kudos

Hi,

I'm using the FM BAPI_CURRENCY_CONV_TO_EXTERNAL.

is working fine in SE37 But in my program, when I fill the parameter amount_internal with a variable type KBETR this raise a DUMP.

Does anybody has an example in order to try this.

Thanks in advance.

Regards

2 REPLIES 2

Former Member
0 Kudos

Hi Diego,

You can look at how SAP uses the FM. An example is report RAIMGETV. It looks like the domain is WERTV8 instead of WERTV6 which you are using.

Brenda

Former Member
0 Kudos

Hi Diego,

TABLES :VBRK, VBRP.

PARAMETERS P_SORDER TYPE VBRK-VBELN DEFAULT '0900032972'.
DATA: G_CURR TYPE BAPICURR-BAPICURR.


if P_SORDER IS NOT INITIAL.
SELECT SINGLE WAERK FROM VBRK INTO VBRK-WAERK WHERE VBELN = P_SORDER.
SELECT SINGLE NETWR FROM VBRP INTO VBRP-NETWR WHERE VBELN = P_SORDER.

IF VBRK-WAERK IS NOT INITIAL AND VBRP-NETWR IS NOT INITIAL.
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
  EXPORTING
    CURRENCY              = vbrk-waerk
    AMOUNT_INTERNAL       = vbrp-netwr
 IMPORTING
   AMOUNT_EXTERNAL       =  G_CURR.

ENDIF.
endif.

You can use the KBETR as well for KBETR Domain is WERTV6 CURR and DEC 2

.

So declare the AMOUNT_EXTERNAL variable as the same and then do the rest.

revert if further clarification

Thanks

Sri