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

Similar Messages

  • Sequence with leading zeros

    Hi,
    I have a column SRL_NUM with datatype varchar2(4 char).I have 3000 records in this table and want to make SRL_NUM like 0001,0002,0003 etc.It should increment but entire 4 characters should be filled.How do i do this?
    Thanks.

    user10698496 wrote:
    I have a column SRL_NUM with datatype varchar2(4 char).I have 3000 records in this table and want to make SRL_NUM like 0001,0002,0003 etc.It should increment but entire 4 characters should be filled.How do i do this?Why is the sequence a varchar2 and not a number?
    IMO it makes more sense to use a native number data type as that is what a sequence generator outputs - and then render that as a text string with leading zero as "+how it looks like+" is a presentation layer issue.
    I would not use a numeric sequence generator to generate unique strings as surrogate key values. There are inherent problems with mixing data types like that.

  • 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

  • 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

  • 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

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

  • Exporting Numbers file with leading zeros as csv file

    When I export a list of mobile phone numbers with leading zeros (086* etc.) from Numbers as a csv file, the leading zeros are stripped out, although the cells are previously formatted as text. What can I do about this?

    "When I export a list of mobile phone numbers with leading zeros (086* etc.) from Numbers as a csv file, the leading zeros are stripped out, although the cells are previously formatted as text. What can I do about this?"
    Well, the first thing you could do would be to post your question in one of the forums for Numbers.
    Click Discussions to get to the Discussions index page, then the section for the version of iWork you're using, then the Numbers forum in that section.
    In AppleWorks (which doesn't offer an opportunity to Save as or Export as csv) I'd force the application to see the phone numbers as text by inserting some non-numeric characters into the string of digits.
    Examples: 000-123-4567, 000 123 4567
    It may also be a function of the application you are using to open the csv file.
    When I did a brief test of the suggestion above with Numbers '09, I got this result on opening the file in Text Edit:
    ,1234567890,num
    ,123-456-7890,tex
    ,0123456789,num
    ,012-345-6789,tex
    ,0001234567,num
    ,000-123-4567,tex
    Note that both the examples entered as a string of digits only (num) and those entered with inserted hyphens (tex) kept the leading zeroes. Cell format for the column containing the phone numbers was set to Text.
    Regards,
    Barry

  • 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

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

  • Padding a julian date with leading zeros ?

    Hi,
    I have gernerated a julian date, which I am appending to another two digit number to create a five digit serial number.
    Is there a simple way to pad the first 99 days with leading zeros ( i.e. 001, 002....025...099) so that I maintain a five digit serial number ?
    I am using   Get Date In Time/Seconds > Number To Decimal String > Unbundle >Number to Decimal String.
    Thank you in advance for any advice,
    Alan

    Here's the simplest way to do it (with he 2 digit number), I believe:
    Message Edited by Matthew Kelton on 02-21-2008 12:43 AM
    Attachments:
    Julian1.png ‏3 KB
    Julian2.png ‏2 KB

  • 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

  • Padding a value with leading zeros

    Hi
    I am trying to create a filename (String) using a sequence int. I need this int to be 6 digits, with leading zeros
    i.e. if my seqence number is 23 my filename (String) should be:
    FILE000023
    Obviously I can do this by creating my own method that iterates through the number, but I was wondering if there was a simple method to change an int to a String and pad it out with leading zeros.
    Thanks
    Neil.

    import java.text.*;
    public class DecimalFormatTesting {
         public static void main( String[] args ) {
              DecimalFormat format = new DecimalFormat("###.###");
              format.setMinimumIntegerDigits( 6 );
              String integ = format.format( 123 );
              System.out.println("str: " + integ);
         } // end of main()
    }hope this helps
    partha

  • Re: Material number with leading zeros (40 char long)

    Hello Experts,
    I am working on SAP ME 6.1.4.15.
    I am having a problem with the material number appearing in production order / planned order request document in MEINT and failing there since the material it is looking for is with leading zeros (for example 1291 appearing as 0000000000000000000000000000000000001291) - a total of 40 char long.
    But this material exists in ME as 1291 only. Can any one throw any light on this as to what could be the reason and how to solve it?
    Thanks
    Srinivas

    Dear Srinivas,
    SAP Note 1799009 - 'Presence of leading zeros is inconsistent over IDOC thus SAP MEINT cannot handle all inbound IDOC consistently' should help to resolve the problem.
    Regards,
    Alex.

Maybe you are looking for

  • High memory usage problem

    Firefox regularly creeps up to about 350 mb of memory usage. It runs poorly, crashes, etc. I read some other posts about how to reduce the its memory usage via about:config tweaks. I made adjustments to browser.cache.disk.capacity (was set to over 1,

  • Just need Mavericks base installer to upgrade from Mountain Lion. Company hasn't approved Yosemite (3 weeks).

    A month ago, I could have just downloaded the upgrade for Mt. Lion to Mavericks. Now, I can't find it.  All there seems to be is 10.9. to 10.9.10 updates, no base Mavericks.  All other update requests, questions, and queries at the Apple Store and iT

  • Java Access Helper Jar file problem

    I just downloaded Java Access Helper zip file, and unzipped, and run the following command in UNIX % java -jar jaccesshelper.jar -install I get the following error message, and the installation stopped. Exception in thread "main" java.lang.NumberForm

  • HP 4625 - scanning using doc feeder - a bit misaligned

    my problem is whenever i scan using the the doc feeder, the result is a bit misaligned, just a bit but it really annoys me, please please help, using the flatbed is ok can i adjust it myself?? any manual on how to do this?? my only conclusion is that

  • Partial read-only view object. How to make it work?

    Hello, is there a way to have a "partial" read-only view object, where some attributes are based on an EO and some others are extracted directly from a table with no corresponding EO? On this view-object it should be possible to perform row insertion