New FM for Old FM 'WS_EXCEL'

Hi All,
I am working on Upgrade Project
(From 4.6B to ECC6.0).
I have come across a FM <b>"WS_EXCEL"</b> in Old Version.Can anybody give me the name of
the function module which replaces the above
function Module in ECC6.0.
Thanks in Advance.
With Regards
Jitendra.

Hi Jithendra,
YOu can use the GUI_DOWNLOAD function module.
Once you have the data in the internal table, you can either display it as a report or download it to the excel sheet
If you only want to transfer the data to Excel like when you transfer the data from
ALV to Excel simply use the Function Modules:
XXL_SIMPLE_API
If you want more modifications when you transfer it to Excel use:
XXL_FULL_API
Often we face situations where we need to download internal table contents onto an Excel sheet. We are familiar with the function module WS_DOWNLOAD. Though this function module downloads the contents onto the Excel sheet, there cannot be any column headings or we cannot differentiate the primary keys just by seeing the Excel sheet.
For this purpose, we can use the function module XXL_FULL_API. The Excel sheet which is generated by this function module contains the column headings and the key columns are highlighted with a different color. Other options that are available with this function module are we can swap two columns or supress a field from displaying on the Excel sheet. The simple code for the usage of this function module is given below.
Program code : Run this code
REPORT Excel.
TABLES:
sflight.
header data................................
DATA :
header1 LIKE gxxlt_p-text VALUE 'Suresh',
header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
Internal table for holding the SFLIGHT data
DATA BEGIN OF t_sflight OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA END OF t_sflight.
Internal table for holding the horizontal key.
DATA BEGIN OF t_hkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_h.
DATA END OF t_hkey .
Internal table for holding the vertical key.
DATA BEGIN OF t_vkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_v.
DATA END OF t_vkey .
Internal table for holding the online text....
DATA BEGIN OF t_online OCCURS 0.
INCLUDE STRUCTURE gxxlt_o.
DATA END OF t_online.
Internal table to hold print text.............
DATA BEGIN OF t_print OCCURS 0.
INCLUDE STRUCTURE gxxlt_p.
DATA END OF t_print.
Internal table to hold SEMA data..............
DATA BEGIN OF t_sema OCCURS 0.
INCLUDE STRUCTURE gxxlt_s.
DATA END OF t_sema.
Retreiving data from sflight.
SELECT * FROM sflight
INTO TABLE t_sflight.
Text which will be displayed online is declared here....
t_online-line_no = '1'.
t_online-info_name = 'Created by'.
t_online-info_value = 'KOTHUR SREEKANTH REDDY'.
APPEND t_online.
Text which will be printed out..........................
t_print-hf = 'H'.
t_print-lcr = 'L'.
t_print-line_no = '1'.
t_print-text = 'This is the header'.
APPEND t_print.
t_print-hf = 'F'.
t_print-lcr = 'C'.
t_print-line_no = '1'.
t_print-text = 'This is the footer'.
APPEND t_print.
Defining the vertical key columns.......
t_vkey-col_no = '1'.
t_vkey-col_name = 'MANDT'.
APPEND t_vkey.
t_vkey-col_no = '2'.
t_vkey-col_name = 'CARRID'.
APPEND t_vkey.
t_vkey-col_no = '3'.
t_vkey-col_name = 'CONNID'.
APPEND t_vkey.
t_vkey-col_no = '4'.
t_vkey-col_name = 'FLDATE'.
APPEND t_vkey.
Header text for the data columns................
t_hkey-row_no = '1'.
t_hkey-col_no = 1.
t_hkey-col_name = 'PRICE'.
APPEND t_hkey.
t_hkey-col_no = 2.
t_hkey-col_name = 'CURRENCY'.
APPEND t_hkey.
t_hkey-col_no = 3.
t_hkey-col_name = 'PLANETYPE'.
APPEND t_hkey.
t_hkey-col_no = 4.
t_hkey-col_name = 'SEATSMAX'.
APPEND t_hkey.
t_hkey-col_no = 5.
t_hkey-col_name = 'SEATSOCC'.
APPEND t_hkey.
t_hkey-col_no = 6.
t_hkey-col_name = 'PAYMENTSUM'.
APPEND t_hkey.
populating the SEMA data..........................
t_sema-col_no = 1.
t_sema-col_typ = 'STR'.
t_sema-col_ops = 'DFT'.
APPEND t_sema.
t_sema-col_no = 2.
APPEND t_sema.
t_sema-col_no = 3.
APPEND t_sema.
t_sema-col_no = 4.
APPEND t_sema.
t_sema-col_no = 5.
APPEND t_sema.
t_sema-col_no = 6.
APPEND t_sema.
t_sema-col_no = 7.
APPEND t_sema.
t_sema-col_no = 8.
APPEND t_sema.
t_sema-col_no = 9.
APPEND t_sema.
t_sema-col_no = 10.
t_sema-col_typ = 'NUM'.
t_sema-col_ops = 'ADD'.
APPEND t_sema.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
DATA_ENDING_AT = 54
DATA_STARTING_AT = 5
filename = 'TESTFILE'
header_1 = header1
header_2 = header2
no_dialog = 'X'
no_start = ' '
n_att_cols = 6
n_hrz_keys = 1
n_vrt_keys = 4
sema_type = 'X'
SO_TITLE = ' '
TABLES
data = t_sflight
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
regsrds
navjot
reward if helpful
You can use this method to download the contents of an internal table to an excel file.
It is a static method of the class cl_gui_frontend_services. So you dont need an instance to call it.
Just make sure the file name has an extension .xls
call method cl_gui_frontend_services=>gui_download
exporting
filename = gv_file_name
filetype = lv_file_type
confirm_overwrite = space
changing
data_tab = <fs_download>
exceptions
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
others = 24.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Hope this helps you.
Thanks & Regards
Bhaskar Rao.M

