Prefixed zeros in XL download

Hi All,
    I have an itab with following data.
column
000001
000002
000003
000004
000005
I download this file using FM 'GUI_DOWNLOAD' as an .xls file.
but when i open this file in excel, the column data dosent contain prefixed zeros. i want the data to be downloaded with prefixed zeros.
Thank You All,
sal.

hi,
Download in 'DBF fomrat ..'
CALL FUNCTION 'GUI_DOWNLOAD'*
filetype                = 'ASC'  "----
> change file type to 'DBF'
or
you have to  download the value in character format with preceding single qoute .
for example -
if you are downloading 000010 means, assign that value as '000010.
So that, excel can treat it as character & the zeros will be retained.
either after download the excel do the change of properties of excel.
              or
by giving itab-column = '00001. it will solve the problem but that symbol " ' " also appears.
regards
rahul

Similar Messages

  • Prefix zero to a decimal number

    Hi All,
    I need to send a value to third party system. The value is a decimal number but before sending it i need to prefix zero.
    Eg: 1.25---> 00000000001.25
    The Functiom module CONVERSION_EXIT_ALPHA_INPUT works only for integers.
    Can you please suggest a function module which wil satisfy my requirement.
    Thanks
    Rohit

    Use a For loop to index into the array, then use the Not Equal To Zero comparison to convert it to true/false. Then Index out of the For and use the Bool Array to Int from the boolean pallete.
    Here is an example in 8.2
    Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
    using LV 2010 SP 1, Windows 7
    Attachments:
    Convert Bit Array to Int.vi ‏8 KB

  • How to add prefix zero to all matnr fields in itab

    Hi,
      I ve a internal table with following fields
      Matnr                                                  bwkey                            
      6                                                        678                                 
      67                                                      rty     
      678                                                    78k                                
      How to add prefix zero to all tha matnr fields.
      like
    matnr                                     bwkey
    00000000000000006                678
    00000000000000067                rty
    00000000000000678                78k
    Thanks in advance

    Hi,
    commonly used conversion routine is ALPHA.
    It is conversion used to insert leading zero for document number.
    For example, in sales order (VBAK-VBELN length 10),
    when we key in order no, for example we key in '4302',
    conversion routine input will automatically add leading zero,
    so it will become '0000004302', this is real value stored in table VBAK.
    On conversion routine output, it will delete leading zero
    function CONVERSION_EXIT_ALPHA_INPUT, this will add leading zeros to a character based field of any length.
    Ex:
    data: lv_c(10) type c value '123'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                      input = lv_c
              importing
                     output = lv_c.
    write:/ lv_c.
    Regards.

  • Prefix zero to alphanumeric characters

    Hi All,
        Can anyone suggest me any Function module is there to prefix zero to an alphanumeric charcter. I have been trying conversion_exit_alpha_input FM for this purpose but it works fine only for numerics. plaese let me know any FM exists for alphanumeric characters which serves the purpose.
    Thanks in Advance
    Rijish

    Hi,
    You can use the below code.
    report abc.
    data: v_size1(2) type n,
          v_size2(2) type n.
    constants: c_zeroes(18) type c value '000000000000000000'.
    parameters: p1(18) type c.
    shift p1 left deleting leading space.
    v_size1 = strlen( p1 ).
    if v_size1 lt 18.
    v_size2 = 18 - v_size1.
    shift p1 right deleting trailing space.
    p1+0(v_size2) = c_zeroes.
    endif.
    write p1.
    Also, note that the v_size2 is to be calculated as per your requirement.

  • Truncate prefixed zeros

    Hi ALL,
    We have one masterdata info object length is 15 char, our source field is 40 char length, the data is getting from source is
    0000000000000000001234567890,  the issue is we are getting all Zero in our BI with that master data.
    I want to trancate the prefix zeros load only remaining values.
    I want to write a code in master data transformation, please provider the code for this issue.
    Many thanks,
    Manu.

    Hi Manu,
    There are many ways
    RESULT = SOURCE_FIELDS-0Material.
        shift  RESULT left deleting leading ' 0' .
    Rgds
    SVU123
    Edited by: svu123 on Aug 9, 2010 11:33 AM

  • Preserving prefixed zeros  in down load to excel file

    In My application lot of character field have character zero as the starting characters. Like Company code= 0600, Property= 00390898 .
      When I do a download from Internal table to excel sheet, this character fields are showing with the zeros in front like 600 & 390898. Is there any way preserve the zeros in the excel sheet ?
      Also I would Like to know How can I move the character ( '  ) . If I used ''' then it gives compile error.
        If I can prefix this character ( ' ) , the field's will be shown with the zeros.
    Thanks for your help.
    Manoranjan

    Hi Manoranjan,
    What is the data type you are using for the Company Code in your internal table?
    You can try this way.Suppose your main internal table is itab1 where in the company code is refering the database table (T001-BUKRS).
    Declare one more internal table itab2 with company code as Character data type.
    Before downloading to excel move itab1 to itab2 and then try to use that itab2 for downloading. Now your excel sheet will have the numbers with zeros preceeding.
    Another option is after downloading to excel, I think you can change the properties of the column through Format Cells->Number tab->Text.
    Thanks,
    Srinivas

  • Leading zeros from data downloads

    Hello!
    While downloading data from the ABAP tables, Excel removes the leading zeros automatically but in some SAP tables (NAST for example), those leading zeros are necessary to find the required associated data. Is there any way to prevent Excel from removing these zeros?
    Thanks a lot!

    Hi,
    There are two ways to solve it.
    1) select complete columns in the Excel sheet and then assign the number format as ' TEXT ' in the sheet.Then u ll be able to see the leading zero's
    2) If u donot want to wrk in Excel the way i have mentioned,then in the abap program just use the FM
    "CONVERSION_EXIT_ALPHA_INPUT" over that field before uploading in  a table.
    By mistake i have told u the wrong way.the first way is for copying the data from text file to excel file and preserving the leading zeros.
    regards
    kanishak
    Edited by: Kanishak Gupta on May 6, 2009 5:36 AM

  • Leading zeros deleted while downloading to excel sheet

    Hi ,
    i am downloading data to excel sheet  from internal table, iam using gui_download but its deletin leading zeros can any one tell me as to how i go about this
    for ex i ahve a mterial no : 00123
    i see 123 i want it to be 00123
    Thanks
    kajol

    Hi,
      try to explain to excel, that this field is character field (I think that it will be done by adding single quote as first character of string).
    Pointing to my previous answer try:
    Constants: c_single_quote(1) type c value ''''.   " I _hope_ it works
    loop at itab.
    concatenate c_single_quote itab-matnr to texttab-c_matnr.
    endloop.

  • Loosing prefixed zeros in byte to hexa conversion

    hi,
    i am using:
    Integer.toHexString(byte & 0xff) to convert from byte to hexadecimal.
    if the byte has zeros prefixed , they are being lost.
    ie. if the byte is 02 i get only 2. but i need the 02 as a whole.
    how can i correct this.
    10q.

    Don't create new threads with the same question:
    http://forum.java.sun.com/thread.jspa?threadID=601733

  • Prefixing zero before a number

    Hi all
    i have a variable whose length shud be 9 always and sometimes it can be less than 9. To make it 9 always I'll be adding some zeros to it. Is there any method in java which adds 0's before a number?
    Reagards
    LaV

    LaVz wrote:
    Hi all
    i have a variable whose length shud be 9 always and sometimes it can be less than 9. To make it 9 always I'll be adding some zeros to it. Is there any method in java which adds 0's before a number?
    Reagards
    LaVcheck out the Formatter class
    http://java.sun.com/javase/6/docs/api/java/util/Formatter.html

  • Ask to downloada pdf: download progress zero, close, cancel download, re-open ff download finishes!

    This was happening before FF 36.01 and also displayed garbaged fonts etc. in viewed pdfs
    Now have set all pdf's to use Adobe Reader 9.5 and display is OK.
    But the download progress bar does not move from 0.
    When I quit FF it says that this will stop download: OK this. No file in directory
    Immediately re-start FF and look at download progress: rapidly moves to finish
    File now in folder !!!

    Although Vista is SP2, I'm way behind on updates (I know !!, but I prefer not to upset a working PC having had bad problems in the past).
    Neither of these KB's is installed and the problem only appeared a few weeks ago, not sure when, since I rarely download pdf's.
    Since switching all application options named 'Adobe Acrobat...' to 'Use Adobe Reader 9.5' the font problem has disappeared, but the odd download behaviour remains.
    I find it puzzling that the download continues on reopening Firefox despite having clicked OK on 'This will cancel download' when exiting the previous session.

  • Cost center creation prefix with 0000000(zeros)

    Hi All
    Is there any way to creat cost center prefix with 0000(Zeros).I have created cost center called 0000012345 and when i saved this data 0000 were discapperd.Is there any way to create cost center with prefix Zeros(0000000)

    Hi Praneeth
    Thanks for your reply, i agree with you, but once i have done with above step which is explained from your screen, and i pressed enter,by defeault 0000 got disappered.Please see below screens
    Screen 1:
    Scree 2

  • WS_DOWNLOAD..zero getting suppressed

    I am facing a problem.
    While extracting data from SAP system (Version 3.1I) and downloading to Excel file using function module WS_DOWNLOAD, the leading zeros are suppressed in numeric field.
    But I need to have the leading zeros also in excel file.
    If anybody has solution to this problem, please revert back at the earliest

    actually leading zeroes will be downloaded.but that is the concern with EXCEL. By default, EXCEL will not show any leading zeros for the values in the CELL.
    if you open the file in NOTEPAD or any other word document file, you can see the LEADING ZEROS as well.
    Regards
    srikanth

  • External number Range with leading zeros for Handling Units

    Hi Experts
        My requirement is to use the External number for the Handling Units provided by vendor.That number starts with 2digits"00"+18  for Example:00123456789123456789
      I am Using HU_VEKP Object for no range and maintaining
    External No Range From 00000000000900000000 to 00000000000999999999.
    But When i am giving Number 00000000000900000001 its only taking
    900000001.
    Kindly suggest me the right way to take leading zeros.
    Rewards for answer sure if it works.
    rajesh

    Hi Laksmipathi
                          I am maintaining the number range for External number range coz its vendor supplied HU.
               But the prefix zeros has meaning for identifying the Handling unit Functionality.In realtime IF prefix contains Say "0000" it refers to carton
    If prefix contains say "0010" it refers to pallet.
               So i need to satisfy there requirement.For example If it is for material number we can maintain In OMSL by check box of leading zeros.
                But i am not able to find any setting for this Handling units.U can check this object HU_VEKP in SNRO tcode where i am maintaining Number range.
    Thanks give suggestion
    RajeshS

  • How to keep leading zeros using SAP_CONVERT_TO_XLS_FORMAT

    my leading zeros  drop when download using FM-SAP_CONVERT_TO_XLS_FORMAT, how to fix it?

    Hi,
    You can try as below.
    Let's for the 10 digit numeric field, using the function module CONVERSION_EXIT_ALPHA_INPUT, you can get the 10 digit number with leading zeroes.
    Now if you declare the char of 10 in length field in the internal table will be replaced with the above value.
    Now it will be downloaded as required.
    Regards,
    Nishant Malhotra

Maybe you are looking for

  • HT201210 Restore issues iphone 3G

    Hello I followed the advice of this article http://support.apple.com/kb/HT1808 and I managed to restore my iphone via iTunes without an error. Once the restore was done the apply logo came on the screen, some progress bars appeared and then nothing,

  • Exe. error when I try to run itunes

    I have an older laptop (about 1999) and a brand new ipod nano. I went through all the steps of loading the itunes software and everything seems to be fine until I click on the itunes icon. It pauses for a few seconds then tells me it has an error in

  • AIR App: Get version number at runtime

    Hello, How how can I get the version number for an AIR App during runtime please? Thank you.

  • 80g iPod Classic freezing during sync

    I'm having a very strange problem with my iPod. I tried to sync it yesterday, but itunes said there was a corrupted file on it, and that it needed to be restored. I allowed that, and the restore went through. As itunes began to put my songs back on t

  • Troubleshooting: Scroll bar goes to the right in LR2.3

    Not sure why this happens, but every so often - maybe once every couple days, I will be working in either the Library or Develop module and for no apparent reason, the scrollbar for the bottom filmstrip just starts moving on its own accord to the rig