Negative sign in the Script

Hi,
In a quantity field lips-FKIMG, need to be printed with sign and offset,
Example:  FKIMG is  - 24.000,
Now i am using &FKIMG(C.0)& whixh comes as 24 in script,
I want to make it with the sign -24, so tried with
&FKIMG(c.0)(<)& it is throwing a syntax error, Please tell me how to get the sign in the script.
points assured.
I have tried with &symbol(<)& not working
regards,
Prabhu

Hi!
It depends of the type of the field. For example if you check in SE11 the MENG13 domain, you'll see, it is not accepting signs (it's a checkbox).
Use an another TYPE for this field, which allows using signs.
And for the formatting, use this kind of syntax: &FKIMG(<C.0)&
Regards
Tamá

Similar Messages

  • Omitting the negative sign in SAP scripts

    Hi All,
    I have a requirement to print the quantity without the negative sign.
    I have used (S) , &symbol(S)& to compress the sign but that seems to be not working.

    Hi Kiran,
    To Omit the leading sign for the field the syntax &symbol(S)&
    The S option can be used to ensure that the value is formatted without sign
    Regards,
    Sravanthi

  • How to display NEGATIVE sign on the left side of a number in SMARTFORMS

    Hi,
         In smartforms I'm trying to print some negative values, but the negative sign is displayed on the right hand side of the number.
    How can I display the '-' sign on the left hand side of a number. I tried the logic &value(<), it works well in sap scripts. Why is it not working in smartforms ?
    Eg :   I'm getting  the output  as  126.75 -
             I want :  - 126.75

    see this wiki which gives details for restrictions of formatting options (I guess you didn't declare the variable correctly, i.e. with the right data element): http://wiki.sdn.sap.com/wiki/display/ABAP/SAPscript#SAPscript-WhatarethevarioustextformattingoptionsinSAPscript%3F

  • Negative Sign in the front for amount

    Hi Friends,
    i am facing problem in negative sign
    while using fm : cloi_put_sign_in_front which accepts char variable.
    In my report amount type is char15 and here negative sign appears after using this fm but when i download this data in one other char structure DATA: BEGIN OF itab_proextract OCCURS 0,
            line(502) TYPE c,
          END OF itab_proextract.
    Amount is right justified always..but afterusing this amount gets displayed in left due to this my other variable which are getting downloded after amount comes as concatenated for ex...
    Before :
    00102384NALCUS/406FED      00AX          4.26-         5126.84-
    After
    00102384NALCUS/406FED      00AX-4.26           -5126.84
    Please help me....

    Hi,
      You can reer to the following links:
    negative sign in front.
    negative sign before amount in report display(urgent)
    or
    try this code
    data : l_amt(15) value '435.46-'.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
           CHANGING
                VALUE = l_amt.
    write : l_amt.
    or
    you can try this :
    DATA : BEGIN OF IG_DOWNLOAD OCCURS 0,
    F1(4),
    F2(4),
    F3 TYPE DMBTR,
    F4 TYPE I,
    F5 TYPE NETPR,
    F6,
    END OF IG_DOWNLOAD.
    DATA : BEGIN OF IG_DOWNLOAD1 OCCURS 0,
    F1(4),
    F2(4),
    F3(16),
    F4 TYPE I,
    F5(16),
    F6,
    END OF IG_DOWNLOAD1.
    DATA : VALUE(16).
    IG_DOWNLOAD-F1 = 'AAAA'.
    IG_DOWNLOAD-F2 = 'BBBB'.
    IG_DOWNLOAD-F3 = '-3.86'.
    IG_DOWNLOAD-F4 = 1.
    IG_DOWNLOAD-F5 = '4.58-'.
    IG_DOWNLOAD-F6 = 'A'.
    APPEND IG_DOWNLOAD.
    CLEAR IG_DOWNLOAD.
    LOOP AT IG_DOWNLOAD.
    MOVE-CORRESPONDING IG_DOWNLOAD TO IG_DOWNLOAD1.
    VALUE = IG_DOWNLOAD-F3.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
    VALUE = VALUE.
    IG_DOWNLOAD1-F3 = VALUE.
    VALUE = IG_DOWNLOAD-F5.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
    VALUE = VALUE.
    IG_DOWNLOAD1-F5 = VALUE.
    APPEND IG_DOWNLOAD1.
    CLEAR IG_DOWNLOAD1.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:\A1.xls'
    FILETYPE = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = IG_DOWNLOAD1.
    Thank You.
    Regads,
    Dhanalakshmi L

  • How to display the number with negative sign in the front in ALV.

    most important, this ALV is also can totalize.
    can someone give me some suggestion?
    thanks   
       jisuwen

    i hope you want a negative sign before a char but holding some number. then that case
    loop at itab.
    concatenate itab-char '-' into itab-char.
    modify itab.
    endloop.
    and you can display in ALV with negative sign...
    Totalling you need to Specify
    DO_SUM = 'X' while populating fieldcatalog...
    If subtotals then you have to Build sort table and based on that you can proceed./.
    examples are there you can find inn SLIS package..
    vijay.

  • Move negative sign (minus) to left side of value in gui_download

    Hi,
    While downloading data using gui_download I want to bring the negative sign to the left side of the value. Is this possible?
    Regrads,
    Madhu

    Hi,
    Use FM
    CALL FUNCTION  'CLOI_PUT_SIGN_IN_FRONT'
    Regards.
    Eshwar.

  • Negative sign display for CURR field in ALV grid report

    I have a field BETRG defined as CURR field of length 15, decimal places 2. The value may be negative or positive. In case of negative values I am using EDIT_MSK option in the field catalog to bring the negative sign to the left of the value as shown below.
    Quote
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_internal_tabname     = 'LT_FINAL'
          i_inclname             = sy-repid
        CHANGING
          ct_fieldcat            = fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    LOOP AT fieldcat.
        CASE fieldcat-fieldname.
            WHEN 'BETRG'.
            fieldcat-ctabname = ' '.
            fieldcat-cfieldname = ' '.
            fieldcat-edit_mask = 'RRV_______________.__'.
        ENDCASE.
        MODIFY fieldcat.
      ENDLOOP.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_buffer_active    = 'X'
          i_callback_program = sy-repid
          i_grid_title       = 'ABCD'
          is_layout          = gs_layout
          it_fieldcat        = fieldcat[]
          i_save             = 'A'
          is_variant         = gs_save
          it_events          = gs_events
        TABLES
          t_outtab           = lt_final
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    Unquote
    On displaying the report using 'REUSE_ALV_GRID_DISPLAY' as shown above, when the value of BETRG is a smaller number like say 624, then the ALV output appears as '-            624.00' instead of '-624.00'.
    Is there any way that I can remove the space in between the negative sign and the number before displaying the ALV output using 'REUSE_ALV_GRID_DISPLAY'?

    Hi Deepak,
    I tried this and found that this doesn't work in case of currency field. Once you move back the char field (with negative sign to the left and condensed)  to the currency field, the negative sign again moves back to the right.
    I think that the only way a negative sign can be brought to the left of the currenct field is by using edit_mask of field catalog as I have shown above.
    Regards,
    Shayeree.

  • Numbers with negative sign

    Hi,
    SAP send value to XI as 100.00-
    In XI, I send this to standard subtract function where it expect this as -100.00
    Which is the good way to move the negative sign to the left ?
    Please do note there coould be situation where this value can come as positive so I have to take care of both situations.
    Thanks in advance.

    Hi,
    Check with the below mapping
    src--------------\
      Constant[-]-----| replaceString-----neg------
      Constant[]----/                             |
                                                  |
                                                 then
    src---------------\endswith-------------->if         --------->tgt
    Constant[-]-------/                          else  <---------src

  • How to interchange sign for the field

    Hello Experts,
    My interface is ABAP proxy to JDBC , ECC is sending the data PI has peocessed succesfully but it in receiver channel throwing Invalid identifier i find that Paylaod has one field like
    <STOCK_QTY>58.931-</STOCK_QTY>  in this quantity has negative value,sign is after the value data base is not accepting this format it will accept
    <STOCK_QTY>-58.931</STOCK_QTY> it will accept this format sign should be before the value.How to change the sign to before the value when it is after the value what function i has to use for changing like this
    And one more if STOCK_QTY comes with positive nothing changes has to be done only if it is negative sign after the value we have to change the sign to before the value.
    Any help is highly appreciated
    Regards
    Praveen

    Praveen
               Constant: '-'---\
                             Concatenate----\
    STOCK_QTY ----- Replace ----/           |
    Constant: '-'------/                    |
    Constant: ''------/                    |
                                            |
                                            |
    STOCK_QTY -->EndsWith ------------------If ------------------Target
    Constant: '-'------/                    |
                                            |
    STOCK_QTY -----------------------------/
    Regards
    Raj

  • Negative sign mapping handling for amount field

    hi Experts,
    From SAP ecc to PI we are receiving - negative sign after the amount value 1000 - . can you please suggest the suitable graphical mapping or UDF whenever amount value in -ve should give the ouput result as -1000. .
    Regards,
    Krushi.

    Hi Krushi - I don't see any complexity in it..
    Use graphical function "endswith" to check if the amount has "-"
    If yes then use replace function to replace "-" and then again conact it with "-"
    amount                              then amount->replacevlaue "-"-> concat + "-",amount
              endswith          if
    -                                        else amount
    For graphical function look at the below blog-
    Standard Functions in PI 7.0 - Process Integration - SCN Wiki

  • How to shift Negative sign from Right to left

    Hi friends,
    please tell me How to shift Negative sign from Right to left for quan data type i am getting on right side but i want to display it on left exactly preceding my output number display.

    hi yogesh
    check this function module..
    <u><i><b>CLOI_PUT_SIGN_IN_FRONT</b></i></u>
    this will move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
    chck this example..
    data: a1 type i value 56 ,
    a2 type i value 60,
    res type i.
    res = a1 - a2.
    data: res1(10).
    res1 = res.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
    VALUE = res1
    write res1.
    I<u><i><b>MPORTANT</b></i></u>
    You can use this FM CLOI_PUT_SIGN_IN_FRONT.
    But you need to declare the amount field as char.
    Or you can code like this
    data int type i.
    data char(10).
    int = -4.
    int = int * -1.
    write int to char.
    concatenate '-' char into char.
    reward if useful..
    Message was edited by:
            navjot sharma

  • Adobe form not showing negative sign before amount

    Hi Experts,
    We are having a strange problem. Our developers displaying
    negative
    amount in my adobe output. Its working fine in our development
    system.
    But for the similar set of data in testing system, negative sign before
    the amount is not coming. The same adobe form, layout and print
    program
    is there in both development and test environment systems. Please
    help.
    Thanks,
    Sunny

    Hi Sunny ,
    Check with the development team .. The field attribute while display types which you can restrict in the adobe form layout settings.
    I am pretty sure this  will help you and revert back if you have any questions in this regard.
    Thanks ,
    Gowrisankar

  • Negative sign to type P variable

    I have a variable with type P
    I need to prefix a negative sign to the variable, how can this be done.

    Hi,
    Do like this,,,
    data ll type p decimals 2.
    ll = '222.33'.
    ll = - ll.
    write ll.
    and to get this '-' sign in front try like this..
    data : ll type p decimals 2,
           l(20) .
    ll = '222.33'.
    ll = - ll.
    l = ll.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
       CHANGING
         value         = l
    write l.
    Regards
    Debarshi

  • Negative sign in Script

    Hi,
    Variable holding Negative sign in Print program ..
    But in Script It is not appearing minus Sign..
    i want to do without hard coding...
    regards,
    Prasad.

    There are the format used in Sap Script
    &symbol(Z)&  Omit Leading Zeros 
    &symbol(S)&  Omit Leading Sign 
    <b>&symbol(<)&  Display Leading Sign to the Left 
    &symbol(>)&  Display Leading Sign to the Right </b>
    &symbol(C)&  Compress Spaces 
    &symbol(.N)&  Display upto N decimal places 
    &symbol(T)&  Omit thousands separator 
    &symbol(R)&  Right justified 
    &symbol(I)&  Suppress output of the initial value 
    So use one of the two line in bold.
    Regards

  • How to remove the negative sign in universe designer?

    hi all,
    have used BEX query designer first to create the query, for the key figures, i have choose 'reverse sign' option and in the BEX analyzer report, it showing correctly with the figure having 'reverse sign'.
    however, the 'reverse sign' was not being carried over to universe designer when i tried to create a universe from the BEX query created earlier on. how do i find the option to 'reverse sign' in universe designer for the key figures?
    pls help.
    thank you.

    Hi,
    i tried creating  new 'measure' object with function 'sum', in the select statement, how should add in the multiply by -1?
    i tried typing this -> @Select(Marginal Profit\Marginal Profit) x -1 in the Select box but it failed during the parse part.
    FYI, the 'marignal pofit' above is the original 'measure' object that i want to have its negative sign reversed.
    pls help.thanks.

Maybe you are looking for