File copy from AL11

Hi Experts,
  I generated a Extract from BW and placed it in a file in <b>AL11</b>  by using function module/program.
for some reasons i can't use infospoke.
The generated file is in AL11,How can i copy the file to by desktop
Thanks

Hi,
you need to make an abap program.
Try this code:
*& Report  ZBAJARARCH
REPORT  ZBAJARARCH.
TABLES:
    sscrfields. "Campos en las imágenes de selección
DATA:
    it(5000) OCCURS 100 WITH HEADER LINE.
*-parameters----
SELECTION-SCREEN:
    BEGIN OF BLOCK b1 WITH FRAME TITLE text-004.
PARAMETERS:
    sfn(128) OBLIGATORY LOWER CASE MEMORY ID z0s   " server file name
             DEFAULT 'C:',
    pfn(128) OBLIGATORY LOWER CASE MEMORY ID z0p   " pc file name
             DEFAULT 'C:'.
SELECTION-SCREEN END OF BLOCK b1.
*-events----
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfn.
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       CHANGING
            file_name     = pfn
       EXCEPTIONS
            mask_too_long = 1
            OTHERS        = 2.
START-OF-SELECTION.
  PERFORM getfrsrv.
      FORM getfrsrv                                                 *
FORM getfrsrv.
  REFRESH it.
  PERFORM borrar_file_si_esixte.
  PERFORM dsopen_input_text
      USING sfn.
  PERFORM xfer2it.
ENDFORM.
      FORM xfer2it                                                  *
FORM xfer2it.
  DATA: cont TYPE i.
  WHILE sy-subrc = 0.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              percentage = cont
              text       = 'Espere por favor'.
    PERFORM dsread
        USING    sfn
        CHANGING it.
    IF sy-subrc <> 0.
      EXIT.
    ELSE.
      ADD 1 TO cont.
    ENDIF.
    APPEND it.
    IF cont = 100.
      PERFORM download.
      REFRESH it. CLEAR it.
      CLEAR cont.
    ENDIF.
  ENDWHILE.
  PERFORM download.
  REFRESH it. CLEAR it.
  PERFORM dsclose
      USING sfn.
ENDFORM.
      FORM dsclose                                                  *
-->  DSN                                                           *
FORM dsclose
    USING dsn TYPE c.
  CLOSE DATASET dsn.
  IF sy-subrc <> 0.
    MESSAGE e001(zk) WITH 'Error closing' dsn 'rc=' sy-subrc.
  ENDIF.
ENDFORM.
      FORM dsopen_&1_&2                                             *
-->  DSN                                                           *
FORM dsopen_input_text USING
        dsn  TYPE c.
  DATA msg(80).
  OPEN DATASET dsn FOR INPUT IN TEXT MODE MESSAGE msg encoding default.
  IF sy-subrc <> 0.
    MESSAGE e001(zk) WITH 'Error opening' dsn msg.
  ENDIF.
ENDFORM.
      FORM dsread                                                   *
-->  DSN                                                           *
-->  REC                                                           *
FORM dsread
    USING    dsn TYPE c
    CHANGING rec.
  STATICS: rctr TYPE i.
  READ DATASET dsn INTO rec.
  CASE sy-subrc.
    WHEN 0.
      ADD 1 TO rctr.
    WHEN 4.
      MESSAGE s001(zk) WITH rctr 'records read from' dsn.
    WHEN OTHERS.
      MESSAGE e001(zk) WITH 'Error reading' dsn 'rc=' sy-subrc.
  ENDCASE.
ENDFORM.
      FORM download                                                 *
FORM download.
  DATA: ls_file TYPE string.
  ls_file = pfn.
  CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            filename            = pfn
            mode                = 'A'
       TABLES
            data_tab            = it
       EXCEPTIONS
            file_open_error     = 1
            file_write_error    = 2
            invalid_filesize    = 3
            invalid_table_width = 4
            invalid_type        = 5
            no_batch            = 6
            unknown_error       = 7
            OTHERS              = 8.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.
