Application Development 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: 

Create formula in the transaction VOFM

Former Member
0 Kudos
120

Hello

I am new to ABAP programming and I'm starting to make a formula in the transaction do two queries VOFM

SELECT

SINGLE KZWI5

INTO WA_KZWI5-KZWI5

FROM VBRP

WHERE

VBELN = KOMP-VGBEL AND

POSNR = KOMP-VGPOS.

SELECT

SINGLE NETWR

INTO WA_NETWR-NETWR

FROM VBRP

WHERE

VBELN = KOMP-VGBEL AND

POSNR = KOMP-VGPOS.

The result of these of these consultations I have them I do a split and assigned to the field

KOMV-KBETR = WA_KZWI5-KZWI5 / WA_NETWR-NETWR.

My problem is that the result is of type float and I can not assign to the field KOMV-KBETR which is CURR

How I can do to make this field takes the value

I hope I can help

Rafael Soto

1 REPLY 1

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
57

VBRP-KZWI5 and VBRP-NETWR are both type CURR fields. How do you get a floating point type result? Did you define your target field as float?