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

Similar Messages

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

  • Removing # sign in the Report for Blank Value

    Guys,
    I was trying to use the below code VB, but i am getting error like Expected: End of statement.
    I am new to VB, do anyone have step by step guide to implement the below macro for Excel and remove the # from BEx analyzer.
    Do i need write this macro for each query? I totally dont understand the link.
    Kindly guide to run the macro and avoid # in reporting.
    Do I need to implement this macro on each end user client server ?
    Removing '#' in Analyzer (Report)
    In ODS, there are records having a value BLANK/EMPTY for some of the fields. EX: Field: `Creation Date' and there is no value for some of the records.
    For the same, when I execute the query in Analyzer, the value `#' is displaying in place of `BLANK' value for DATE and other Characteristic fields. Here, I want to show it as `BLANK/SPACE' instead of `#'. How to do this?
    I had a similar problem and our client didn't want to see # signs in the report. And this is what I did. I created a marco in Workbook as SAPBEXonRefresh and run my code in Visual Basic editor. You can run same code in query also as when you will refresh query this # sign will be taken care. You can see similar code in SAP market place.
    I will still suggest not to take out # sign as this represent no value in DataMart. And this is SAP standard. I did convince my client for this and later they were OK with it.
    The codes are below:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    If queryID = "SAPBEXq0001" Then
    resultArea.Select
    'Remove '#'
    Selection.Cells.Replace What:="#", Replacement:="", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True
    'Remove 'Not assigned'
    Selection.Cells.Replace What:="Not assigned", Replacement:="", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True
    End If
    ' Set focus back to top of results
    resultArea(1, 1).Select
    End Sub
    Regards,
    Anand
    Edited by: araj123 on Oct 19, 2010 4:51 PM
    Edited by: araj123 on Oct 19, 2010 4:58 PM

    Anand,
    This is what I have used in the past and works just fine
    Sub HashRemoval()
        Application.ScreenUpdating = False
        Cells.Replace What:="#", Replacement:="", LookAt:=xlWhole, SearchOrder:= _
            xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
        Application.ScreenUpdating = True
    End Sub
    But I have this as a separate macro that can be called any time.
    Cheers
    Craig

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

  • Can we display on the screen for  amount without decimals

    Dear Freinds,
               I have scenario they wanted to give the amount field with decimals......actually the field is standad field
    it is betrg ( i.e amount field ) data type of this field is PAD_AMT7S.
    Is it possible that on screen can i display without decimals.
    Regards
    Madhuri.

    Dear Freinds,
           Thanks for replying to my question , i want to modify the value in the input field of the stnadard selection screen.
    i.e in infotype 0014 i have the amount field ........( data element is PAD_AMT7S) ...........The user is saying when
    iam updating th e value into infotype 0014 for the AMount field BETRG (data type : PAD_AMT7S) he dont want the
    decimals coming
    ie. actually it is getting uploaded as 20.14 ..........he wants only 20 . My question how can we modify amount field without
    decimals points at all ? ......as per my knowledge i can only based on currency code i can either give 2 decimals or 3 decimals
    but without decimals can i store on the screen ...........?
    During the testing they are saying even if it goes into the data base with decimals doesnt matter but on the screen they wants
    only the amount withou decimals. i.e they want to save on the screen field of infotype 0014 betrg amount field as without decimals.
    Could any one let me know is it possilble.
    regards
    madhuri

  • TS1363 hi have tried to update my iphone now has locked out with the apple sign on the front and wont switch off

    hi have tried to update my iphone now it has locked out with the apple sign on and won't switch off

    See here - http://support.apple.com/kb/TS3694#error1603

  • 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

  • Negative sign for DMBTR field in ALV output

    Hi Experts,
    Before posting I have searched for more than 3 hours in the forums to get a solution for this.
    I did not get any solution so I am posting this problem which I need to resolve.
    I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
    Here for all the values in DMBTR which are negative are getting displayed as '-        6673.56','-       289956.23' as I am using the edit mask 'V_____________.__'.
    I have to get the value shown as '-6673.56', '-289956.23'.
    I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
    PLease check and suggest for a solution.
    Regards
    Kishore

    Hi,
      If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
    Hope this helps.
    Regards,
    Siva

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

  • 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

  • Minus sign at the end of the value, Need to get Preceeding minus sign.

    Hello gurus,
    I am using following code in web dynpro to get data from a FM and downloading it to excel.
    for the numeric values I am getting minus sign at the end of the value in excel. but If I display the value in alv, it is coming fine. Please let me know where I am going wrong.
    ex: 4568-
          CALL FUNCTION 'Z_EXTRACT'
            EXPORTING
              extract   = z_extract
            TABLES
              it_data       = tab_et.
          DESCRIBE TABLE tab_et.
          IF sy-tfill GT 0.
            CLEAR: text, xtext.
            DATA :    v_fore9ldepl(17)      TYPE n.
            LOOP AT tab_et INTO rec_et.
             MOVE:
              WRITE:  rec_et-fore9ldepl TO v_fore9ldepl DECIMALS 3.
              CONCATENATE  text '1'
                                rec_et-z0g_cwwter                          
                                v_fore9ldepl
                     cl_abap_char_utilities=>newline INTO text SEPARATED BY ','.
                      cl_abap_char_utilities=>newline INTO text SEPARATED BY
                      cl_abap_char_utilities=>horizontal_tab.
            ENDLOOP.
            CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
              EXPORTING
                text   = text
              IMPORTING
                buffer = xtext.
            CLEAR:  filename, wa_files.
            CONCATENATE 'EXTRACT'   '.XLS' INTO filename.
            wa_files-content = xtext.
            wa_files-filename = filename.
            APPEND wa_files TO files.
      DATA izip TYPE REF TO cl_abap_zip.
      DATA output_file TYPE xstring.
      CREATE OBJECT izip.
      LOOP AT files INTO wa_files.
        izip->add( name = wa_files-filename
                    content = wa_files-content ).
      ENDLOOP.
      output_file = izip->save( ).
      CALL METHOD cl_wd_runtime_services=>attach_file_to_response(
      EXPORTING
      i_filename = 'TEST.ZIP'
      i_content = output_file
      i_mime_type = 'ZIP/APPLICATION'
           i_in_new_window = abap_false
      i_in_new_window = abap_true
      i_inplace = abap_false ).

    Hi,
    In the Context attribute tyr to use the properties of formatting where you can have the MINUS sign in the front of the value..
    If this is working fine then when you use any standard export of ALV the same (AS iS) is shown in Excel right...
    Regards,
    Lekha.

  • 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

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

Maybe you are looking for