2007 Sep 04 12:58 PM
hi gurus,
now im getting a value like £-2.5 ..how can i change it into -£2.5 (insmartforms)
regds
2007 Sep 04 1:01 PM
if watab-qty+1(1) eq '-'.
replace all occurrences of '-' in watab-qty with ' '.
condense watab-qty no-gaps.
concatante '-' watab-qty into watab-qty.
endif.
2007 Sep 04 1:04 PM
Hi
In Smartforms the Unit does not come automatically so actually the $ (menis) and Amount (NETWE) are 2 different fields so basically u have to create a variable that can hold the concaenated value of teh meins and Netwr and try sothing like the below:
data: w_amount type char40.
if i_tab-netwr < 0.
concatenate '-' i_tab-meins i_tab-netwr into w_amount.
else.
concatenate i_tab-meins i_tab-netwr into w_amount.
endif.
Hoep That Helps
Anirban M.
2007 Sep 04 1:11 PM
create program lines.provide ur value as input parameter.
declare a varaible zch of type c and desired length in global definitions and provide it as output parameter in da program lines.
den use da following code..
data zc1(2) type c.
data zc2(10) type c.
split zch at '-' into zc1 zc2.
zc11(1) = zc10(1).
zc1+0(1) = '-'.
cozchncatenate zc1 zc2 into zch.
den use zch o text element
2007 Sep 04 3:53 PM
hi thanks for your reply..your logic works in se38 but its not working in smartform...may i know why it is happening
input parameters :promotion_amt o/p parameter = lv_prom_amt.
my logic:(programming lines)
data promotion_amt type ZAZ2DEL_PROMOTION_AMT.
DATA LV_PROMOTION_AMT(10) TYPE C.
data zc2 type ZAZ2DEL_PROMOTION_AMT .
DATA PROM_AMT(10) TYPE C.
split promotion_amt at '-' into promotion_amt zc2.
promotion_amt1(1) = promotion_amt0(1).
promotion_amt+0(1) = '-'.
concatenate PROMOTION_AMT+0(1) '£' zc2 into LV_proM_amt.
output i can see : -£
plz advise..
rgds
2007 Sep 04 1:23 PM
2007 Sep 04 3:56 PM
Hi,
£ and -2.5 both are separate fields, first one is Currency symbol and the second one is currency, so if you want the Negative sign in front then you need to Concatinate £ with the value into a new values then put the Negative sign in front
Regards
Sudheer
2007 Sep 04 4:12 PM