07-28-2011 3:32 PM
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
07-28-2011 3:42 PM
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
07-28-2011 4:44 PM
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