Issue in moving files from data fodler to processed folder in background

Hi All,
I am facing one issue in moving files from data fodler to processed folder in case of background execution.
When i am executing the file in the foreground, i can move the file from Data folder to processed folder. I am using SXPG_COMMAND_EXECUTE FM to move the file from data folder to processed folder.  I can see the file in processed folder once the program is executed.
But in case of executing the same program in background, it is giving me the error "Failed to move the file to processed folder" in the spool of SM37 and i can see the file still laying in data folder.
I tried to check other programs which acesses the same folder as the above program, whether they are able to move. They are able to move the file to processed fodler successfully both in foreground and background mode.
Please help me in resolving this issue.
Thanks,
Deepa

Hi Sanu,
                Please use teh following code to move the file from source to target folder.
This is a code showing how to create and use COPY command of UNIX in ABAP
PARAMETERS:
Input file path
p_input TYPE localfile,
Processed file path
p_proc TYPE localfile.
Declare the Types to file data
TYPES: BEGIN OF L_X_OUTPUT,
sys(200), " Please note, there are asterisk before and after sys (i.e.sys)
END OF L_X_OUTPUT.
* Internal table to store file data
DATA l_i_output TYPE STANDARD TABLE OF l_x_output WITH HEADER LINE.
* Variable for the UNIX command
DATA: l_v_unix_comm(255) TYPE c.
Copy command of UNIX
CONCATENATE 'mv' p_input p_proc
INTO l_v_unix_comm SEPARATED BY space.
For example the Copy command is stored as below
cp u2018/data/interfaces/input/input_fileu2019 u2018/data/interfaces/processed/processed_fileu2019
Examples of UNIX Command *u2022 mv filename1 filename2 --- moves a file (i.e. gives it a different name, or moves it into a *different directory (see below) *u2022 cp filename1 filename2 --- copies a file
Execute the UNIX Copy command.
This command will copy the file from input file path to the processed file path
CALL 'SYSTEM' ID 'COMMAND' FIELD l_v_unix_comm
ID 'TAB'
FIELD l_i_output-sys.
IF sy-subrc eq 0.
write: 'File is copied successfully using UNIX command in ABAP'.
ENDIF.

Similar Messages

  • Why does the new operating system not delete the moved files from their original location - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it

    Why does the new operating system not delete the moved files from their original locations - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it - also, when transferring large amounts of files it becomes a very large problem remembering which files were transferred and which not.

    You're going to need to be more specific, as I'm not quite sure I understand what you're talking about.
    If you're referring to copying from an external hard drive or flash drive, and you want to actually move files rather than copy them, you can hold down the option key to force it to do a "move" rather than a "copy." This is not new behavior, though... the Mac OS has worked this way as long as I can recall (and I've been using it since 1984).
    If you're having a problem with trying to move files from one place to another on a single drive causing them to be copied instead, that is likely because of some permissions issue preventing you from actually being able to move them.

  • Moving file from one location to other in shell script

    HI All,
    I am facing one problem in moving file from one location to another location please help me out.
    My code is as below :
    mv ${file}.log ${DATA_XXX}/../archive/${file}.log_`date +"%m%d%y%H%M%S"`
    mv ${file} ${DATA_XXX}/../archive/'abc'.`date +"%m%d%y%H%M%S"`
    where file =test1 and DATA_XXX= "k01/aa/in"
    please help me on this
    Thanks

    Please describe the problem. Perhaps you are missing the / i.e. /${DATA_XXX}

  • I am having trouble moving files from iPhoto to a thumb drive.  Sometimes I can move 20 photos next time I can only move 2 photos or 0---this is during the same session.  I also have trouble downloading photos to the internet.  Can someone please help?

    I am having trouble moving files from iphoto to a thumb drive.  During the same session sometime I can move 10 photos at a time, the next time I can only move one photo and sometime no photos will move.  I also have trouble downloading photos to the internet.  I was using a MacBook Pro and had no problems like this.  I then upgraded to the MacBook Pro with Retina Vision and this is the computer I am having problems with.  Can anyone please give me a suggestion in how to fix this problem. THANK YOU.

    iPhoto problems should be posted in their forums.
    I also have trouble downloading photos to the internet.
    Needs clarification.  You upload from your computer to the internet & download from a website/internet to your computer.  So which are you trying to do?  Either way, sounds like a browser issue.  You need to post in the forum of whichever browser you are using.

  • Computer freezes when moving files from USB, or to another partitioned HD

    Hello, i've been moving files from two USB's to my Macintosh HD, and when I do that, the computer kinda freezes up, i can move the cursor, but not kinda click anywhere, and then a minute after or something, it gets normal again, but the transfer is going horribly slow. this happens when i move from Macintosh HD, to Macintosh HD 2 (a partitioned one). the files are 2 gb each USB. which means im transferring 4 gb at the time.

    Neurot wrote:
    I have 6 folders on my hard drive. These folders were created by downloading a bunch of rar files, then extracting them each to their own folder. I have not touched the permissions, so they should be the default of me having read/write and everyone else having read (correct me if i'm wrong).
    Using two Finder windows, I drag and drop the six folders from one hard drive to another, and hold down the Apple key so that it moves instead of copies. I let go and it starts copying the files (since there is no "move", but rather a "copy and then delete").
    I would recommend you don't use this method to move a lot of files between drives. it's much safer first to copy and if the copy is successful to delete the original afterward. there was a data loss bug in OS X a while back that wold sometimes lead to total loss on both the source and the target when doing this.
    this bug is supposed to be long fixed but still...
    How is the hard drive you are moving the files to formatted? what yo describe sometimes happens when moving a lot of stuff to or from FAT formatted drives. also, repair both drives in disk utility. repair disk, not permissions.
    Message was edited by: V.K.

  • HT4889 moving files from pc to mac book

    Hi have down loaded to set up moving files from pc to mac book pro but keep getting an error message on pc  saying error occurred whilst  preparing your info for transfer ! i am running visa on pc any help pls thanks

    Look at these links.
    *How to use your iPod to move your music to a new computer*
    http://docs.info.apple.com/article.html?artnum=300173
    http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/
     Cheers, Tom

  • I am having a problem moving files from a iMac  in location mac in another location.  I have tried using Dropbox and the Public folder in the i disc.  When I drag the files into dropbox they become alias' and I can't open them at the other end beca

    I am having a problem moving files from an imac in one location to an imac inanother location.  I have tried using Dropbox which is installed in both locations but when i drad a file ino yhe app it becomes an alias.  When I get to the other location it says I can't open the file because the " original application that created it is not present".  This is despite the fact that the app that created both files is installed in both computers.  If I use the Public folder in the idisc, when I get to the other location the file isn't there.  Am I forgetting to turn something on or off?  Should I manually sync the Public folder and if so how? Thanks
    Message was edited by: stephenfromdelray beach

    So now that's two of us.  Hopefully, someone has an answer. 

  • Moving files from PowerMac G3 to MacBook Pro

    I have a new MacBook Pro and am moving files from all my old macs onto it. I found an old beige desktop PowerPC hard drive but don't have a monitor for it. Also, I have ancient 3.5 floppies that I need to read and the old beige computer has a slot for that. So, the question is: How do I get my files off the beige G3 and onto the new computer when the beige PowerPC has NO firewire?

    One solution is to find any old crappy monitor and hook it up to the beige G3. Then you can configure it to use Ethernet, and set up a small Ethernet network with your new MacBook Pro. It is a little complicated, but not difficult.
    This article helps explain the concepts:
    106658- Creating a small Ethernet network
    Then this illustrated step-by-step can walk you through it:
    Car1sons OS 9 to OS X.3 File Sharing Setup

  • Issues with RAW files from my 7D

    I have Aperture 1.5.6 on my computer and the software updater says that is the current version. I shoot with a 20D and a 7D. I upload my raw files to Aperture and edit them from there and then process for a jpeg. However, every time I upload a raw file from my 7D I get the following message when I click on it to edit it: Unsupported Image format.
    Any words of advice, other than just buy Aperture 3??

    I have Aperture 2.X and had zero issues with RAW files from a 7D, so I think the problem is you are on 1.X. Converting to DNG first was a good suggestion if you don't want to purchase 3.X. Yet another reason to hate proprietary raw image file formats.......

  • Is it true that Lightroom 4,4 has an issue importing RAW files from Nikon D610 ?

    Is it true that Lightroom 4,4 has an issue importing RAW files from Nikon D610 ?

    Hi Kenneth L,
    Please use the below link to convert your raw files to DNG files then you would be able to import the files in Lightroom 4.4
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 8.6 For Mac
    Adobe - Adobe Camera Raw and DNG Converter : For Windows : Adobe DNG Converter 8.6 For Windows
    Thanks

  • Having trouble recovering music files from data cd

    Over a month ago my computer crashed, possibly due to me trying to update my ipod to Version 1.1. Unforunately a lot of my programs weren't working after that, including Itunes, but I still have my music files which I could not listen to so I decided to save them as data so that they would not be lost forever. I was finally able to get Itunes up and running a couple of days ago, the music files on my harddrive have been deleted. I am now having trouble getting the songs from the cd I had burned to back onto my hard drive, I have tried Apple's method of dragging the files to the Source List while in Itunes, but this does not work. I have also tried Importing the songs, copying the file, and copying the folders, but none of this works. Sorry for this being so long

    Welcome to the Apple Discussions. What do you have set in the System/CDs and DVDs preferences to do when a disk is inserted? If the option is not set to the Finder do so and see if that will make any difference.
    Otherwise boot into Safe Mode and see if you can copy the files from the CD to a folder on the Desktop. Boot back into your normal account and see if you can import. Or import while still in the Safe Mode.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    MBP 2.16Ghz; G5 Dual Core 2GHz, 2G RAM ea, 250G HD; G4 Dual 1Ghz, 1.5G RAM;   Mac OS X (10.4.10)   22" LCD, 710G FW HDs, Canon: SD700IS/i850/LIDE 50, Epson R200, 30G iPod, 2G Nano

  • Moved file from Windows XP to Windows 7 - reason sound is bad?

    I can access my ITUNES after moving file from XP to laptop which uses WIN 7 but the sound is awful when playing through ITUNES. Music much better when played through WINDOWS Media. The equalizer doesn't seem to be engaged. Is there a setting that might be getting in the way or do you think it's the way it was transferred .... or something else. GENIUS's at stores offer no help since my laptop isn't an APPLE. No sympathy there either.

    The equalizer doesn't seem to be engaged
    Is it engaged?
    Check the EQ and check the settings in iTunes prefs -> Playback

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • I had this video file and I was trying to flip it to a format that would work with iMovie.  It used to have the Quicktime image with it.  So, I assume it was a QT file.  But, somehow I've changed the file from a video to a folder.

    I had a video file and I was trying to flip it to a format that would work with iMovie.  It used to have the Quicktime image with it.  So, I assume it was a QT file.  But, somehow I've changed the file from a video to a folder.  I've tried to undo the action.  No luck.  I wasn't running my Time Machine.  So, I can't go back.  Help.  It's the only copy of this video.

    I've tried to undo the action.
    How?
    Please detail ALL you have done so far in the way of troubleshooting?   Need this info to avoid the been there done that scenarios.
    it's the only copy of this video.
    Where did you get the video from?
    From the pic I noticed that the folder is 841.9mb.  What's inside?  Or what happens when you click on it?

  • My folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    my folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    Don't know if that would be a failing hard drive, but it may be that you are out of available space. How much hard drive space do you have available? Please highlight the Macintosh HD icon and then press Command and I for a get info window. Once open, please copy and post the following:
    Capacity:
    Used:
    Available:
    Mac OS requires a minimum of 10 - 15% of total hard drive space available and empty at all times in order to operate properly.

Maybe you are looking for

  • Use of local interface btw EAR

    hi, Can i use local interfaces to call session bean of EAR1 from EAR2. in my case EAR1 and EAR2 are deployed in the weblogic instance(same jvm). and parameters are being passed by value(because of 2 different classloaders). I tried doin this ... but

  • Calling Apex page from Oracle Forms

    Hi, I haven't managed to find a similar thread anywhere. I would like to call an apex page from a form. The page is in an app that requires authetication. I can able to open the page by using web.show_document but that only takes me to the login page

  • Calibration inspection lot

    Without Cost center, is it possible to schedule and release inspection lot 14 for instrument calibration. I tried without CC, but inspection lot has not triggered, if i give cost center either in work center or equipment data, then every thing is hap

  • I lost my imac data.

    Hi there Actually i've got a problem loosing my imac data when my girl installs the original two discs( Mac os x install Disc 1 & 2) that come with the imac. i was trying to to stop the installation but i couldn't. So in such case what to do to resto

  • Some open gl apps freak out.

    I'm still researching, but I think this problem has to do with SDL. here's part of a post that I believe applies to me... Frozen bubble outputs: [SDL Init] [Graphics...] [Levels] Fatal signal: Segmentation Fault (SDL Parachute Deployed) Segmentation