To prefix an amount with a negative sign

Hi All,
I want to prefix a positive amount with a negative sign...for display...
How will I be able to do that ?
Regards,
Archana

amount = -1 * amount.
if it does not work then you might need to change the type of amount field.
Thanks,
Ram

Similar Messages

  • PE51 - Deduction  Wage Type amount showing with a negative "-" sign

    Dear All,
    We have pay slip configured for the client in PE51 - HR Foms Editor.
    Here, we have added the deduction wage types in Window tab and Cumulations tab.
    However, when we generate the pay slip, the custom wage types which are defined in deductions show up the amount with a negative " - " sign.
    Please advise how this negative sign can be removed.
    Please note that in Cumulations tab, under deductions, the MS value against all the deductions wage type is " +"
    Regards,
    Reema

    Hi,
    Write a rule to remove the prefix '-' for the WT's for the STD payslip
    Regards,
    Hemant V.Mahale

  • ORA-06502 encountered due to negative sign

    Problem:
    I encountered the error in my sql statement with the message:
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 144
    I already found the problem:
    v_str:= lpad(nvl(to_char((to_number(display_r.CO_AMOUNT)/100),'999,999,999.99'),' '),'15',' ');
    DBMS_OUTPUT.PUT_LINE(v_str);Because the value of CO_AMOUNT has negative sign as: 00000000-381250
    As such, I would like to seek help in resolving the problem I encountered. Is there a way to still display the output with the negative sign?
    Thanks in advance.

    The negative sign is not the problem, it's the fact that it's in the middle of the string. SQL expects the sign to be at the beginning (or end) of a number.
    This is one of the side effects of using strings to hold numeric data. There are a number of reasons why you might have this behaviour, it really depends on what your app does and how it populates the CO_AMOUNT variable.
    Anyway, you can solve this specific problem with a simple LTRIM:
    SQL> SELECT to_number('00000000-381250') FROM dual
      2  /
    SELECT to_number('00000000-381250') FROM dual
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> SELECT to_number(ltrim('00000000-381250', '0')) FROM dual
      2  /
    TO_NUMBER(LTRIM('00000000-381250','0'))
                                    -381250
    SQL> Cheers, APC

  • Check info "Amount paid is showning with negative sign"

    Hi ppl,
    After the RFFOUS_C program is run and after the check generated, If i go and check the "check inforamtion" in PAYR table. It is showing the paid amount as 2000.00-
    The amount is shown with a 'minus' sign at the end.
    What this means???
    Please help.... Thanks!

    Hi Sri,
    The Amount with negative sign is pulled out from the Payment document against the GL account. This means that the funds are going out or its an outgoing payment.
    Rgds,
    Vinod

  • 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

  • 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 change to prefix

    dear gurus
    please let me know how to change the negative sign to prefix in alv report. ( i.e transcode GRR2=>formating =>report layout => language dependent => debit/credit sign [+/-] ).
    Regards
    Vijayendran S

    hi,
    You can use <b>edit_mask</b> to serve your purpose.
    You can specify the formatting template as follows:
    'V'only with fields of type P or I:
    output of leading sign
    wa_fieldcat-edit_mask = 'V______'.
    Note:
    1)If the leading sign is to be output with a field of type P or I, you must specify the wildcard character V at the desired place. If this character does not appear in the template, no leading sign will be output if the value of f is negative.
    2)When formatting a field of type P with decimal places, the value is not aligned with a character in the template representing the decimal point (either a period or a comma). If you want to have this character in the output, you must insert it in the correct position in the template and define the formatting from the right. If there is no character for the decimal point in the template, no such character is output.
    Regards,
    Sailaja.

  • Properly displaying currency amounts (negative sign) via WRITE statement

    Dear forumers,
    Using the WRITE statement, how may I properly display a currency amount that has a negative value?
    In my program, the variable, V_AMOUNT to be displayed is originally of the type "WERTV12".
    Using the WRITE statement for this, nothing gets displayed in the screen (blank only).
    So, I assigned V_AMOUNT to another variable of the type "P DECIMALS 2", V_AMT.
    Using the WRITE statement for this, the amount is displayed in the screen.
    But, if the amount has a negative value, the negative sign is not displayed there.
    I.e. If V_AMT has the value '500.00-', only '500.00' is displayed in the screen.
    Finally, I changed the type of V_AMT as type string.
    This works - any amounts with negative sign is displayed in the screen properly.
    But, with this approach, I'm unable to "customize" the display of amounts according to currency, like this:-
    DATA int TYPE i VALUE 12345678.
    WRITE int CURRENCY 'EUR'.
    The output of the WRITE statement is "123456,78".
    Is there a better way to achieve this?

    SAP display amounts/quantities as positive numbers with another field that denotes whether positive or negative.  You could change the value to a character field and put the negative where you need it (or put an additional field next to the amount with the sign)... but using a character field probably would negate the currency display, too....

  • Populate negative sign to amount fields

    Dear SDNers,
                          i need to populate a amout in local currency and amount in document currency fields with negative sign based upon debit./redit indicator. that is if debit/credit indicator gives s means we need to populate neagtive sign to for those fields, if it gives H nothing has to be populate.
    this is possible in update rules. plesae provide the code or else posible in bex.
    fields
    /BI0/OIOI_DMBTR-----amount in local currency
    /BIC/OIZWRBTR----amount in document currency
    /BI0/OIFI_DBCRIND----     Debit/Credit Indicator
    need the code for in update rules.
    help me on that

    Hi ,
         i am getting the following the error while checking the update routine
    E:Field "COMM_STRUCTURE-OIFI_DBCRIND" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA"statement.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CSZADPAY.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    IF COMM_STRUCTURE-OIFI_DBCRIND = 's' .
    RESULT = COMM_STRUCTURE-OIOI_DMBTR * -1.
    ELSEIF COMM_STRUCTURE-OIFI_DBCRIND = 'h' .
    RESULT = COMM_STRUCTURE-OIOI_DMBTR.
    ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • 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

  • Printing value fields with negative sign??

    Hello Experts,
    I have developed a interface, which writes the invoice data to application server/unix, this is a notepad. My specifications are as below,
    MWSK1(2)   TaxCode                         65     2     KONV-MWSK1     
    KWERT(13)  Condition Value                  67     13   KONV-KWERT     
    KSTEU(1)  Condition Control                80     1     KONV-KSTE
    I have to print KWERT value from 67th position until 13 positions, meaning until 80 positions, fine. My code is as below,
      MOVE: wa_invoice_price-mwsk1  TO unix_file+64(2).
      WRITE: wa_invoice_price-kwert    TO unix_file+66(13) RIGHT-JUSTIFIED.
      MOVE:  wa_invoice_price-ksteu    TO unix_file+79(1),
    So, it printing like below (pls. note 0.04 minus value in right bottom corner)
    P26701ZCG620101006C          100.00         0.00USD  1    UGL            0.00A A 9
    P60001ZF3520101006C          100.00         0.00USD  1    UGLG          0.04-H B 9
    But, business want to have like below (pls. note the DIFFERENCE for 0.04 minus value in right bottom corner),
    P26701ZCG620101006C         100.00        0.00USD  1    UGL               0.00   A A 9
    P60001ZF3520101006C         100.00         0.00USD  1    UGLG             0.04 - H B 9
    meaning, the 13th position should be negative sign (if at all any value does have a negative sign, else its normal)....so, the negative sign should sit on 13th postion. As am using WRITE statement with RIGHT JUSTIFIED am facing thisissue!! as u know we can not send a 'P' type value to unix/apps server, pls. let me know how to get it done?
    Thank you

    why can't the user live with a leading sign, like '-   0.04'?  If possible, do
    shift <fieldname> circular up to '-'.
    Or, if value is less than zero, set another variable to '-', else set to space, and multiply value with '-1', like:
    if <field> < 0.
       lv_sign = '-'.                " neagtive value
      <field> = <field> * '-1'.  "reverse the sign
    else.
    lv_sign = space.          "positive value
    endif.
    then, adjust your field length and insert a sign column or simply add a column for the sign....

  • 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

  • The option 'Display Credit Balance with negative sign" was not activated.

    I've encountered with a huge problem after load opening balance.
    I forgot to tick the  option 'Display Credit Balance with negative sign"
    It makes my client's Chart of Account  uncommon such as credit balance in Cash Account, AR .....
    However, I've search the sap  note to solve it  as follow:
      Description of the bug::     
    When creating the company in the system the option 'Display Credit Balance with negative sign' was not activated.
    Once transactions were created in the system the functionality can not be changed.
    Limits of the query:     
    After running the update query, please restart SBO first and then   run the restore 'GL account and bp balances';
    otherwise, the cashed value of SBO will not be updated and restore function may not take effect.
    1. Meaning of  restart SBO => restart SBO Service Manager right?
    2. Please help me please to find "The restore G/L account and bp balances" form.  Where is it?;
    Thank you

    Hi,
    I would think that you are following the PEQ instructions for note 970813, correct?
    If this is the case and you are using 2007 then you will find the restorev in the top menu; Help -> Support Desk -> Restore. You will find the functions here. Please note that this should only be used on direct instruction from support or a note like in this case. A backup should also be taken before running restore.
    Regards,
    Jesper

  • Cannot create AR Invoice negative amount with WithHolding Tax negative amount via DI API

    Hi All,
    I tried to create AR Invoice Document via DI API, but with negative amount and negative withholding tax amount.
    Document added successfully, but when i open the document in SAP, and i open WTax Table information, withholding tax amount become zero,
    Please see image below.
    But when i add the same document through SAP Screen, i can fill WTax Amount with negative amount.
    SAP Version 9.0 PL 5
    Please kindly help,
    Thanks
    Best Regards
    Siddharta

    Hello.
    If this is different to the behavior of the B1 application it should be considered a bug - like any such difference between DI API and app.
    HTH

  • 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.

