cancel
Showing results for 
Search instead for 
Did you mean: 

Display of currency field to four decimal places

Former Member
0 Kudos

Hi All

I have a field in my smartform (VBAP-NETPR),which takes only two places after decimal(as per the data type defined for this field).I have the requirement that for the same field ,value should be displayed upto four decimal places.

I tried using ZTC.4 but it is only appending two zeros at the end ,not giving the exact value. Can anybody please help me regarding this??

Regards,

Ankur Mishra

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi ,

declare a required variable as type p decimals 4.

and go to konv table find the condition record .

if it isstored like 101025.00 for 1010.2500.

i think for usdn currency it will happen.

u can use following code.

data : lv_netpr type decimals 4.

lv_netpr = netpr / 1000.

you will get four fields after decimal point.

Regards,

karthikeyan ks

Former Member
0 Kudos

Hi,

Use

field type p decimal _ _

Former Member
0 Kudos

Hi,

Declare your field like BAPICURR-BAPICURR.

Regards,

Srini.

Former Member
0 Kudos

Hi,

now you are displaying VBAP-NETPR value which is having two decimal places but from where will you get the value of 4 decimal places ? if you are geting this 4 decimal value then define a variable with 4 decimal and print tat variable.

Regards,

Madhukar Shetty

Former Member
0 Kudos

Hi Madhukar,

In the actual transaction i.e. VA03, the respective values have been maintained upto 4 decimal places, but in the database table only upto 2 decimal places have been specified for the field.This implies that SAP must be converting those values somewhere in between (with the help of some conversion or something),I tried finding that but could not.So need help for that.

Regards,

Ankur

Former Member
0 Kudos

check your condition records...see how the values are stored there. If you have a NETPR with 2 decimals and you display it with 4 decimals, SAP can't do anything except show more zeroes on the end.