08-18-2009 9:40 AM
Test Condition Step Step Description Test Data Expected Result
Budget format 1 Enter in budget in different formats 1234 Change the amount to 1,234.00
Budget format 2 Enter in budget in different formats $1234.55 Change the amount to 1,234.00
how can I convert these 2 test data into the format as given in the expected result i.e 1,234.00?
Also I need to store 1,234.00 without any commas but only with decimals in a DB table how can I achieve this?
Edited by: vinaya pyati on Aug 18, 2009 10:43 AM
Edited by: vinaya pyati on Aug 18, 2009 10:44 AM
08-18-2009 9:45 AM
Hi,
Check the FM SD_CONVERT_CURRENCY_FORMAT
DATA: v_cur like TCURX-CURRKEY,
c_cur(10) type c VALUE '1234 '.
CALL FUNCTION 'SD_CONVERT_CURRENCY_FORMAT'
EXPORTING
i_currency = v_cur
* IMPORTING
* E_CURRENCY_INT_FORMAT =
changing
c_currency_ext_format = c_cur
EXCEPTIONS
WRONG_FORMAT = 1
OTHERS = 2
.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE: C_CUR.
Regards,
Vik
03-02-2010 3:26 AM