Application Development and Automation 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: 
Read only

Different between write and table

Former Member
0 Likes
1,740

Hi all.

why the value different between table and i write from abap editor?

and when i write value is 21.600,00

thanks all

8 REPLIES 8
Read only

Former Member
0 Likes
1,718

Hi Afif

Check transaction SU01

Default Tab.

Check the Decimal Notation values assigned to your user profile

Regards

Arden

Read only

0 Likes
1,718

Hi arden

thanks, but i can't change from su01 cause me don't have permission. Is there any solutions?

Read only

0 Likes
1,718

Try Transaction SU3

If that fails you'd really need to code a solution, but I'm not sure this is wise as there is a reason that the Decimal Notation is used.

What you'd end up with is inconsistent output across your organisation.

Regards

Arden

Read only

Former Member
0 Likes
1,718

This message was moderated.

Read only

Former Member
0 Likes
1,718

Hi Afif,

if you WRITE a currency amount, please always use the CURRENCY option of WRITE.

In the above case it looks like an ALV field catalogue error (wrong decimals). Can you tell me please, if you've created this field catalogue manually?

Regards,

Klaus

Read only

0 Likes
1,718

Hi all, thanks so much all the answer

Read only

bhuvneshkumar_gupta
Participant
0 Likes
1,718

Hey Afif,

There are some default properties of write keyword.

Like, if you will write the following command,

'WRITE SY-DATUM TO VAR1' " VAR1 IS 10 CHAR VARIABLE.(Sy-datum = 20151012)

'WRITE VAR1'

THE O/P WILL BE - 12.10.2015

In the same way As Mr. Klaus Babl mentioned , If you will write amount etc without currency or unit by default it will take 2 decimals.

So mention Currency or unit always.

In ALV you can pass currency in  slis_fieldcat_alv-currency.

Thanks.

Read only

Former Member
0 Likes
1,718

Hi Afif,

Decimal settings in SU01 as per Arden Stricke or

Checking your user settings in System-->User Profile-->Own Data as per Kishan Shah is also correct. These are formatting preferences for the logged in user.

But in your case, having different values in Database Table and in ALV is due to the currency. As per Bhuvnesh Kumar Gupta's comment above, it is correct.

Usually once we are dealing with amounts, it should have a currency reference. You can add this in the field catalog as mentioned above. As per IDR, you can notice it was multiplied to 100.

Specify the reference currency to get the correct output.

If you are using a custom table, there should be a reference currency field in the data dictionary.

Cheers