10-17-2008 10:25 AM
hi,
i need to add a -ve sign to a field which is of type quen,but the fm i used is taking only chr.this is what i did? but not getting how to do it
loop at i_ekpo into wa_ekpo.
wa_ekpo-menge = wa_ekpo-menge * -1.
data : lw_var(14) type c .
lw_var = wa_ekpo-menge .
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
value = lw_var .
wa_ekpo-menge = lw_var.
modify i_ekpo from wa_ekpo.
10-17-2008 10:26 AM
10-17-2008 10:28 AM
Hi Radhika,
If this problem is still there then why dont you try to assign the value in the CHAR data type.
I think this is the only solution for your problem.
Thanks,
Chidanand
10-17-2008 10:38 AM
the table field is of quen type which i shound not change it char.
10-17-2008 10:41 AM
In that case...
first..
var1 = quantity field
split var1 at '-' to var2 var3.
now..
var4 = '-'.
concatenate var4 var2 into var5.
Regards,
VIshwa.
10-17-2008 10:42 AM
10-17-2008 10:44 AM
10-17-2008 10:56 AM
plz verify my code ,i have done like that only but its not working
thnaks
10-17-2008 10:46 AM
10-17-2008 11:02 AM
hi,
try like this.
FIELD-SYMBOLS: <FS> type any.
assing <var> to <fs>.
concatenate '-' <fs> into <fs>.
OR.
<fs> = <fs> * -1.
Regards,
Shankar.
10-17-2008 11:16 AM
but its saying type incompatable .boz one is of type quen
another one is of char.
thanks
10-17-2008 11:17 AM
10-17-2008 11:35 AM
hi,
i have tried like this way ,i got the result ,but is it correct.
wa_ekpo-menge = wa_ekpo-menge * -1.
data : lw_var(14) type c .
lw_var = wa_ekpo-menge .
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
value = lw_var .
wa_ekpo-menge = lw_var. "is this correct to equal
modify i_ekpo from lw_var.
thanks
10-17-2008 11:40 AM
10-17-2008 11:46 AM
its working fine.but i used like this is it correct.
wa-ekpo-menge = lw_var.
modify i-ekpo from lw_var.
thanks
10-17-2008 11:51 AM
is i_ekpo a field or a table...?? you cant modify an internal table from a field..
say:
move lw_var to i_ekpo- "give the field name here.