06-14-2007 5:53 AM
Hi Experts,
In vbap table the Netpr and netwr are displayed as 124,800,000 (like this). (currency is JPY). ( all other currency format working correctly).
But while picking the value to report it will display as 1,248,000.00.
I need the value as it is available in table. Pls tell me what wrong with my selection and solution to pick correctly.
Thanks.
Message was edited by:
Murugan Arumugam
06-14-2007 5:57 AM
if u are using alv then u have to call
fcat-No_zero = X.
in its normal report
write : itab-netpr no decimals.
Regards
Peram
06-14-2007 5:56 AM
Hi
Check your user settings in the SU01 tcode (defaults for currency and date fields)
and correct them as you need
or you can use the command
SET COUNTRY 'IN' to print Indian currency settings or 'US' for US currency setting in the code
Reward points for useful Answers
Regards
Anji
06-14-2007 7:22 AM
hi,
I tried with all. But nothing change in report. It is displayed as wrongly.
but in nornaml report i tested with
write : t_vbap-netpr currency t_vbap-waerk.
it is working fine.
i need the same output in alv also.
Pls help me to do.
06-14-2007 5:57 AM
if u are using alv then u have to call
fcat-No_zero = X.
in its normal report
write : itab-netpr no decimals.
Regards
Peram
06-14-2007 5:59 AM
Hi Murugan ,
In the write statement you can use the addition CURRENCY w . and specify w as JPY.
This should solve you issue.
Regards
Arun
06-14-2007 6:01 AM
There might be a Conversion exit to attached to the field.
Check Data elements of the field and go to the domain attached to the data element.
in Domain, There's a filed called Conv. Exit, double clikc on the value for this field.
This will take you to 2 function modules.
Use these functions to convert the values in the program.
06-14-2007 6:11 AM
06-14-2007 6:10 AM
06-14-2007 6:16 AM
Hi,
just multiply it by 100 before displaying.
V_temp = Netpr * 100.
write:/ V_temp.
Regards,
Sooness
06-14-2007 6:23 AM
hi,
follow this logic...
<b>WRITE:/ <variable> CURRENCY <c>.</b>
in the above statement you specifies the cyrrency type as per your requirement.
Format according to currency <c> in table TCURX.
<b>or</b>
<b>SET COUNTRY <key>.</b>
For <key>, set either a country key defined in table T005X or SPACE.
here specifies the country key before displaying the country specific data.
regards,
Ashokreddy.
Message was edited by:
Ashok Reddy
06-14-2007 6:27 AM
use the below logic for currency getting inyour format
<b>please pass the values for this 3 parameter like first the system currencey ...second JPY anyway youwant it .....thrid Amount ..</b>
gd_fcurr = 'EUR'.
gd_tcurr = 'JPY'.
gd_date = sy-datum.
gd_value = 10.
DATA: gd_fcurr TYPE tcurr-fcurr,
gd_tcurr TYPE tcurr-tcurr,
gd_date TYPE sy-datum,
gd_value TYPE i.
gd_fcurr = 'EUR'.
gd_tcurr = 'JPY'.
gd_date = sy-datum.
gd_value = 10.
PERFORM currency_conversion USING gd_fcurr
gd_tcurr
gd_date
CHANGING gd_value.
* Convert value to Currency value
*&---------------------------------------------------------------------*
*& Form currency_conversion
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GD_FCURR text
* -->P_GD_TCURR text
* -->P_GD_DATE text
* <--P_GD_VALUE text
*----------------------------------------------------------------------*
FORM currency_conversion USING p_fcurr
p_tcurr
p_date
CHANGING p_value.
DATA: t_er TYPE tcurr-ukurs,
t_ff TYPE tcurr-ffact,
t_lf TYPE tcurr-tfact,
t_vfd TYPE datum,
ld_erate(12) TYPE c.
CALL FUNCTION 'READ_EXCHANGE_RATE'
EXPORTING
* CLIENT = SY-MANDT
date = p_date
foreign_currency = p_fcurr
local_currency = p_tcurr
TYPE_OF_RATE = 'M'
* EXACT_DATE = ' '
IMPORTING
exchange_rate = t_er
foreign_factor = t_ff
local_factor = t_lf
valid_from_date = t_vfd
* DERIVED_RATE_TYPE =
* FIXED_RATE =
* OLDEST_RATE_FROM =
EXCEPTIONS
no_rate_found = 1
no_factors_found = 2
no_spread_found = 3
derived_2_times = 4
overflow = 5
zero_rate = 6
OTHERS = 7
.
IF sy-subrc EQ 0.
ld_erate = t_er / ( t_ff / t_lf ).
p_value = p_value * ld_erate.
ENDIF.
ENDFORM. " currency_conversion
reward points if it is usefull ...
Girish