Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

decimals

Hi to all

i have quantity field, i want to get(display) decimals values if present other wise i need to get with out decimals(only numeric).

supposy my field is w_bstmg

if i have value in w_sub_bstmg 445.50

i have to display 445.50

if i have value in w_sub_bstmg 445.00

i have to display 445

i am able to display with the following code upto 1000.

DATA: l_bstmg TYPE i,

l_bstmg_1 TYPE rkwa-wrbtr.

DATA: w_sub_bstmg TYPE rkwa-bstmg,

w_bstmg_1 TYPE char17.

IF w_sub_bstmg < 0.

w_sub_bstmg = ABS( w_sub_bstmg ).

l_bstmg = w_sub_bstmg MOD 10000.

IF l_bstmg < w_sub_bstmg.

w_bstmg_1 = w_sub_bstmg.

ELSE.

w_bstmg_1 = l_bstmg.

ENDIF.

CONCATENATE w_bstmg_1 '-' INTO w_bstmg_1.

ELSE.

l_bstmg = w_sub_bstmg MOD 10000.

IF l_bstmg < w_sub_bstmg.

w_bstmg_1 = w_sub_bstmg.

ELSE.

w_bstmg_1 = l_bstmg.

ENDIF.

ENDIF.

if i have value more than 1000 in w_sub_bstmg then how to get it.

is there any FM to find decimals position, if so can any body help me

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question