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]

Similar Messages

  • XLR and Items with leading zeros

    Forum,
    Does anyone know the best way, in XL Reporter, to deal with Item Codes that have leading zeros?
    Scenario:
    We have 2 items:  001, and 0001
    When I pull these into XLR and generate the report, Excel converts the numbers to "1"
    I have tried every cell format I can think of and have not come up with a solution.
    "Text" type returns the XLR syntax (=ixDimGet("ITM", "ItemCode")), "General" returns the "1" without leading zeros, etc.
    Anyone have a solution?
    Thanks in Advance,
    Brad Windecker

    Hi Brad,
    Seems like there's not direct solution for this one, function ixDimGet automatically removes leading zeros.
    Anyway, I would suggest that we utilize Macro Programming for this one.
    Here is a short macro code I developed, assuming the item Code is placed in Column B and the macro will automatically extract the parameter from the function call in Column B (=ixDimGet("00002") and place it Column C.
    Just place the ff code in SHEET1. The macro is utilizing the Worksheet Change event
    Const colItemCode = 2
    Const colShowCode = 3
    Private Sub Worksheet_Change(ByVal Target As Range)
       If Target.Column = colItemCode Then
         strFormula = Target.Formula
         If Left(strFormula, 9) = "=ixDimGet" Then
            itemCode = Mid(strFormula, 12, Len(strFormula) - 13)
            With Range(Chr(64 + colShowCode) & Target.Row)
               .NumberFormat = "@"
               .Value = itemCode
            End With
         End If
       End If
    End Sub
    Constant colItemCode is referring to the column of the Item Code
    Constant colShowCode is referring to the column for the exracted Item Code
    Hope this help
    Laurence Resubal

  • Export to Excel - data with leading zeros

    Does anyone have any tips or tricks for running a query then exporting to Excel without dropping leading zeros from the data?
    Examples: numeric Item codes with leading zeros, telephone numbers that have been entered with no spaces.
    Regards,
    Douglas McDove

    < Font Color="RED" Size = 3 Face=Verdana>
    I liked the challenge and therefore.......I got this for you
    </Font>
    SELECT CHAR(28) + T0.CardCode [BP Code\] FROM  [dbo\].[OCRD\] T0
    SELECT CHAR(29) + T0.CardCode [BP Code\] FROM  [dbo\].[OCRD\] T0
    SELECT CHAR(30) + T0.CardCode [BP Code\] FROM  [dbo\].[OCRD\] T0
    SELECT CHAR(31) + T0.CardCode [BP Code\] FROM  [dbo\].[OCRD\] T0
    Any of the above 4 should work.  T0.CardCode is the database field I tested, you can substitute this with any database field and it should work.
    Regards
    Suda

  • 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

  • Need formula to take text from one cell, add that to a serial number with leading zeros

    I'm trying to create a spreasdheet cell that simplifies creating videotape Numbers from a job name in cell and appends a serial number with leading zeros, and that would survive an export to EXCEL.
    The result would look like
     A Column
    Job Name
    B ColumnTape #
    Formula needed for B
    ClientName-TapeType-
    ClientName-TapeType-001
    =
    ClientName-TapeType-
    ClientName-TapeType-002
    =
    I've tried using a custom cell format that had the text in front of the (Integer) drag and drop, with three integers and leading zeros.
    That worked, but requires recreating the custom cell format for each client and tape type.
    So, I've used the formula =A2& in order to play around with different things, but haven't hit on something that adjusts for increased numbers and retains the leading zeros.
    I don't mind doing a starter for the first row and then adding +1 in the formulas for the rows below.
    I've done that using the custom cell formats for the first B cell and then using =Bx+1 in the following cells.  It works, but I'm hoping to find something simpler or that can be copied and pasted in multiple rows on one paste.
    Thanks in advance.
    Suggestions much appreciated!
    Ted

    Ted,
    This expression in B will give you the pattern I believe you are looking for:
    =A&RIGHT("00"&ROW()-1, 3)
    Here's a screen shot...
    Jerry

  • 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

  • ** Please help urgently  ** Budget upload field with leading zeros

    We need to load a characteristic that has leading zeros.  For example 0000350.  When saving down to CSV, we lose the leading zeros (0000) so that only 350 is loaded into BW.  Saving the codes as 'text' in excel does not seem to help.
    We cannot therefore see the name for any of these codes when refreshing the workbook in BW.
    Could some please urgently tell us the correct method to save the file for loading into the BW infopackage, with all zeros intact ?
    Regards, Frederick

    Hi Frederick,
    Just some additional thoughts,
    assuming field A1 in Ecel contains 350 and you want to create a string with 8 digits, you could use formula '=text(A1;"00000000")' in an empty column and copy it back to column A. Then 00000350 should be provided in A1. This can be saved in a normal .csv file and be opened with a text editor (e.g. notepad) in order to check content.
    If you don't want to manipulate Excel data, transformation to a field with leading zeros can be easily be processed with a routine in transfer rules.
    Regards
    Joe

  • EBS check number with leading zeros

    When we upload EBS, we are getting the check number in the record 16 (reference field). But unlike the check number posted in SAP, the check number in the BAI file has 2 leading zeros. Now since check number is coming in record 16, instead of record 88 we are not able to solve this problem through String configuration.
    So, we thought of following solutions(Options):
    1.    Modify the check lot numbers to have two leading zeros plus associated changes like the form and so on.
    2.    Modify the check number in the incoming file u2013 strip the check number with two leading zeros with the use of customer enhancement. (After upload and before posting)
    Can we solve the problem of leading zeros (before the check number) through any configuration steps instead of changing the SAP script form for check(Check lot) or going for customer enhancement.
    Thanks
    Ron

    You are correct, since the check numbers are coming through only in the 16 records and not in the 88 records, you cannot use a search string to resolve the issue with leading zeros.  Also, I do not know of any other configuration that can be used to reformat the reference values in the 16 records.
    The 2 solutions you have listed are both valid options.  Although with the first option (changing the check lots), you would need to make sure the business users approved of changing the check lots before going forward with that option.  And you would still have to manually clear checks that had been issued prior to the check lot change.
    At my company, we went with the second option - using ABAP code to update the check numbers from the file to match those in SAP (we actually had to add leading zeros to the check numbers).  In our case, we had already created a pre-processor program for other re-formatting of the file that was needed prior to loading it into SAP - so we added the check number logic to that.
    However, if you do not have a pre-processor program, I know there is a user exit available for EBS - exit EXIT_RFEBBU10_001, include ZXF01U01.  I have heard of others using this exit to update the check numbers from 16 records.  The exit is called during the FF.5 processing.
    Regards,
    Shannon

  • Generic counter with leading zeros

    Good evening everybody,
    I was searching the code of a generic counter with leading zeros, but I did not found anything over the Internet. Therefore, I code it all by myself.
    I give you the code, it will maybe helps someone.
    Only needed leading zeros are generated, which means the following sequences :
    0 - 1 - 2 - ... - 7 for a max of 7,or
    00 - 01 - 02 - ... - 23 - 24 - ... - 89 for a max of 89, or
    000 - 001 - 002 - ... - 432 for a max of 432.
    public class LeadingZerosCounter {
      public String[] counters = null;
      public LeadingZerosCounter(int maximum) {
        this.counters = new String[maximum];
      public String[] init() {
        int maxLeadingZeros = 1;
        int index0 = this.counters.length;
        while ((index0 /= 10) >= 10) {
          maxLeadingZeros += 1;
        int counter = 0;
        for (int index1 = 0; index1 < maxLeadingZeros + 1; index1++) {
          while (counter < java.lang.Math.pow(10, index1 + 1)) {
            String stringCounter = new String("");
            for(int index2 = 0; index2 < (maxLeadingZeros - index1); index2++) {
              stringCounter = stringCounter.concat("0");
            stringCounter = stringCounter.concat(new Integer(counter).toString());
            this.counters[counter] = stringCounter;
            System.out.println(this.counters[counter]);
            if (++counter == this.counters.length) {
              return(this.counters);
            else {
              // no action
        return(this.counters);
      public static void main(String[] args) {
        new LeadingZerosCounter(100).init();
    NOTE : the two return are mandatory.
    Try maximum raised to a power of 10 and maximum raised to a power of 10 + constant in [1; 9] to understand.
    If you find any solution to make it faster, please let me know.
    Have a nice day,
    Christophe

    I like Jos' idea better than mine (go figure - he's a better Javanista)....
    public class Counter {   
        private String pattern;
        private int count;
        private int max;
        public Counter(int max) throws IllegalArgumentException {
            if (max < 0) {
              throw new IllegalArgumentException("Max (" + max + ") must be a positive number");
            this.max = max;
            int len = String.valueOf(max).length();
            this.pattern = "%1$0" + len + "d";
        public boolean hasNext() {
            return count <= max;
        public String next() {
            String result = String.format(pattern, count);
            count++;
            return result;
        public static void main(String[] args) {
            // for demo purposes only;
            // replace with command-line arg parsing, if desired...
            String prefix = "picture_";
            String suffix = ".jpg";
            Counter c = new Counter(99);
            while (c.hasNext()) {
                System.out.println(prefix + c.next() + suffix);
            try {
                new Counter(-1);
            } catch (IllegalArgumentException e) {
                System.out.println("test: " + e.getMessage());
    }

  • Random numbers with leading zeros

    Hi,
    I want to generate random numbers with leading zeros.
    My code so far:
    import java.util.Random;
      Random r = new Random();
      int randInt = r.nextInt(100);My aimed output is something like:
    0012 or 0123 ...
    Thanks
    Jonny

    Hi,
    sorry for not getting it with NumberFormat. I used DecmailFormat instead:
    DecimalFormat df = new DecimalFormat("0000");
    df.setMinimumIntegerDigits(4);
    df.format(r.nextInt(40)));This gave me the right output, like 0013 or 0123 ...
    Thanks
    Jonny

  • ABAP-based web service returns numeric values with leading zeros

    Hi SOA experts,
    I have created a web service out of an ABAP function module. Beside other values, this service returns a list of document numbers. All of these numeric values are returned by the web service with leading zeros, but we do want these values w/o leading zeros.
    Any ideas how I can tell the web service to not print any leading zeros?
    Thanks in advance for your help!
    Kind regards, Matthias
    PS: The according function module does not print any leading zeros for the numeric values

    hi,
    just a guess: I'd try to use I instead of NUMC for the document numbers.
    NUMC is no number but a character string with numeric characters only. only some display routines in SAP know that this string of numerals represents a number and omit leading zeroes.
    my 2 cents,
    anton

  • Download records to EXCEL file with  Leading Zero's for numbers

    Hi All,
    I am able to download the data to EXCEL file on the presentation server.
    There are few fields (Plant,SalesOrder Number ..with Leading Zero's) in the record.
    These values are downloaded with out Leading Zero's to excel( EX: 0000004122 as 4122).
    Please help me to download the data to EXCEL file with leading zero's.
    Thanks and Regards,
    KC

    >
    Krishna Chaitanya  G wrote:
    > The excel file which is to be downloaded..will be used by some other program..to upload the values to the sap.
    > It matters there....
    > KC
    HI KC,
    then no need to download the zeros,
    after uploading, loop at that uploaded internal table and use CONVERSION_EXIT_APLHA_INPUT and pass the vbeln(without zeros) to this FM, it will return the value with added zeros.
    hope this solves your query
    a small example
    Loop at itab into is.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = is-vbeln "(  this is without zeros)
    IMPORTING
    OUTPUT = is-vbeln. "( this is with leading zeros)
    modify itab from is.
    endloop.
    Edited by: Soumyaprakash Mishra on Oct 6, 2009 2:16 AM

  • SD Document flow with Leading zeros

    Hi All,
    We have issue with docuemnt flow, when we click document flow sales order or delivery or billing its showing leading zeros, My client  don't want any leading zeros in docuemnt flow.
    For example -
    if i click on document flow its showing - 00500005 (SO ) 008000674 -Delivery - - Billing - 0090000012,
    Can any other guide us what could be a issue with leading zeros or any config setting is missing.
    Regards
    Nishad

    dear friend,
    it depends on how do you set up the number ranges
    for example, run VN01 and look how your sales orders are numbered.
    regards,
    p.s. create a new number range without leading zeroes and test it
    but i suggest you will not change the current settings , it is 'too late' , so tell your client it is standard

  • How can I format a number with leading zeros?

    I need to convert an int to occupy exactly 3 positions in a StringBuffer... I need the space in the StringBuffer to be filled with leading zeros where appropriate. Can anyone show me how to do this correctly please ?
    At the moment I am using a pretty dumb workaround to fill the target with "000" first and then parse the int into either 1 2 or 3 positions depending on its value ... it works, but there must be a more correct way to do this ...
    Thanks in advance ...

    Have you had a look at the class java.text.DecimalFormat? It does exactly what you want... example:
    StringBuffer sb = new StringBuffer();
    DecimalFormat format = new DecimalFormat("000");
    format.format(2, sb, new FieldPosition(0));
    System.out.println(sb);
    prints out the string 002.

  • BPC 7.5 NW: Master Data with leading zeros

    In BPC 7.5 NW, is it still an issue to have Master data with leading zeros?
    In other words, is it still not advisable to have leading zeros in the Master data.
    Let me know your views.
    Thanks.

    I was also having the same issue almost in the same version.
    Other than what you mentioned, the master data was also jumbling up like 0120, 0130, 0145, were set up as 120, 145, 130....
    The workaround that we took was to put a leading alphabet, when the data comes into BPC.
    Try doing that, it will surely help.
    Hope this helps.
    Thanks.
    Anand

Maybe you are looking for

  • Why does some images saved on memory card show up as a little icon with lightning bolt through it

    I been saving images on memory card.. well as of lately some images have a icon with a lightening bolt on it..and images are lost

  • Distribution cycles

    Dear co experts, I have 32 sendor cost centers and i have 2 recivers cost centers In this is two recivers i have allocate the cost 80% to one cost centers and 20% to another cost cenetrs. In this scenario how to create the distribution cycles.i mean

  • AS3 & XML file reading in

    Is there a need to read a XMl file into an array or can you load an XML file and then call the information when its needed. EX.  I have an xml file that I want to load in and then when the user clicks on a button they information that is requeted loa

  • Why am I losing free space on my mac?

    I'm currently down to 143.4MB of available space, my capacity is 499.76GB.  I freed up some space by getting rid of some picture and files I don't need so i then had 4.32GB but then an apple tech told me to unload everything in my caches which I did

  • Error 0210 Stuck Key 28

    Hi get nearly everytime this error and if he is getting to linux it is writing strange question marks (not the usual question mark) into the terminal window and the mouse pointer is not usual, I can just move windows with it What can I do Best Firebe