cancel
Showing results for 
Search instead for 
Did you mean: 

Query for the Qty field, it is not contain any decimal Place

Former Member
0 Kudos

Dear All,

I used query and display some qty in this query. if i don't want to display the qty decimal place, anybody how to do it?

Regards,

Luke    

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Luke,

define variable of type P for Quantity. e. g.

Data : ld_kwmeng type p.

ld_kwmeng = vbap-kwmeng.

you will get quanitty without decimal places.

Santosh

alex_campbell
Contributor
0 Kudos

You can use one of these mathematical functions to round your number up or down (CEIL, FLOOR), or to extract only the integer or fractional part (INT, FRAC)

http://help.sap.com/erp2005_ehp_04/helpdata/en/fc/eb3316358411d1829f0000e829fbfe/content.htm

Former Member
0 Kudos

Hi Luke,

Its simple logic.

Take the qty in a string and split it at decimal point. Use the first one.

example :

data: str1,str2,str3 type string.

str1 = qty.

split str1 at '.' into str2 str3.

write str2.

str2 will give you the value w'out decimal.

Regards...

Sultana

Former Member
0 Kudos

Dear Secher,

May i know how can i use in ABAP Query?

Regards,

Luke