08-11-2006 6:33 AM
hi friends,
i need to fetch amount in document currencey and print that.
bsid-wrbtr
if document type (bschl) is populated with '01' '02' '03' '04' '05'......'09' wrbtr is positive else negitive so how to populate this with negative sign.
regards
sree
08-11-2006 6:41 AM
08-11-2006 6:41 AM
08-11-2006 6:43 AM
just use select it automaticaly store .
for +ve it show itab-wrbtr = 123.90
-ve it show itab-wrbtr = 123.90-
now u can shift -ve sighn to front of amont using fm
CALL FUNCTION <b>'CLOI_PUT_SIGN_IN_FRONT'
</b>CHANGING
value = itab-wrbtr.
08-11-2006 6:44 AM
HI,
to make the field nagative simply multiply it with '-1'.
like this.
if bsid-bschl <> '01' OR
bsid-bschl <> '02' OR
bsid-bschl <> '03' OR
bsid-bschl <> '04'.
itab-wrbtr = bsid-wrbtr * '-1'.
ENDIF.
Regards,
HRA
08-11-2006 6:52 AM
Hi,
If bsid-bschl < '10'.
if bsid-wrbtr < 0.
bsid-wrbtr = -1 * bsid-wrbtr.
endif.
else.
if bsid-wrbtr > 0.
bsid-wrbtr = -1 * bsid-wrbtr.
endif.
endif.
Regards
Subbu
08-11-2006 7:13 AM
hi subbu
how to fetch this document amount ie how can we write select statement i am bit confusing
plz guide me
regards
sree
08-11-2006 7:18 AM
08-11-2006 9:11 PM
select bschl wrbtr wrbtr
into table itab
from bsid.
loop at itab.
if itab-bschl < 10.
itab-wrbtr = itab-wrbtr * -1.
endif.
write : / itab-bschl, itab-wrbtr.
endloop.
Regards,
Anurag