Maybe you are looking for

  • CE Trial (Updated 13 June) J2EE Server startup error

    After a succesful install of the 13 June Trial, I am having an error in starting the J2EE sever instance. The symptons are: On SAP management Console jstart.exe is in status "some processes running" In the directory "D:\usr\sap\CE1\J01\work" the file

  • Some videos import without any sound!

    Hi there, I bought my iPod Video the other day, and when I choose the option to "Covert selection for iPod" when I right click on the video, it converts the video, and when I select it to listen to it the video plays but no sound comes out. This isn'

  • CustomLoginModule always error "Invalid null input: name"

    Hi All, I'm trying to create a custom LoginModule. I've changed the autorization.xml, created a new login-stack and set the  LoginModuleClassLoaders property. But whatever I do I always get the message "Unknown message (ID = Invalid null input: name)

  • How to set autocommit off???

    We have an application that uses a larger number of pl/sql stored procedures. Some of those use the 'for update' clause. We're now getting some "fetch out of sequence" errors. In researching the documentation, it says that to use a SQL that has 'for

  • Need to call a popup on VA02 screen

    HI SAP Gurus, I  have a scenario where client wants a popup screen everytime user tries to save the field IHREZ (Your reference) field in transaction va02..The screen will contain various database fields including the following Unit#      ,