Check for source file

Hi,
My requirement is as below:
In source FTP directory, I have to check if source file exists or not. If exists, that file shuld be picked up and created at target side with header, line items and detail record.
If the file does not exist, then a file should be created at target side with only header and detail record with no line item records.
In any case, a file should be created at target side.
Please suggest if Dynamic configuration is the better option for this or any other way gives better results.
Thanks and Regards,
Anil.

@ Babu,
The query is like...
If the file does not exist, then a file should be created at target side with only header and detail record with no line item records.
In any case, a file should be created at target side.
so i answered as,
Now when the file is not present, u will get only the empty tags..(message type name in XML Payload)
If you read the question carefully, it is not being asked "how to handle empty files". It is about "what to do if there are no files in the source directory", which implies that if there are no files present, then create one.
u said as,
This option won't "create" an empty file.
Correct me if i am wrong, DID I SAY IT WILL CREATE an EMPTY FILE IN SOURCE FOLDER???
No, you don't need to say that .. it was evident from your answer. In this forum post, nothing is being asked regarding empty files, so please don't provide such answers which has nothing to do in this situation.
-- Abhi

Similar Messages

  • Advanced selection for source file

    Hi,
    Requirement: One source directory, multiple file names. File needs to be picked up from source directory and send to target directory with same name as source file name.
    Source file name pattern sample: AP5_X_yyyyddmm, A35_X_yyyyddmm, AP5_Y_yyyyddmm, AP5_Y_yyyyddmm.
    Target file name should be :AP5_X_yyyyddmm, A35_X_yyyyddmm, AP5_Y_yyyyddmm, AP5_Y_yyyyddmm
    Can we define multiple place holders as :
    Directory    
    File Name Mask
    Exclusion Mask
    \\Source
    AP5_X*.txt, A35_X.txt, AP5_Y*.txt, AP5_Y*.txt
    When I tried for single place holder, the scenario was working but when I tried adding multiple place holders it was not working.
    How can we achieve the above scenario?
    Thanks,
    Vertika

    Hi Amit,
    Thanks for reply.
    Yes you understood it right.
    I am able to achieve this now. The only change that I did is instead of giving all the placeholders in same line I have given it in different lines and this is working now.
    Sender Adapter Configuration: Checked Advanced selection for source file and used Adapter specific message attributes to keep same file name as source file name.
    File Name Mask
    File Name Mask
    Exclusion Mask
    \\Source
    AP5_X*.txt
    \\Source
    A35_X*.txt
    \\Source
    AP5_Y*.txt
    \\Source
    A35_Y*.txt
    I am closing this thread now.
    Thanks,
    Vertika

  • Advanced Selection for Source File + SourceFileSize = invalid file size?

    Hi !
    I have a File Adapter using FTP protocol. I've turn on all Adapter-Specific Message Attributes, including SourceFileSize. I've activated the Advanced Selection for Source File, and entered several patterns.
    When I see my payload via the monitor, I get a "-" in the SourceFileSize value.
    <sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">-</sap:Record>
    If I disable the "Advanced Selection for Source File", the file size is ok.
    Is it just me?
    Thanks

    maybe u need to check for some notes

  • File Adapter: Advanced selection for source file

    Hi Experts,
    I am doing file(Idoc format) to IDoc scenario. In my scenario I am getting files in three different formats (ex: abc.dat, xyz.dat, 123.edi). My communication channel (sender file adapter) should poll for every 30 mins, picks up the files and map them to Idoc without any mapping.
    Need following clarifications:
         1. Should I create 3 communication channels to pick up 3 different type files? Or should I use the Advanced selection for source file to pick up them with only one CC?
         2. If there is no mapping how should I proceed in this case?
    Regards,
    Rams

    >>1. Should I create 3 communication channels to pick up 3 different type files? Or should I use the Advanced selection for source file to pick up them with only one CC?
    Not required.. if all the files are from the same directory then u can specify .  in the file name parameter.. but make sure that only these 3 file types are places in the directory... if this is not the case you can use Advannced Selection... check my Wiki [Single Sender File CC For Multiple Directories|https://wiki.sdn.sap.com/wiki/display/XI/SingleSenderFileCCForMultipleDirectories]
    >>2. If there is no mapping how should I proceed in this case?
    Mappiing is required only if the source and the target structure are different.. if u send the file with the IDocc XML format mapping is not required...
    ~SaNv....

  • Advance select for source file in Sender File Adapter

    Hi
    I am trying to utilise the parameter 'Advance Selection for source file' on a sender file adapter to pick the file from multiple folders
    My problem is that this parameter that is listed on the SAP help is not getting in File accessing Parameters.
    I am running PI 7.02 (NW702_07_Rel)
    Service pack 07
    Has anyone come across this before?
    any suggestions on how to do this?

    Hi,
    In PI7.0 the property exists. I have used it previously. I think SP was 13.
    Regards,
    Nutan
    Edited by: nutan champia on Nov 24, 2011 10:42 AM

  • Can't get Firefox to load at all after trying fixes from support web site. Have checked for lock file, processes running, reboot, reinstall. NO JOY.

    I'm running Vista for operating system on an HP laptop that's about 2 years old. I've installed all current updates.
    I've always used Firefox. It started crashing and creating processes but not launching. Went to support and scoped it out -- there was a lock file my profile directory. I deleted it, and Firefox started loading.
    Used it a few times -- closed the app each time on exist as per suggestions on support site info. One time -- back to square one, wouldn't load, just created a process. Reboot, ending process, checking for lock file, reinstalling -- all unsucessful.

    Brian
    Below is from using a SIP build.  It does offer G722, but it's way down on the list so it's never used...
    m=audio 32678 RTP/AVP 0 8 18 102 9 116 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:102 L16/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:116 iLBC/8000
    a=fmtp:116 mode=20
    a=rtpmap:101 telephone-event/8000
    Taking Sreekanth's suggestion to try a Skinny build, I get the following when I make a call.  It offers codecs in the order I SET THEM AND ONLY THE CODECS I SET!  YAY!
    m=audio 19374 RTP/AVP 9 0 101
    a=rtpmap:9 G722/8000
    a=fmtp:9 bitrate=64
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    Using a Skinny build on the phones also solved other issues.  The phones use G711 when the whole path supports G711 and G722 when the whole path supports G722.  It doesn't always use G722 and rely on transcoding for the call paths that can't use it.  It's fantastic..  The phones also receive the QoS tagging that I set and that seems to result in better audio quality than on the SIP builds, which never did get those settings.  Finally, it even solved a slow Exchange 2013 answer issue I have been experiencing for quite some time.  I practically fell out of my chair when I saw everything that was fixed just by switching...
    Cisco, PLEASE FIX YOUR SIP BUILDS!  It's insane how the SCCP builds work perfectly and the SIP builds don't, especially with how much these phones cost..  I was thinking of possibly acquiring some 9951s, which are SIP only.  I'm a little leery about that at this point.  If they have the same kinds of issues as the SIP builds for the 7975g, there's no SCCP alternative to use..
    Sreekanth
    Thank you for suggesting a Skinny build..  That was about the only thing I didn't try.  I am happy beyond belief that this is working so well now, even though the SIP builds should be just as well developed as the SCCP ones.

  • [JS][CS3]how to get refrence for source file

    Hi All
    I am new and learning javascript Gradually Could any one help on this as i do have a code for load style but don't know how to get refrence for "source file" and "targetDoc"
    targetDoc.importStyles(charImport, sourceFile, clashPolicy);
    targetDoc.importStyles(paraImport, sourceFile, clashPolicy);
    Can any one figure it out
    Many Thanks

    I'm not sure what you are trying to achieve, could you please elaborate?
    Do you want to load all the styles from one document into all 100 documents, or do you want all the styles from the 100 documents into 1 document or what is the goal?
    The following will let you choose a folder of files, open each of the files in it and import the styles from source document. It is not a complete script, make sure to test and modify before running on anything else than test files :-)
    var MyFolderWithFiles = Folder.selectDialog ("Choose a folder");
    var sourceFile = File.openDialog("Choose the styles source");
    var myFiles = MyFolderWithFiles.getFiles("*.indd");
    for(i = 0; i < myFiles.length; i++) {
        theFile = myFiles[i];
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
        var targetDoc = app.open(theFile, true);
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
        targetDoc.importStyles(ImportFormat.CHARACTER_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
        targetDoc.importStyles(ImportFormat.PARAGRAPH_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
        targetDoc.close(SaveOptions.YES);
    Thomas B. Nielsen
    http://www.lund-co.dk

  • File Handling (Check for existing file)

    now my problems is that i need to have a code that upon a request checks for a file (in the home dir) and if the file exists reads the information and ouputs it. here is an example:
    check if file TEST.DATA exists?
    check approved TEST.DATA exists
    information outputed...
    if the file is missing i need to have an error message...
    PS. sorry if the question falls under "lame" but i am fairly new to java and i dont know the commands that well... thank you in advance!

    File.exists()
    Reading Text from a File
    Useful places to seek for information:
    - Java API documentation
    - The Java Tutorial
    - Code examples from Java developpers Almanac
    - Google
    - ...

  • Hard Drive Setup for Source Files, Media Cache, Project, Render, etc...

    I am working to set up the following drives:
    C: SSD for OS and Programs
    D: RAID 0 (Three SATA II F3's) for Premiere Projects, where I render too, and Encore Projects
    E: RAID 0 (Two SATA III WD Caviar Blacks) for Source Files, media cache, and preview files (if i can get the Marvel controllers/SATA III to RAID that is)
    External HD USB 3.0 for backing up projects
    Should I be doing this different?
    Does anyone think it would be better to use SDD drive(s) instead of HDDs? I

    We're almost there Harm, thanks! I'm about to indicate this as being "Answered"
    More explicitly, are you suggesting it would look like this?
    C: SSD for:
    OS and Programs
    D: RAID 0 (Three SATA II F3's) for:
    Premiere Project
    Where I render project too
    Encore Project
    Source Files (Per Harm's suggestion)
    E:  RAID 0 (Two SATA III WD Caviar Blacks) for:
    Media cache
    Preview files
    Pagefile
    Is two RAIDs more ideal? That is (provided the above configuration is correct); does the pagefile, media cache, and preview files need to be on a RAID?
    Should I partition a piece of my E and use that for the pagefile or pagefile, media cache, and preview files? If yes, which? and how much of a partition should I create?
    When setting the pagefile, should I set all the other drives to "none" (except the E of course)?
    Lastly, regarding my E: drive for media cache, preview files, and pagefile (assuming all this is supposed to be on a different drive). Would I be better off using an SSD for that? Or should I keep my E: drive HDD with RAID 0? I suppose it will depend on what's more important, read or write speed. If read speed is more important than I can get an SSD for under $200 that will be really fast reads. If it's about writing then my WD's in a RAID will be better. So, which is more important for these things, writing speed or reading speed? If the SSD would be a solution for the extra files then I’ll have this set up:
    C: SSD for:
    OS and Programs
    D: RAID 0 (Three SATA II F3's) for:
    Premiere Project
    Where I render project too
    Encore Project
    Source Files (Per Harm's suggestion)
    E:  SSD for:
    Media cache
    Preview files
    Pagefile
    F:  One SATA III WD Caviar Black for:
    Extra Backups and stuff
    Thanks Harm, I'm about to have an unprecedented editing experience I think! Finally, after more than 7 years!

  • Keeps asking for source file.

    As I work on a project, I save-as the file name for example: This (myproj.mxml) to this (myproj02.mxml) until eventually I save as up to 5 or 10 files. (myproj08.mxml) in the package explorer list on the left side of the flex builder project. When I am finished I delete all the files before my last one. I can delete them all but when I go to export release build I get an error telling me
    (Flash builder could not publish the project source: The application file myproj.mxml was not found).
    The project source must be the very first file created before I saved-as to number 2, because when I bring that first file back into the project, it works again.
    How do I sever ties with all previous file versions so I can keep just the last saved-as version in my flex builder project? Thanks.

    This is not a new problem. I have encountered it through many versions of QuickTime.
    Typically, it happens after I assemble a compilation of clips from various sources, including imported Windows Media files. I diligently check the "Save as a self-contained movie" option, which always indicates a file size larger than the "Save as reference movie" option -- for example, 1.7 MB vs. only 9.2 KB for a short clip. And yet, if I have discarded the original clip, QuickTime is unable to play some of the supposedly self-contained movies because it can't find the deleted source files. It's kind of maddening, especially when there's no way to recover the original clips.
    I haven't tracked this, but I suspect it might happen when a clip in one format is pasted into a movie without first converting it to QuickTime. Has anyone else noticed this possibility and tested it?

  • Self-contained movie asking for source files

    I have exported a final cut pro movie as a self-contained file, and after I deleted the source files, as my harddrive was jammed full, I am unable to burn the project onto a dvd. The file won't open in quicktime or final cut pro. It keeps asking for a source file to continue - HELP! It was a two hour movie that I am to be burning for XMas, and it has slipped out of my computer apparently. It was opening on its own without my harddrive connected before I deleted the source files, so I KNOW it was self-contained which is the only reason I deleted the files in the first place! Thoughts would be greatly appreciated.

    This is not a new problem. I have encountered it through many versions of QuickTime.
    Typically, it happens after I assemble a compilation of clips from various sources, including imported Windows Media files. I diligently check the "Save as a self-contained movie" option, which always indicates a file size larger than the "Save as reference movie" option -- for example, 1.7 MB vs. only 9.2 KB for a short clip. And yet, if I have discarded the original clip, QuickTime is unable to play some of the supposedly self-contained movies because it can't find the deleted source files. It's kind of maddening, especially when there's no way to recover the original clips.
    I haven't tracked this, but I suspect it might happen when a clip in one format is pasted into a movie without first converting it to QuickTime. Has anyone else noticed this possibility and tested it?

  • Checking for sender file

    Hi
    Is there a way for checking the availability of a file in the sender system folder in PI 7.0?

    hi
    if you done all these desingn and configuring part
    copy the xml format file and paste in to the source file in your woek space
    then check the Runtime workBench
    in that check the component monitoring
    in that check the communication
    and check your sender file is going to the XI or not. if it is green then it is send atherwise having the problem
    check
    thanks
    Regards
    vijay

  • Need script to check for duplicate file names when copying a folder

    Hello,
    I am a new applescript user trying to write what I believe should be a simple script. I was planning on using the "add-new item alert" script as a template.
    Basically I have people copying folders of photos into a library folder, but I don't want the Finder to copy the photo if it already exists in the library. The images in the library are organized into subfolders.
    I need a script that will check all the file names in the new folder against all the file names in the library, and NOT add the new one if it already exists.
    If anyone can help it would be greatly appreciated,
    Thanks,
    C

    I have a script that "kind of" works. The only problem I've seen is that it gets confused when filenames contain characters that are fine in Macland but not good in Unixland. Forward slashes are a good example of this.
    In this case I have a folder in my home named "copytest" Inside copytest are two folders:
    Source (containing the images to be added)
    Dest (My existing library of images)
    It also assumes that the folder of images to be added contains no sub-folders. Hope this helps.
    tell application "Finder"
    set theSource to folder "source" of folder "copytest" of home
    set imagesToBeCopied to name of every file of theSource
    end tell
    repeat with theFile in imagesToBeCopied
    try
    if (do shell script "find -r ~/copytest/dest -name " & quoted form of (theFile as string)) is not equal to "" then
    --The file exists. Don't copy it
    else
    --the file doesn't already exist. Copy it.
    end if
    on error
    return "Failed while trying to check for existence of a file"
    end try
    end repeat

  • PL SQL block - Check for empty file

    Hello,
    I need help in writing pl sql code to check a file to verify if it has 0 records (file size = zero kb.) In a preceding pl sql block, I am performing a SELECT on data and writing it to a file. If that file is empty/has no records, then I would like to stop the process from continuing on to my next pl sql block which performs an update function.
    Summary:
    1) Create file from SELECT
    2) Check file for zero data, if true, trigger error, if false, continue to next pl sql block.
    3) Run update on records if data exists in the file.
    Thanks in advance!

    Thanks John,
    You've been of great help so far and a really appreciate it. I'm so close to getting this, I just need help with how to create an error when the file shows no data. I will be running this as an Oracle Apps Concurrent request. I'd like for the job to end in error when no data exists for the file. In unix, I can enter "EXIT 1" and it signals to the concurrent manager to put end the job with an error status. How can I do something similar using pl sql? Here is my code so far, with the missing piece. Thanks!
    DECLARE
      vFile UTL_FILE.FILE_TYPE;
      vrecs BOOLEAN := FALSE;
      vnodata EXCEPTION;
    BEGIN
      vFile := UTL_FILE.FOPEN('/devlop, 'norecs.txt', 'w', 32767);
    FOR x IN (
    SELECT
         node_name AS txt
    FROM
         applsys.fnd_nodes
    WHERE
         node_name = 'blahblahblah'
    LOOP
            vrecs := TRUE;
            UTL_FILE.PUT_LINE (vFile, x.txt);
    END LOOP;
            UTL_FILE.FCLOSE(vFile);
            IF NOT vrecs THEN
                RAISE vnodata;
            END IF;     
    EXCEPTION
           WHEN vnodata THEN
        *<what can I put here to cause the pl sql block to error???>*
    END;
    /

  • [2514] Remote debugger asks for source file.

    I've been testing the fixed remote debug facility in the new release.
    It is now possible to connect to a remote session and start debugging, but as soon as I hit a breakpoint a dialog pops up saying that it is unable to find the source file for the package being debugged. It offers various options, including two 'Look for file in connection ....'
    and browsing for the source file.
    If I do a local debug first, this does not happen.

    We have a bug logged for "unable to find the source". You need to accept the dialog and select the connection you want to do the debugging on. For the other issue, we have multiple databases, with connections for users with the same name in each and have not run into the issue described. Please can you provide more detail.
    Sue

Maybe you are looking for

  • Software Cannot Connect to Internet in Windows 8.1 Pro x64

    I am not able to use FB poster & scheduler with my version of Windows 8.1 Pro 64bit. But my friend who have the same Windows can run this piece of software without any issue. I tried uninstalling my anti-virus, firewall exception list, trusted sites

  • No Incoming Calls on my New Verizon FIOS phone

    Just swicthed my home phone number from Another VOIP base vendor and home TV from Dish to FIOS, after amazing product details and promis of cerdit of 100$ ATM card. First Issue: No one in my friends can call me now except those who are already on Ver

  • Database Control consol(EM)

    I am using Oracle 10g Enterprise edition and after installation i create database with the DBCA.When i open database consol the address is http://localhost:1158/em. Now when i do the export it require host creaditional (username and password) what ar

  • Migrating from Open Transport to CFNetwork

    I have a Carbon application that still uses Open Transport (the application was originally developed for Mac OS 8/9). I would like to migrate to the CFNetwork services API as I no longer support 8/9 for this application. Does anyone know of a porting

  • M-audio device not detected

    I keep getting this message no matter what I do. Every time I try to op the M-audio firewire software, PT m-powered 7, I always get that message. "m-audio device not detected on this mac". I can't figure it out.