Skip to Content
avatar image
Former Member

adding _ve sign to a field

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Oct 17, 2008 at 09:26 AM

    Hi

    Thats true. The Fm will take only char.

    Regards,

    Vishwa.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2008 at 09: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:42 AM

    do it like this:

    wa_ekpo-menge = 0 - wa_ekpo-menge .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:44 AM

    try :

    multiply lw_var by -1.

    regards,

    Advait

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2008 at 09:46 AM

    hi use concatenate '-' or multiple with '-1'.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2008 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded