Leading zeros in report.

Hi,
I have got a char Tracking number of type numc . I have loaded the data using alpha conv routine. So when i look at cube content my char is showing leading zeroes for the values. but in reports I am not able to see leading zeroes. what setting needs to be done and wher should I do it to obtain values with leading zeroes in report??
thanks in advance.

Interesting Issue...
Jst in case are you looking at the same data/same selections ?
Any Coding/VBA used to suppress zeroes ?

Similar Messages

  • Remove leading zeros in report

    Hi all,
    I do a clasical reoporting. Data in the internal table numeric types. But when writing in the report, is appearing as 000056 etc. I want to remove this leading zeros in the report output. Any helps?
    Regards,
    Mic.

    Hi Michael,
         u can use the function module for removing leading zeros
          CONVERSION_EXIT_ALPHA_INPUT (adding zeros)
          CONVERSION_EXIT_ALPHA_OUTPUT (removing zeros)
    Regards
    Nagesh

  • IR truncating leading zeros in my popup window report

    Hello,
    I am using IR_columnname, for one of the columns in my report which is a popup window report.
    My problem is that IR_column search filter in my popup window is truncating the leading zeros.
    I am getting the value but it is truncating the leading zeros.
    like say if the deptno is something like 020 or 0020 in the parent window.
    the IR_columnname value is taking '20' (its truncating leading zeros) with this filter its not dispalying the result in my popup window.
    can anyone help me out with this.
    thanks.

    How are you passing values to the IR filter? There could be a possibility that you source logic is truncating the leading zeros.
    Thanks,
    Manish

  • Report Builder: output to Excel removes leading zeros

    I'm trying to use the Report Builder to output a numeric
    field to EXCEL , but on numbers that start with zero EXCEL removes
    the leading zero's. ex. 00123 becomes 123.
    Is there something that I can put in the expression builder
    on the field to overcome this.
    I've tried concatonating a single quote on the front of the
    field but the single quote shows up on the output. I've tried this
    on both the SQL and on the expression builder.
    I've read on some of the posts where people have tried using
    'mso-number-format:"\@'" within a TD tag but I can't seem to get
    the syntax right inside the Expression Builder.
    Has anybody got any suggestions?

    Excel will remove leading zeros in a numeric field because it is treating the column as numeric. Putting a ' in front of the number forces Excel to treat the column as text.

  • Leading zeros getting truncated in plsql report

    Hi,
    I've a requirement of a plsql report with an excel output. When i see the output in excel, the leading zeros get truncated. Is there any suggestion for this, other than enclosing within ' '. Because this particular solution prints the output along with quotes which is not acceptable. Please help me with this.
    -Divya Goteti

    Just prefix with =" and " at teh end of column. like
    select '="' || bank_account_no || '"' from employee_bank_list
    but if you are using same report for pdf also then use decode in pre/postfix.
    Imran

  • Leading zeros in apex reports

    Hi,
    In an apex application, when user downloads data from an apex report into csv, it loses the leading zeros because excel thinks it is a number.
    Is there a way to keep the leading zeros?
    Thanks

    I'm afraid but I think that the simplest way is to "quote" the string (so that Excel take it as "text").
    Example:
    SELECT
    '="'|| c1 ||'"'
    FROM
    select 'MX190' c1 from dual
    UNION ALL
    select '00190' c1 from dual
    Or, sometimes, I save the ".csv" file and load it with Excel's Wizard that allow to specify the column to be considered text ...
    But for a normal user is a complex solution...
    Thanks
    Stefano Corradi

  • How to display leading zeros in a report

    Hi folks,
    I am doing a HR report and the users are very much used to seeing a two digit numeric value as the pay scale since their legacy days.
    In BW, I have the Pay Scale defined as a character (2) and it shows the values on the report as follows:
    Pay Scale
    0
    1
    2
    3
    11, etc.
    But the users would like to see 00, 01, 02, 03, 11, etc.
    Under the query properties, display tab, there are four separate options - display zeros, show zeros as, etc. I tried all the options but the pay scale still does not show the leading zeros. I remember seeing a SAP note a while back that talks about this. Does anybody know how to force the leading zeros on the BEx report.
    Thanks.
    Abdul

    Try removing the ALPHA Conversion from info object defintion.

  • Cuts off leading zeros in a report column when "Download to Excel" function

    Hello
    When a text column contains leading zeros for example "000250" the download to Excel stores the string as "250" in the spreadsheet. I am using a column which is a string.(varchar)
    Can somebody suggest me , how to go ahead with it
    Thanks
    Edited by: user647228 on Sep 11, 2008 1:40 PM
    Edited by: user647228 on Sep 11, 2008 1:42 PM

    (To Vins) Actually, concatenating a space doesn't do it. When the file is downloaded into Excel, the leading space is ignored and it the leading zeroes are still trimmed.
    To user647228: A non-space character needs to be concatenated. Regarding what character to append, I would give the following consideration: If the users are content with seeing an added character to the "number," you can append say an underscore "_" and Excel will download the number properly. It's fairly unobtrusive and can be "visually ignored."
    If the end user insists on gettin rid of the extra character once the file is downloaded, I would append a character that is rarely, if not never, used in the report. (This ensures or mitigates replacing other instances of the character.) Then you can do a Replace All in Excel to replace the extra character with a single apostrophe. The single apostrophe will be interpreted by Excel to mean "text" and the appearance will change to exactly what is desired.
    Note: Replacing the extraneous character with a space for example, will result in the leading zeroes being again lopped off by Excel...

  • Leading zero issue in Report

    Hi Xperts,
    i have report which has Plant ,Batch and Material.
    Now we found that the Batch that start with "0"  no longer has the leading zeros in the report.
    For Exp:
    Plant-X    Material-123     Batch-0012345
    But in report it is showing,
    Plant-X    Material-123     Batch-12345
    As i have checked in the respective Table and in Cube the batch Number (0012345)  is coming correctly with the leading zero.
    but why the leading zero is not showing in my report.
    Could any one please help me on this issue?
    Regards,
    satish
    Edited by: SAP534 on Mar 31, 2010 8:35 AM

    If your requirement is to show the leading zeros for the Batach, then i will suggest you to redesign the batch infoobject with the compunding objects of material and plant. 
    You have another option like to display the batch from master data in your report by making it as anavigantional attribute in your cube.
    We do have the similar requirement and our business prefered to have Batch compunded with material and plant. Check with your Business and go aheead with the changes.
    Hope this helps.
    Regards,
    Reddy

  • XL Reporter - item code starting with leading zeros was truncated

    Hi,
    Anybody knows how to prevent XL reporter from truncating the leading zero(s) in the item code?
    I had done a XL report where one of the field is to retrieve Item Code. In the report generated, the formula was as below:
    =ixDimGet("00100068")
    However, when MS Excel display it in the spreedsheet, the item code becomes "100068" where the leading zeros was truncated. The correct item code was supposed to be "00100068". I had tried to change the cell format to "text", "number", "general" and etc, but it doesn't work. Any method to correct the item code display in the Excel spreadsheet?
    Thanks,
    sianghing

    Chan,
    There is a simple solution for this.  Highlight the cell with the Item Code selection in it.
    Click the formula builder icon in Excel to open the formula builder
    In the bottom box, type TRUE
    This tells Excel that you want to display exactly what comes out of the database, without having to predetermine it with a Custom format, etc.
    I think that will solve your issue.
    Let me know if this needs further explanation.
    Regards,
    Brad Windecker
    [Orchestra Team|http://www.orchestrateam.com]

  • Removal of leading zeros for material no. in report

    hi
    my issue is that i have to remove leading zeros for material number when displaying in alv grid.iam getting output.but leading have to truncated automatically.
    eg: 000000000000000102
    the ouput should be 102.
    please do provide solution for this or any function module.thanks in advance.

    Hi Sanjana,
    while populating the internal table use the conversion exit available for MATNR. this will remove the leading zeros.
    oter possible way, declare the internaltable by referring the data element MATNR, i hope if you do this, it will delete the leading zeros automaticallt.
    or if you declare the internal table field as charecter type, use the ALPLA_CONVERSION_EXIT_INPUT ot OUTPUT function module to remove the leading zeros.
    Reward the points if it is helpful..

  • IR - Column with leading Zeros issue

    Hello,
    I've got an IR report which includes as "default report settings" 1 column with leading 0s. In order to export to Excel that column as text rather than as a numeric I followed a workaround proposed before in this forum (excel copy drops leading zeros
    In essence this workaround is to create an identifical column but in "excel text format" and display the columns depending on the request value: INSTR(NVL(:REQUEST,'YABBADABBADO'),'CSV') <> 0 for example.
    This works just fine for the default report.
    The problem arise when a user creates his own customise report that includes the mentioned column and saves it as a named report. Here, when the results are exported to excel the "excel" column does not appear.
    In fact, just hiding one of the displayed columns produces the same undesired result.
    I would appreciate any comments or suggestions.
    Many thanks
    Edited by: Javier Gil on Jul 20, 2010 7:52 AM

    I have found a better method. In your IR query:
    SELECT LPAD(v.vendor, 7, ' ') vendor,
    /*Just LPAD to a length of the column defined in the database table or to 7, whichever is greater. */
    FROM v, r
    WHERE v.VENDOR = r.VENDOR
    AND date_rcv <= to_date(:P150_CUTOFF,'yyyy/mm/dd')
    AND inv_nbr = ' '
    AND to_stores <> 'T'
    AND (V.VENDOR = RPAD(:P150_VENDOR,10,' ') OR :P150_VENDOR = 'ALL')
    When you download to Excel by Download/XLS (Request=XLS), it preserves the leading zeros.
    In the case of dates, you should LPAD 10 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YY'), 10, ' ') date_rcv,
    I haven’t tried it yet but I think in the case of ‘MM/DD/YYYY’, you should LPAD 12 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YYYY'), 12, ' ') date_rcv,
    Drawbacks of this method:
    Since the string has leading white spaces, you cannot use the filter for the ‘=’ comparison operator. Even filtering using leading white spaces will not return anything. You must use the LIKE and NOT LIKE operator instead.
    Advantages of this method over the original one I posted yesterday:
    1)     You do not have to create another column for download, just one column will suffice.
    2)     Even though the query has leading white spaces, they will not display in the IR region.
    Edited by: richardlee on Aug 5, 2010 11:10 AM
    Edited by: richardlee on Aug 5, 2010 11:16 AM

  • How to delete leading zeros in sap script

    Hi
    In sapscript iam facing an issue with num4 field.
    Iam using this field to display Serial.No
    it is displaying '1' as 0001 i want to display here 1 with out leading zeros.
    If there any solution let me know

    Hi,
    Try below code
    data: w_vbeln type vbak-vbeln,
    w_char(10).
    w_vbeln = '000012345'.
    write w_vbeln to w_char no-zero.
    or
    The function Module 'CONVERSION_EXIT_ALPHA_OUTPUT' is used to remove the leading zeros in a field.
    the following is a sample code which i have used for 'Commitment item' in my report. replace the field with your required field.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
    INPUT = IT_FMIT1-RFIPEX
    IMPORTING
    OUTPUT = IT_FMIT1-RFIPEX.
    Regards,
    Chandru

  • BAPI_PO_CHANGE document number leading zero problem

    Hi experts,
    The following code clears the "Delivery Complete" flag on a list of Purchase Orders uploaded from a CSV file.
    The PO number is 9 digits long, however, in EKPO table it is stored as 10 digits (prefixed with a zero). The BAPI does not recognise the document number unless it is prefixed with a zero in the CSV file (which adds extra work for the user to create custom format in Excel to add the leading zero).
    What code is required for the BAPI to recognise the 9 digit number without the leading zero?   Perhaps the leading zero could be hard-coded into the program?
    Any advice is much appreciated.  Thanks for your time.
    REPORT  Z_MASS_REMOVE_FDI_DCI_BAPI.
    *Check if file exists
    DATA: rc TYPE sy-ucomm.
    CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query    = 'FE'  "File Exist?
                filename = 'X:\STO.TXT'
           IMPORTING
               return   = rc.
    IF rc EQ 0.
      WRITE: / 'File does not exist'.
    ENDIF.
    TYPES: BEGIN OF ty_tab,
            DOCNO(10),
            ITEM(4),
           END OF ty_tab.
    DATA : it_tab TYPE STANDARD TABLE OF ty_tab,
           wa_tab TYPE ty_tab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = 'X:\STO.TXT'
    *     FILETYPE = 'ASC
          has_field_separator = 'X'
    *     HEADER_LENGTH = 0
    *     READ_BY_LINE = 'X'
    *     IMPORTING
    *     FILELENGTH =
    *     HEADER =
          TABLES
          data_tab = it_tab
          EXCEPTIONS
          file_open_error = 1
          file_read_error = 2
          no_batch = 3
          gui_refuse_filetransfer = 4
          invalid_type = 5
          no_authority = 6
          unknown_error = 7
          bad_data_format = 8
          header_not_allowed = 9
          separator_not_allowed = 10
          header_too_long = 11
          unknown_dp_error = 12
          access_denied = 13
          dp_out_of_memory = 14
          disk_full = 15
          dp_timeout = 16
          OTHERS = 17.
    END-OF-SELECTION.
    LOOP AT it_tab INTO wa_tab.
      WRITE:/ 'DOCUMENT: ',
      wa_tab-DOCNO,
      ' ITEM: ',
      wa_tab-ITEM.
      WRITE: / '-----------------------------------------------------------------------'.
      DATA: s_header TYPE bapimepoheader,
            s_headerx TYPE bapimepoheaderx,
            s_item TYPE bapimepoitem,
            s_itemx TYPE bapimepoitemx,
            i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
            i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
            s_bapimepoheader TYPE bapimepoheader,
            s_bapimepoheaderx TYPE bapimepoheaderx,
            s_bapimepoitem TYPE bapimepoitem occurs 0 with header line,
            s_bapimepoitemX TYPE bapimepoitemX occurs 0 with header line,
            wa_message TYPE c LENGTH 100.
      s_bapimepoheaderx-po_number = wa_tab-DOCNO.
      s_bapimepoheader-po_number = wa_tab-DOCNO.
      s_bapimepoitemx-PO_ITEM = wa_tab-ITEM.
      s_bapimepoitem-PO_ITEM = wa_tab-ITEM.
    *Remove Delivery Complete Indicator (DCI)
      s_bapimepoitemx-NO_MORE_GR = 'X'.
      s_bapimepoitem-NO_MORE_GR = ' '.
      append s_bapimepoitem.
      clear s_bapimepoitem.
      append s_bapimepoitemx.
      clear s_bapimepoitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = wa_tab-DOCNO
        TABLES
          return        = i_return
          poitem        = s_bapimepoitem
          poitemx      =  s_bapimepoitemx.
    *Message types: S Success, E Error, W Warning, I Info, A Abort
    *Supress all Warning Messages
    DELETE i_return WHERE ( TYPE EQ 'W' ).
    *Commit only if no errors have been returned
      read table i_return with key type = 'E'.
      if sy-subrc ne 0.
        COMMIT WORK AND WAIT.
      endif.
    *Display Return Messages on Screen
      LOOP AT i_return.
        WRITE: /   'RETURN MESSAGE: ',
        'ID: ',
        i_return-id,
        ' TYPE: ',
        i_return-type,
        ' NUMBER: ',
        i_return-number,
        i_return-message.
      ENDLOOP.
      WRITE: / '-----------------------------------------------------------------------'.
      refresh : s_bapimepoitem,s_bapimepoitemx.
    ENDLOOP.

    hi,
    Use the conversion exit to make it as 10 digit char CONVERSION_EXIT_ALPHA_INPUT.

  • Truncation of leading Zeros when Down Loading into Excel - OLE Objects

    Hi,
    Can any one help me on this.
    I am using <b>OLE Objects</b> to download Data into Excel Sheet. Data with leading Zeros is getting truncated in Excel.
    Ex: Report Output is showing Plant Number as 0002. But when i am downloading to Excel Plant value will become 2 .
       I would like to have it as 0002 in Excel.
    I have declared Werks as CHAR of 4.I am using OLE Obects for Downloading into Excel Sheet.
    I am using "OLE2_OBJECT" I can not use any other FMs to down load to Excel.As i am modifying this program not creating.
    Thanks In Advance.
    K.Nirmala
    Message was edited by: Nirmala Reddy

    Hi Nirmala,
    While downloading to excel sheet, u need to change the number format of cell from General to Text, then leading zero's won't get deleted. For that u need to set the property of the cell. Please check this sample code,
    INCLUDE OLE2INCL.
    tables : zobrent.
    data : it_kna1 type table of zobrent with header line.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    DATA  H TYPE I.
    DATA: cell1 TYPE ole2_object.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
      select * from zobrent into table it_kna1
               where zopanid = '10001'
                and zo_brent = '050'.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'EDate'.
      PERFORM FILL_CELL USING 1 2 1 'Brent'.
      PERFORM FILL_CELL USING 1 3 1 'Zopanid'.
      PERFORM FILL_CELL USING 1 4 1 'Contract Type'.
      PERFORM FILL_CELL USING 1 5 1 'Price Type'.
      PERFORM FILL_CELL USING 1 6 1 'Installation Type'.
      PERFORM FILL_CELL USING 1 7 1 'Volume'.
      PERFORM FILL_CELL USING 1 8 1 'AQ'.
      PERFORM FILL_CELL USING 1 9 1 '00000123'.
      LOOP AT IT_KNA1.
    copy values to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_KNA1-zo_effdat.
        PERFORM FILL_CELL USING H 2 0 IT_KNA1-zo_brent.
        PERFORM FILL_CELL USING H 3 0 IT_KNA1-zopanid.
      ENDLOOP.
      CALL METHOD OF h_excel 'Cells' = cell1
        EXPORTING
          #1 = 1
          #2 = 1.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
      if sy-subrc eq 0.
       write : / 'year'(001).
      endif.
         FORM FILL_CELL
    sets cell at coordinates i,j to value val boldtype bold
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ***Changing the format of the cell from General to Text
      <b>SET PROPERTY OF H_ZL 'NumberFormat' = '@'.</b>
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    U just paste this code in a sample program & see.
    Please reward, if found helpful.

Maybe you are looking for