Skip to Content
-5

Billing Document amount in VBRP is multiplied by 10

Mar 14 at 07:15 AM

55

avatar image

The Billing document amount (NETWR) in VF03 is : 10.000 KW and this is the correct value, but in Table VBRP it display as: 100.000 KW and when i select from the table into a program i got the wrong value 100.

Why this is happens, and how i fix this ?

Note that this problem is not exist for example in Sales order (Value on VA03 is the same in table VBAP)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Raymond Giuseppi
Mar 14 at 07:23 AM
1

Perform first some search in online help (or your otriginal Abap course material) on currency amount fields and how to handle those in Abap (Look also for quantity fields)

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Look with SE11 at the definition of the table you browse with SE16 / SE16n, there is a tab with the link between currency amount field (CURR) and currency code field (CUKY) in some case the currency code field is available in the table you browse, so SAP wil display it accordingly, often it won't be available so SAP switch to default behavior (e.g. 2 decimals)

  • VBAP-NETWR -> VBAP-WAERK (Same table)
  • VBRP-NETWR -> VBRK-WAERK (In another table)
0
Jürgen L
Mar 14 at 08:51 AM
1

1 Dinar = 1000 Fils

which means instead of the usual 2 decimals has this currency 3 decimals.

A currency field in the table has by definition just 2 decimals and a currency with 3 decimals has to be be stored in the same fields.

Hence it is multiplied by 10 to have just 2 decimals. And this calculation is done via a conversion exit that does it based on your currency settings. You must not take the values directly from the table without going via the conversion exit.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

I got this, Then i have nothing to do to see the correct value in DB table VBRP for KW?

Please check the image below, is the procedure has anything related to this issue ?

capture.png (32.2 kB)
0

The procedure is about tax. A tax is at the end also just a value and will be impacted by your currency settings. But this procedure has in general nothing to do with the currency

The decimals of a currency are defined in view V_CURX

No you cannot look at a value in VBRP without considering the decimals settings from the V_CURX view.

0

Thanks you so much Jürgen for your time, but i have a good question :)

If this issue has a relation to the currency used, why it display in correct value in other documents! like VBAP for sales order as i mentioned before ?

Note that this problem is not exist for example in Sales order (Value on VA03 is the same in table VBAP)

0

documents are for end users, SE16 is a table browser for experienced developers

SAP of course makes use of the conversion in their user interface to the end users.

Developers usually need to see how the values are stored in the tables.

0
G Lakshmipathi
Mar 14 at 09:50 AM
1

If any currency do not have two decimal places, then, it should be defined in TCURX table which you can do via OY04 transaction

Show 1 Share
10 |10000 characters needed characters left characters exceeded

KW currency is already defined in TCURX & OY04 as a Decimal 3.

0
Jürgen L
Mar 14 at 07:30 AM
0

and the currency is? and with how much decimals it is customized?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

The Currency is KWD for Kuwait. instead of 10 it show 100 (Multiplied by 10)

I checked now for other currencies (AED for UAE & QAR for Qatar) on the same system and it has a correct value in VBRP as in VF03.

0
Bahaa Hodhod Mar 14 at 08:51 AM
0

10 KW : Correct value - display on VA03

100 KW : Wrong value - display on table VBRP

Note that this problem is not exist for example in Sales order (Value on VA03 is the same in table VBAP)

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 14 at 12:37 PM
0

Dear Bahaa Hodhod,

when you select the value of NETWR from VBRP,then make sure the data element defined for storing that value is packed decimal.

Example :

types: begin of ts_vbrp,

vbeln type vbrp-vbeln,

netwr type p decimal 4,

end of ts_vbrp.

data : it_vbrp type table of ts_vbrp,

wa_vbrp type ts_vbrp.

hope this will solve your Query.

Share
10 |10000 characters needed characters left characters exceeded