*&      Form  borrar_file_si_esixte
      text
-->  p1        text
<--  p2        text
FORM borrar_file_si_esixte.
  DATA: ls_file TYPE string,
        res,
        rc TYPE i.
  ls_file = pfn.
  CALL METHOD cl_gui_frontend_services=>file_exist
    EXPORTING
      file            = ls_file
    RECEIVING
      result          = res
    EXCEPTIONS
      cntl_error      = 1
      error_no_gui    = 2
      wrong_parameter = 3
      OTHERS          = 4
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  IF res = 'X'.
    CALL METHOD cl_gui_frontend_services=>file_delete
      EXPORTING
        filename           = ls_file
      CHANGING
        rc                 = rc
      EXCEPTIONS
        file_delete_failed = 1
        cntl_error         = 2
        error_no_gui       = 3
        file_not_found     = 4
        access_denied      = 5
        unknown_error      = 6
        OTHERS             = 7.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDIF.
ENDFORM.                    " borrar_file_si_esixte
Hope this helps.
Regards,
Diego

Similar Messages

  • NTFS issue: video files copied from Arch won´t load on other devices

    Hi!
    I'm having this odd issue... I'll start from zero:
    I have a 1TB external HDD (usb3, iomega). It has an NTFS filesystem since it was always my Windows backup drive. Since I've buyed a Digital TV that supports video playback from external drives and almost any video format, I'm using it as a movie/etc device. Previusly I had installed Ubuntu... but since I've installed Arch, any video file that I copy to the external HDD won't work on the TV. When I try to reproduce those files copied from Arch on the TV it hags and reboot several times.
    I don't know where to start. I've installed ntfs-3g-fuse package for mounting r/w without root privileges... and my user is part of "disk" and "storage" group.
    Any ideas?
    PD: Sorry, I'm not an english speaker... If it's not legible I'll try to write it again.

    Usually crash on access indicates damaged filesystem. For example drive was removed without umount-ing it.
    For start you can run file system check on your drive from Windows - "chkdsk /f X:"
    You also can run it as "chkdsk /f /r X:" to check for bad-blocks (though it is not so critical now days).
    Keep in mind - NTFS is proprietary system so 'ntfsfix' from ntfsprogs in Linux could help sometime but do not hold you breath with it.
    Better find Windows for Windows filesystem.
    Or you can just recreate files system from scratch with mkntfs - all data on the drive will be lost, obviously. But you do not need windows for that.
    Regards,
    Eugene.

  • No write access to files copied from a CD-ROM

    Hello:
    I have searched and found a few topics on fixing permissions on files copied from CD-ROM that are read only. I would like to know if there is a way to prevent the problem. I routinely get files burned on Windows machines and I can copy the folders and enclosed files to my desktop but both the folders and the files inside show up with "Read Only" permissions.
    While it is possible to fix it, I would have thought that if they are copied from a CD-ROM to my desxtop that I should automatically have write access to them. Any ideas on what might be causing this?

    Repartitioning and reformatting will remove all the information on the drives. You will prefer to backup any data you wish to save. You can do that by transferring those files to one of the two drives using a Windows computer or by purchasing a third drive that can be OS X formatted to which the data on one of the Windows drives may be copied. Then repartition/reformat one of the Windows drives for OS X and copy the data from the third drive to this drive. Then copy the data on the remaining Windows drive to the now empty third drive, repartition/reformat the second Windows drive. Finally, copy the data from the third drive to the second Windows drive.
    There is really no need for a Time Capsule nor would it be preferred since you will now have three perfectly good external drives to use for backups and/or storage.

  • Unable to see the logical path and file created in FILE tcode from AL11 and unable to upload the file to this path from front end

    Hi Experts,
    I have created the logical path and filename in FILE tcode.I am trying to upload the pdf file to application server by using this path.But
    I am getting message like "Unable to open the file".Even I cannot find the this path in AL11 tcode.Kindly anyone advise how to upload pdf file using
    custom path and file created from FILE tcode.
    Thanks & Regards,
    Anusha.

    Hi Anusha,
    Please give as below.
    I forget to say you cannot open the PDF in AL11 and for that you need some configuration, i think it can be done using content server,not sure completely please wait for some more suggestions.
    Regards,
    Pavan

  • What does a greyed out folder mean? (after failed file copy from Time Capsule)

    I did a clean install of Mavericks and I'm trying to copy my files back from my Time Capsule.
    The transfer rate is terrible, despite being a direct link via gigabit ethernet.
    I have about 800GB of Logic projects on the Time Capsule, so I set it off to copy them over.
    After 2 days and 233GB copied across, my iMac hung and I had to do a hard reset.
    I now have a 233GB folder on my desktop that is lighter in colour and I can't open it. Nothing happens.
    Is there any way to resume the copy, or am I looking at starting again, leaving my iMac untouched for 5 days and hoping for the best?
    The tech just doesn't work reliably, despite being a fresh install of Mavericks and an offical Apple Time Capsule 2TB. No idea what I'd do if I had 2 or 3GB of data...

    Phil,
    If you haven't already you may want to try to restart the TC first to ensure that it doesn't think that that folder or it's contents are still in use in some way.
    If that doesn't allow deletion, then you may need to use terminal to delete it regardless of permissions.  Be careful when doing the following and make sure that all spaces and typing are done exactly as given below:
    1) Log into the mac as an account that is an Administrator
    2) Open Terminal, then arrange Terminal and Finder so you can see them both
    3) Open a Finder where you can see the grayed-out folders on the TC
    4) In terminal, type the following, including a [space] at the end (but don't hit enter yet)
    sudo rm -r
    5) From Finder, drag the bad folder to the terminal window and release.  This will type the correct path into terminal.  Ignore and leave any backslashes that are added to the path.  You should end up with a command that looks like this:
    sudo rm -r /Volumes/MyTC/ParentFolder/BadFolder
    6) Hit enter ONLY if the path looks correct and ends in the name of the bad folder you are trying to kill.  If the path looks wrong or does not end in the targeted folder name, then do not hit enter and close terminal.
    7) Once you hit enter you will be prompted for the password of your currently logged in user.
    8) it should then blow away the folder.
    9) Close terminal

  • I have a seagate external hard drive with files copied from windows pc. If I will download NTFS driver from seagate to my mac, could I install it safely without harming my files in the external hard drive? I am afraid I may erase all files in there.

    I have a seagate external hard drive with files transferred from my windows pc. If I will download NTFS Driver from seagate to my mac, could I install it safely without harming my files? I am afraid.. I might erase all my important files during the installation..

    Thanks a lot! I have already downloaded Paragon Driver and it works well with seagate external hard drive. I am copying as of now my important files from my mac to it. However, I have only the trial version which will expire in 10 days. I don't have credit card to buy for it.

  • Extremely slow file copy from USB 3 external Seagate on MacBook

    I copied my iPhoto file of 20GB onto a new Seagate USB external drive from my 2011 MacBook in about 20 minutes over USB 2.0. I am copying up the same file from the same drive on my newer 2012 MacBook pro and it is taking 7 hours. The newer MacBook has a 750GB SATA SSD and is equipped with USB 3.0. Why would it take so much longer to copy from the drive to the newer Mac using a faster USB spec?

    Well, I solved this myself with some searching on other threads. I turned off Spotlight indexing on the drive, and killed the copy job, disconnected and reconnected the drive, and the copy is now going quite fast. Will be done in lest than 5 minutes.
    System Preferences> Spotlight>Privacy> Press the + and added the external drive.
    Apparently, this is the default behavior of Spotlight, and the indexing was causing the bottleneck.

  • File dates of files copied from my iphone to my XP system are realy off!

    Whenever a file is copied from my iPhone to my XP System via iTunes copy purchases, Sync, Etc... the file date of files copied are realy wrong! Extremely old dates are used insted of the actual date. In windows XP the file list can display three dates, The Created Date, The Modified Date and the Last Accessed Date. I think it's the accessed date thats coming up wrong. Anyone else experience this? or can anyone explain what might cause this.
    Thanks!

    Sync is only oneway, from PC to your device.  Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software.  A good Free one is called Sharepod which you can download from Download.com here:
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

  • File copy from shell using nautilus file operations?

    Is it possible to have the nautilus file operations copy command from a shell?  In other words, rather than using the cp command, I'd like to have a file copy triggered from a bash script that uses the familiar "File Operations" dialog box in nautilus.  Can this be done?

    Hello Bibin,
    Give this a try., if i understood correctly. I coudn't test it my side.
    $servers = get-content C:\hosts.txt
    foreach ($server in $servers)
    if(test-path \\Centralserver\share\$server)
    if(test-path \\$server\c$\xxx.file)
    Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -ErrorVariable CopyErrorS
    #stores all your copy errors
    $copyError = $copyError + $copyerrorS
    else
    Write-Output "source file on server $server is missing"
    else
    New-Item -Name $server -ItemType Directory -path \\centralserver\share\ -Force -Errorvariabe FCreationErrorS
    #Stores all your Folder creation errors
    $FCreationError = $FCreationError + $FCreationErrorS
    if((test-path \\$server\c$\xxx.file) -and (test-path \\Centralserver\share\$server))
    Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -force
    else
    Write-Output "Error creating source folder on $server."
    Regards,
    V.
    Venu

  • Home Sharing removing files copied from another machine

    I have two machines both backuped with Time Machine... I purchase movies, music and TV shows on machine A with HS configured (in family area). I have machine B (in office) configured to use HS and to copy new files from Machine A to Machine B. Both machines have HS configured with the same account. This seems to work fine, except... If I then delete media files from Machine A via iTunes that asks, and I confirm, to remove the files from the disk. Will the files also be deleted from Machine B automatically. This is the behaviour I think I'm seeing and it is unexpected. I would expect the files on Machine B to remain until specifically removed!
    There are several weeks between the time I purchase media and my purging. I also verify the files have been copied to Machine B before purging from Machine A. Machine A has a smaller HDD so I periodically remove files from this machine to free up space. Then after some time I notice that the files purged from Machine A are no longer on Machine B.
    Is this really the way HS is designed to work????
    Thanks for any help.

    Simon, There are 5 ways to share music with iTunes:  (1) iTunes Music Sharing (a/k/a "regular" sharing),  (2) Home Sharing, (3) Family Sharing, (4) multiple libraries using a shared set of files, and (5) each member have a copy of the content.
    If you don't want them logging in with your Apple ID, Home Sharing is out.  If you are only talking about non-DRM music, #5 may be the best solution.

  • Files copied from AFP share point are unwriteable by client

    This is the same issue as: http://discussions.apple.com/thread.jspa?messageID=8044984
    Has anyone found a fix yet? Basically, when copying files from an AFP server, Leopard is not having the file inherit the permissions of the parent folder. It is inheriting the permissions of the file within /Volumes.
    I am accessing an AFP share point on a server that has files that are 644 (readable by everyone, but only writable by the owner). I am not the owner. When viewing the AFP volume on my client within /Volumes/whatever the permissions appear to be 400 (unwriteable by the owner, no access to anyone else). When I copy the file over to desktop, the permissions remain as 400 when they should obviously be 600.
    What does this mean? Even though I am NOW the owner, and it is on MY desktop, I am unable to write to the file unless I chmod it. Very, very annoying and this behavior is unique to Leopard. Tiger does not mangle the permissions.
    The server is ubuntu-8.10-server running Netatalk.
    The test clients are Leopard 10.5.5 and Tiger 10.4.11
    On the server:
    $ pwd
    /srv/www
    $ ls -l
    -rw-r--r-- 1 www-data www-data 1024 2008-11-23 23:29 test.doc
    On the Leopard client:
    $ pwd
    /Volumes/www
    $ ls -l
    -r-x------@ 1 sauce staff 1024 Nov 23 23:29 test.doc
    $ cp test.doc ~/Desktop
    $ ls -l ~/Desktop/test.doc
    -r-x------@ 1 sauce staff 1024 Dec 7 00:21 /Users/sauce/Desktop/test.doc
    Message was edited by: iSauce

    I don't believe this is a problem of leopard in general. i can not reproduce this behavior with any of my afp shares. no matter how i connect (as an owner or as a guest) after I copy something to the desktop it gets standard 644 (not 600) permissions.

  • File copy from SHARED folder to Application server

    Hi
    I have a file which is in a shared folder. My requirement is to copy this file into the application server.
    The function module C13Z_FILE_UPLOAD_BINARY is working fine with local files. But I could not use it to copy the file in shared folder.
    Please help me out.
    Points will be awarded for sure !!
    Thanks

    hi,
    use OPEN DATASET ... TRANSFER ... CLOSE DATASET to transfter the data on to the required file path ... else use transaction
    CG3Z - to upload file from presentation server to application server.
    Regards,
    Santosh

  • Files copied from UDF data dvd are Read-only

    I have a bunch on data DVDs burnt on a pc using Roxio Easy Media Creator 7. These disks are UDF format and can be read perfectly on pc or mac. The problem is : if I copy a file to my desktop, it becomes owned by me but r-xr-xr-x. It's not a problem for me personally but other users I support have a hard time figuring what's wrong when they can't rename the file they just copied.
    Is it normal behavior or am I the only one with this problem ? I was supprised not to find anything in apple forum about this.
    The work around is to change permissions to read-write in the getinfo window + apply to included elements + password or use chmod but it's not how I'd expect it to work. And I don't know how to modify the default permissions given to files from an UDF dvd. Copies of files from iso9660 disks are read-write.
    3 PM G5s and 2 G4s   Mac OS X (10.4.9)  

    I don't believe this is a problem of leopard in general. i can not reproduce this behavior with any of my afp shares. no matter how i connect (as an owner or as a guest) after I copy something to the desktop it gets standard 644 (not 600) permissions.

  • HT3775 AVI files copied from PC to new iMac are not playing. Message is The document "Mural.avi" could not be opened. A required codec isn't available.  As far as I know I have the moist recent version of quicktime.  HELP!  Please.

    I cannot get the AVI files to play on my iMac.  They were copied over from the PC and I can see them but when trying to open them I get the message "The document “Mural.avi” could not be opened. A required codec isn't available."  As far as I know I have the most recent version og Qucktime.

    Try installing Perian or VLC. Some AVIs require a codec which simply isn't available for Mac OS X.
    (85018)

  • Photodownloader - Error in sequencing files copied from CF Card

    I'm a relatively new user of Bridge and the Photodownloader there (although I've used Elements and it appears to be very similar).  I've noticed that when I copy files from my CF card (from  nikon 300s) that the sequence of the file names on the CF card does not identically match the sequence of the files that are copied to my PC.
    I noticed the issue when working with sports photos.  The sequence that ACR was presesnting to me was wrong in some instances. In the two I checked it was the same type of error.  Pictures that were in 1-2-3 seqence on the CF card were in 3-1-2 sequence after copying.  The sequence on the CF card was correct. It does not do it all the time, but seems to be in shots that were shot in faster sequence.
    There doesn't seem to be much to mess up with the settings. I tell it to rename to a custom name + date + sequence # (usually starting with 1).
    Has anyone else run into this?  Is it a bug in Photodownloader?  Am I doing something wrong?
    I'm using Bridge CS4 - 3.0.0.464.

    Film4Now wrote: What do you suggest as an alternative for a file loader and renaming tool?  I like the other functionality that Bridge brings with ACR.  I use the editing features in that a lot.
    I use all the features of Bridge CS4 (except that one) and love it!
    Vista has a useful import module but I don't know if it would suit your purposes.
    Then again most cameras come with some facility for this too.
    With CS5 getting closer I doubt whether the downloader will ever be fixed.

Maybe you are looking for