Similar Messages

  • New camera for old iPhoto

    We've been intending to buy a new camera for a bit, nothing fancy, just something a bit better than our now antique Canon (PowerShot A10) (yes, really!) and that can shoot some brief video. Just as I was about to buy, I wondered whether all the new cameras were in fact compatible with iPhoto 6. Of course, all of the links to the "compatible cameras" pages within the iPhoto6 help app are broken (indeed, why would Apple keep updating them at this point?).
    Then I am just learning about RAW format, because of course with our ancient camera I have no idea what it is. I suppose we should choose a camera from this list to get full capabilities from it, which does rule out a number we had looked at.
    I just discovered that they offer the new iPhoto as a standalone in the App store, and maybe it's worth the measly $15 for it.

    Thanks -- as I looked into RAW, I realized it was far beyond our needs (and the cameras that do take RAW format pictures far beyond our price range).
    So any camera, even a new model, would be fine, huh? I think I was fooled by googling up old web pages when this was not yet the case; and it doesn't help that the iPhoto 6 help app has a (non-working) link to a (no longer applicable) list of "compatible cameras."
    Thanks again.
    Message was edited by: begemot2

  • New case for old model macbook pro 15inch.

    I live in the UK and I'm having trouble sourcing a new cover for my 15" macbook pro. It's the old model with the silver keys. I would really appreciate any information at all regarding where I can find a new case. I'm looking for a protective one that fits it perfectly.  I'm desperate! Thank you! Dan

    If you are looking for a hard shell that might be a problem but if you just want a sleeve, then as long as the sleeve is made for a 15 inch MBP, you won't have problems...
    Take a look here:
    http://www.goincase.com/products/category/15%22+MacBook+Pro

  • New printer for old computer

    My HP laserjet printer model 4L broke yesterday. Need a new printer for an old computer. It's an HP Brio using windows 2000 (built on NT technology) - whatever that means. A plastic part broke on the printer cover that affected it's printing capability. Thanks for any input.

    Hi Gwen,
    There is a way you can tell whether a new printer will be supported on your Windows 2000.
    As an example, I have included the information for the HP Deskjet 3520 (not the ePrint version of the printer).
    This is an inexpensive printer that one can still buy, and the printer supports the Full Feature Software (full driver set) for Windows 2000.
    HP Deskjet 3520 Inkjet Printer Drivers - Windows 2000
    What You Can Do:
    Find a printer that you want to buy
    Open the Support and Drivers Page:  HP Drivers & Downloads
    Enter the name of the printer in the box under "Find by Product"
    Look for your Operating System in the drop down menu under "Select your operating system"
    Click "Next" and Scroll down
    Look under "Driver - Product Installation Software"
    You are looking for the "Full Feature Software" installation package.
    The Full Feature Software package provides the full printing capabilities.
    If you do Not find the Full Feature Software, then the printer you have selected will NOT be fully supported by your Operating System.  "Basic Driver" is not enough -- you need the Full Feature Software or your printer might not be able to do everything -- for example, it may not be able to "scan".
    Go through this exercise until you find a Printer model that is supported for your Operating System AND provides the Full Feature Software.
    You might also look under the Manuals section to pick up any details about the printer's operation - whether the printer supports wireless, and under what circumstances it works (or does not).
    Good Luck!
    Click the Kudos Star! 
    It is a great “Thank You” for the Author's efforts.
    Kind Regards,
    Dragon-Fur

  • New life for old iMac

    My Dad still uses his circa 1998 iMac Rev. D tray loader, since I've kept it alive and up to date by replacing its dead CD-ROM drive from one I bought on eBay, installing more memory (256 MB I think), and OS updates through Panther. He's a cheapskate like me and doesn't want to shell out $1000 for a new iMac. However, lately he's complained this dinosaur was starting to run slow, no surprise since even with a minimal installation of X a few music files and emailed videos left him with less than 400 MB free space on the HD, causing multiple instances of "your startup disk is almost full" messages. Remember this computer shipped with a gargantuan 32 MB memory and a whopping 6 GB hard disk. It ran the latest incarnation of Apple's OS which was OS 8.5. No Firewire on this baby either, so expansion options are limited.
    I reasoned I could remove its diminutive 6 GB HD and install the 30 GB HD I pulled from my iMac DV SE some time ago, giving the old iMac some room to breathe. But how to preserve the contents of the hard disk without having to reinstall his programs, files, etc?
    Here's how I did it:
    Remember there's no Firewire on the Rev. D so there's no way to connect a bootable external hard disk to it. I do have an iPod which has both Firewire and USB cables though. So I connected my 6 GB iPod Mini to the Rev D iMac's USB port, checked "manually manage music" and "enable disk use". Deleted all music files.
    Ran Carbon Copy Cloner and cloned the iMac's disk to the iPod (this took a couple of hours over USB). Set the Rev. D aside.
    Opened the DV SE and removed its 120 GB HD. Information from this web site was most useful. Installed its original 30 GB. Booted it from my Panther disk and partitioned the HD to contain one 7.9 GB partition and the balance in another. Installed Panther on both partitions. Booted the DV SE to ensure the Panther installation went OK. No problems.
    Just for kicks, I set the startup disk to the iPod over Firewire and booted the DV SE from it. Lo and behold it works! there was the old iMac Rev D's old self displayed on my DV SE. Who would think you could use an iPod as a boot disk? Everything worked like it did on Dad's old machine. Weird!
    Selected the startup disk to the larger partition of the 30 GB internal HD and booted it. Ran Carbon Copy Cloner to clone the iPod to the smaller partition. This went a little faster since it's now over Firewire. Selected the startup disk back to the smaller partition of the 30 GB HD.
    Removed the 30 GB HD and reinstalled the 120 GB in the DV SE. Made sure the the DV SE still works then set it aside.
    Opened the iMac Rev. D and removed its pathetically diminutive 6 GB HD. Installed the 30 GB. Closed it up and it attempted to boot. It wouldn't work and got hung on a blue screen. Hmm.
    I booted from a Panther disk. I went to reset the user password, but quickly determined there were no users installed on the boot partition. None. Obviously this would present a problem. Apparently it wasn't a good idea to install Panther on the larger partition using an identical user name and password - I think this confused Panther which deleted the account from the boot partition. If I had to do it over again, I would have set up a temporary account so I could boot from the larger partition and use CCC to restore the smaller partition. Anyway, no immediate solution came to mind, so I did an archive and install, preserving user settings and all that.
    Oddly enough the only "user" was the system administrator. Fortunately, the system administrator had all the same user settings and files that my Dad had so I simply renamed the home folder, set the login name and password accordingly, and that was that.
    For some reason Safari didn't work. Safari would launch, but no window displayed and clicking on the menus did nothing. I could only select "quit" from the Dock. I checked my permissions, trashed the prefs file, everything I could think of, but nothing helped. In desperation I downloaded and installed Safari from Apple's web site (using Firefox which was already installed and fortunately still worked). Amazingly, the same thing happened again. No menus would work. Finally, about to give up, I extracted an older version of Safari from the Panther install disks using Pacifist. That worked! I have no idea what caused this bizarre problem.
    Now, back to the reason I started this to begin with. The boot partition is limited to 8 GB which is better than the 6 GB it used to be, but there is only a little more than 2 GB free now. There is another 20 GB on the remaining partition, but how to use it? As I understand it, you can use Netinfo Manager to map the user's "home" directory to another volume. I haven't tried that yet, but when the boot partition nears capacity, I'll give that a shot. I'm not looking forward to the permissions nightmare that may result.
    So, success for now. The machine runs like new, sure it's a little slow but he's not running Photoshop or anything. That fan makes a racket – how spoiled we've become.
    There was probably an easier way to do all this, but hey, it worked.
    By the way my DV SE runs OS X 10.4.9 flawlessly with a new 120 GB HD and 384 MB memory. I have no plans to retire it any time soon.
    PB Ti 1 GHz  PB 17 1.33 GHz  iMac DV SE  iMac D  iPod mini    Mac OS X (10.4.9)    Legacy (Appletalk) networked printers  22 years Apple!

    Thank you Robert; that's helpful.
    The way to map a user's entire Home folder to another volume is simple: In Netinfo Manager, select the desired user, then change his "home" property to the path where you want the new home folder to be. Theoretically this could be any volume anywhere. You can then completely delete the original home folder.
    I tried this with a test account and it seems to work ok, I just had one problem with a haxie (cleardock). It won't load its system preference. Don't know if it's related to moving the home folder or not. In any event, I'd do lots of testing before making this change permanent.

  • Create new folders for old messages on my computer

    How do I create new folders in my computer to archive old messages and save them to my computer.

    Do you mean in Mail or the Finder? In Mail simply click on the [+] button at the bottom left of the folders fist. Select New Folder. In the dialog select where you want the folder located and the name for it.
    In the Finder navigate to where you want to create the folder then press SHIFT-COMMAND-N to create a new "untitled" folder.

  • New use for old imac

    I'm considering an upgrade for my iMac G5 (1.6 GHz PPC) to a newer Core 2 Duo, and am wondering if there's some use for the old iMac besides door stop? Specifically, is there a way that I can use the old machine for backup? It has a newer hard drive. Thoughts appreciated.

    You can use it as a monitor for your new mac using an app called ScreenRecycler, or take it apart, throw in a big HD and like the other poster said, use it as a type of home server, or you can sell it, or you can donate it to a company that will refurbish it and send it off to less-fortunate families, or you can make a big shrapnel bomb, or you can.... well you get the idea. I would suggest using it for the monitor though

  • How can I make Firefox remember new passwords for old accounts?

    I have recently moved to a new notebook computer. I used the "Password Exporter" add-on to import my passwords from my old machine.
    Now, when I reach a Web page that I'd saved the user id and password for, it no longer appears in the fields and I have to start typing some of it, before Firefox offers it again.
    Also, if a password has changed, when I enter the new one, Firefox won't offer to update that saved account with the new password - so I'm stuck with my old 'list' of accounts and their original passwords.
    How can I fix these problems?

    * Make sure that you not run Firefox in (permanent) [[Private Browsing]] mode
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Uncheck: [ ] "Automatically start Firefox in a private browsing session"

  • New iTunes for old iPod. HELP?

    so my sister got an iPod mini 2nd generation and put her songs on there through her iTunes on her computer. She gave the iPod mini to me. Now I want to put my songs from my iTunes on the iPod but every time I try to "sync iPod" it keeps her songs on there. it does not put my songs on there. is there any way that I can put my songs on there by using a new iTunes on a different computer than the original??
    PLEASE HELP!!!
    Dell   Windows XP  

    That is correct, a simple Restore will fix the problem.
    Also, I think your sister might have an iPod nano.
    Check these out:
    Identifying Different iPod Models
    5Rs
    5Rs Tutorials
    Restoring iPod to Factory Settings
    I hope this helps!

  • New FM for Old FM "Upload" . Only "Upload".

    Hi All,
    I am working on Upgrade Project
    (From 4.6B to ECC6.0).
    I have come across a Function Module
    "UPLOAD" in Old Version.Can anybody give me the name of
    the function module which replaces the above
    function Module in ECC6.0.
    Thanks in Advance.
    With Regards
    Jitendra.

    Hi Jitendra,
                    check  FM  'gui_upload'
    Reward points if helpful.
    regards,
    Hemant

  • New OS for old iMac ?

    I have mid 2007 I Mac with 2 GHz intel core duo and 4 Gb RAM running 10.4.11.  I want to upgrade the OS as far as possible without slowing performance too much.  What's still available to install?

    Any OS upgrade is going to slow you down mostly.
    But anyway, your Mac can go as far as 10.5.6.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 2GB at least)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they might still have it...
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    If it's a Core Duo & not a Core2Duo, then it'll only run in 32 bit mode.

  • New FM for Old FM "RH_START_EXCEL_WITH_DATA" in Upgrades.

    Hi All,
           I am working on Upgrade Project
           (From 4.6c to ECC6.0).
           I have come across a Function Module
           <b>"RH_START_EXCEL_WITH_DATA"</b> in Old
           Version.Can anybody give me the name of
           the function module which replaces the above 
           function Module in ECC6.0.
           Thanks in Advance.
    With Regards
    Jitendra.

    Hi
    This fun module exists in ECC6.0, But some problem in execution. may be due to code page error.
    see the documentation in the sourcecode
    11.04.05 note 0754232 codepage was fix set to Unicode 16bit LE as by
                          advise of BC-FES-GUI colleagues
    May be something wrong with Unicode.check it.
    Reward points if useful
    Regards
    Anji

  • Need new cable for old Zen N

    I lost the cable for a Zen Nano (not a Nano Plus.)
    Do I need to buy a replacement from Creative? Or can I get a generic cable somewhere, and if so, what type of cable is it's Thanks.

    it's a standard USB A to mini-B cable.

  • Can't forward email - new trick for old phish?

    I got a phishing email recently, pretending to be a notification from Facebook. Par for the course so far and hardly Verizon's problem, I know. Patience...
    Many companies, epecially credit card companies and banks, maintain email addresses so you can report exactly this sort of suspicious email. Facebook has one too. Again, sounds like it's not Verizon's problem, but...
    When I tried to forward the hinky message to the proper authorities, the SMTP server spit it back in my face. Refused to send it. No reason given beyond "Sending the message content to the server failed." While not squarely in Verizon's court, the ball has hit the net, and stuck there.
    I sent another test message to myself, and it went through just fine. So it's just that one message. Which raises questions:
    Could the phisher have stuck something into the email to prevent it from being forwarded?
    Could Verizon, in its finite wisdom and infinite attempts to cover its **bleep**, be blocking the email from being sent because it contains suspicious elements? Which, technically, it does—I'm trying to forward the original message to report it.
    Either there's a technical limitation on Verizon's smtp server that's preventing the forwarding, or Verizon itself has set a "protection" on the server to keep suspicious emails from going out. I have "protection" in sneer-quotes in this case because, by preventing the forwarding, Verizon is protecting the phisher.
    Suggestions?
    Solved!
    Go to Solution.

    Forward it to verizon's [email protected] which allows such to be forwarded.  They do contact the other companies where necessary.
    If you foward to other locations they really don't know that you aren't the spammer and so it gets stopped.

  • Generate match terms for old business partners

    Hi All ,
    We are in the process of generating match terms for old business partner which is already exisiting in the system?
    after uploading SPL master .
    We need to genrate all the match terms accordingly based on SPL master
    can any body give me the steps involved
    Thanks and Regards
    S.Janagar

    Hi,
    to generate search terms, as well for new as for old business partners, please follow the steps:
    /SAPSLL/SPL_CUS_APP_BUFF_RESET  
    /SAPSLL/SPL_CREATE_SEARCHTERMS  
    /SAPSLL/SPL_INDEX_CREATE        
    /SAPSLL/SPL_CREATE_SEARCHTADRC  
    Please perform them in this sequence.
    Best regards, Christin

Maybe you are looking for