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

Similar Messages

  • 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

  • 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

  • SEM CPM  BSC Value Field with AGGREGATION is working wrong

    Hi everyone
    We have a balanced scorecard defined and working fine until now.
    Since a week, the value fields with "aggregation" (accummulated each month) is showing the correct value for the periods 2 -12, but the Period 1 is showing the value of the last period. For example:
    ValueField 1: Is a value field common
    ValueField 2: Is with aggregation (accummulated).
                         January  February March
    Value Field 1: 10           20          30     
    Value Field 2 : 60          30          60
    (with Aggregation)
    As you can see, the first period is the same as the last period using aggregation.
    I have checked the time variables, and the value fields and everything looks ok.
    Can anyone help me in order to solve this problem.
    Thanks in advance.
    Carlos España
    Cementos Progreso.
    [email protected]

    Dear Cempro ,
                          For me even aggregation check box is not active .Would you please tell me the process of periodization .
    Regards,
    Narender Kumar

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

  • How do I activate the 'Display Credit Balance with Negative sign'

    Dear All,
    How do I activate the 'Display Credit Balance with Negative sign'  that is already deactivated ? I checked through Trial Balance and did not find any balance for any BP or GL Account.
    Regards,
    William

    Hi,
    Please check Note No. : [970813|https://b1-support.wdf.sap.corp/sap/support/notes/970813]. The solution is available in the Note.
    Check the link in the Note for solution.
    Hope you are partner. If not, you can contact your partner for further investigation.
    Also, make sure that you have access to the PEQ Wiki page and also that all the instructions mentioned in the PEQ Wiki is followed.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • 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 create field with LEADING sign?

    I have a request to create an output file that has any negative signs in a leading position.  Example, value is 100.00- but we want it stored/displayed as -100.00.  Anyone know if there is a FM (could not find one), etc. that does this?  Thanks!

    I don't know of any FMs that will do what you want.
    There are, however, several ways of doing this using the WRITE command to transfer a number to a character field. This is all you really need, since you say you are filling a field of a structure you will be downloading to an external file.
    1) You can try the <b>USING EDIT MASK <mask></b> additions to <b>WRITE</b>.
    2) You can use <b>SHIFT <field> CIRCULAR RIGHT</b> to move any sign that exists to the beginning of a character field. This is all the formatting you need to give Excel a negative number it can parse. Other end user programs may require more work to remove the gap between the "-" and the digits of the number.
    I've found (2) to be a better approach. Good luck!

  • To mutilpy decimal value with negative sign .

    Hi ,
    I have a decimal value 500.00 and need to multiply it with -1 .
    the result however is 500- . I have made some manipulation to get that sign in front ...now it is -500 , but however Iam losing the decimals. Need the value to be -500.00 . Plz Help
    Regards,
    Sunitha

    Try as :
    data : v_c type p decimals 2 value '500.00'.
    data : v_sign(20).
    v_c = v_c * -1.
    v_sign = v_c.
    concatenate '-' v_sign into v_sign.
    condense v_sign  .
    write :/ v_sign  .

  • Decimal data type with negative sign

    Hi Gurus,
    I wanted to created a z table with a filed of type decimal with sign.  What I did is I created a field in predifined type with dec type, but -ve sign is not taking at the time of entering the data in SM30. Its saying only +ve values are allowed. Please let me know how can I achieve this. My data will be like -4.1242.
    Thanks,
    David.

    Hi..
    Try using another field as an indicator for negative fields so that you can consider those signs in your program.
    Regards,
    Karthik

  • How to "Print to PDF" with property "Signing: Allowed"

    Print to PDF generates a file with the security document property "Signing: Not Allowed". These Properties are only visible in Acrobar reader -> File -> Properties; you can't see these in Preview.
    Is there a way to change Mac OS X Print to PDF, that it generats PDFs with "Signing Allowed"?

    Thomac:
    After further review I discovered that it isn't the PDFs you are creating that has the problem, it is the limitations of Adobe Acrobat Reader to perform the ability to do the functions of Document Assembly, Commenting, Signing and Create Templates. If you had Acrobat Professional and opened your PDFs and checked the properties, you would discover that all these would be allowed.
    Initially, I was looking at my test files with Acrobat Professional. But, when I opened the same PDF with Reader on a different machine, I was getting the same summary as well.
    Adobe Reader is just that: a READER.
    You can feel safe that your PDFs allow signing.

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

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

  • DEBIT NOTE PRINTING NEGATIVE SIGN DISAPPEAR

    Dear Experts,
    Hi! Can any expert help on this. We have one negative transaction of Debit Note posting for "-26,000". But unfortunately, currently when we print Debit Note with negative posting, the amount in item 1 should be "-26,000" but the "-" sign disappeared. The final total showed correctly as "-26,000". Thanks a lot.
    Regards/Lisa Goh
    Edited by: Lisa GOH Siew Chen on Feb 13, 2009 10:07 AM

    NO SOLUTION GIVEN.

  • 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

Maybe you are looking for

  • Query don't use the right index when using bind variables

    Hi people ! I need some help because I have an issue with a query that don t use the right Indexes as it should First of all, I have mainly three tables : ORDER : Table that contains description for each Order (approximately 1 000 000 Records) ORDER_

  • Eyetv

    I'd like to convert old VHS tapes and my old HI8 video camera to my mac to edit and transfer to dvd. should I buy eyetv hybrid or eyetv 250 plus??? I'd also watch very minimal TV on it.....suggestions??? I'd like the HIGHEST quality possible since th

  • What is Report category in SAP-HR Reports ?

    Hi SAP-HR Experts . Dear Friends tell me about What is Report category in SAP-HR Reports ? How to create it ? Can we set authorizations for a Repots , if Yes the how can we set it .? Please elaborate your replies with examples . Best Regards to ALL .

  • Photoshop cs5 + Save For Web appends file names

    Hey everyone : Anyone know of a fix or a preference i can set? Hopefully, the response isn't "Can't do that anymore". Example file name/structure: Filename_partof-filename.version-01.00.psd Issue (save for web): CS3 - Filename_partof-filename.version

  • FEATURE REQUEST: Preserve Transparency of Files when Opening As Layers in Photoshop

    I am a digital scrapbooker and I have begun using Lightroom to organize my digital scrapbooking supplies.  A file format that is very common in digital scrapbooking is PNG format.  However, PNG is not setup to accept metadata so part of my workflow i