OS command in Process Chain

Hi all,
I'm using the OS Command in a process chain and I have the "Evaluate Output of Command" checked along with It will be repeated" selected.  It's looking for a file on the app server and repeating every 3600 seconds for 24 hours.  The issue is if the 24 hours goes by and no file is found the process chain continues on to the next Process.  I expecting the chain to stop with errors.  Is this the correct functionality?  If so, any ideas how I can stop the process if the repeat time is exceeded and file not found?
Regards,
Dae Jin

Hi Dae,
   Try this way. Separate present Process chain into two chains.
   Create an ABAP program to trigger OS Command and an event(EVENT1) on success of finding the file or another event(EVENT2) if file not fround and to repeate the process to find the file.
   Create first chain, and make it event based(EVENT2) and create 2nd chain aldo event based(EVENT1).
activate and schedule both chains event based. trigger the first chain. It will check the file and if it is success ABAP program raise and event(EVENT1) and it will trigger the 2nd chain. or it will raise the event(EVENT2), it will reapete the 1st chain for finding the file.
  So here 2nd chain triggers on EVENT, so time limit. And it only excutes if first chain picks the file successfully,
Hope it Helps
Srini

Similar Messages

  • Failure of OS command in Process Chain

    Hi All,
    I have OS command in a process chain. Sometimes this process gets failed and sometimes it is completed successfully.
    When it fails following message appears in Process Chain Maintenance Log View:
    ==== Output of System Commands: Repeat # 0 ====
    mv: cannot stat `/usr/sap/transBD1/upload/BP1/StockPosition/StockPosition_BNL.txt': No such file or directory
    External program terminated with exit code 1
    Kindly reply if anyone has any idea about it.
    Many Thanks in advance.!
    Regards,
    Swati Ramteke

    Hi Vikram and Srinivas
    In the process chain, file is first loaded to cube from the specified path. There is no problem in loading, it is completing successfully.
    Next, this file is archived from specified path to archived folder by OS Command.
    OS Command is:
    #!/bin/ksh
    FILEDATE=`date +%m%d%y`
    mv /usr/sap/transBD1/upload/BP1/StockPosition/StockPosition_BNL.txt /usr/sap/transBD1/upload/BP1/StockPosition/processed/StockPosition_BNL.$FILEDATE
    The file is archived successfully in processed folder but OS command process in process chain is getting failed with mentioned error in previous thread.
    Regards,
    Swati

  • System command in Process chain

    Hello,
    I have a system command in the process chain which points to a command file that is supposed to run. My problem is that when I transport the PC, the path on the system command remains same.
    I want it to change the path from /md.... in dev to /mq... in QA and /ma... in PROD.
    Is there anyway to automate this process? Right now i have to keep track of it and change the system command in each system. I have missed a couple and it creates some problems.
    Thanks
    Sam

    Hello Sam,
    One way to solve this is to work this with your UNIX administrator.  You can do the following:
    1) Create a symbolic link in your dev, qa, and prod which points to the correct directory.
    For example, in dev, you can do the following:
    link -s <whatever new name here, e.g. target>  /md
    In QA, you can do the following:
    link -s <whatever new name here, e.g. target>  /mq
    and so on..
    2) Instead of using the /md, /mq directories, you can use the symbolic directory instead in your system commands.
    e.g.   ls -l /target   instead of ls -l /md
    This might not help you a lot now but it will make things easier in the future because you will know that the symbolic link points to the correct directory of whatever box.
    Hope this helps.

  • Process chain 'OS COMMAND'

    Hi
    I would like to use the OS_COMMAND in process chain to rename file to another filename after data loaded from file into the targeted cube. Eg: I would like to delete brand.txt from folder named /interface/.
    I would like to create the command name via tcode SM49. However, I did not know the command to enter in fields 'Operating system command' and 'Parameters for operating system command'. Can anyone please guide me?
    Thanks and regards
    Kang Ring

    Hi,
    You can find System OS command process type in Other Processes section of RSPC.here you can add the same in your process chains and fulfill your requirement.
    hope this is clear for you.
    Regards
    Ramsunder

  • Info Spoke - Process Chain - OS Command usage help

    I am new to BW. My requirement is to extract the master data off of BW data targets on a weekly basis and ftp the files onto a different server.
    To meet this requirement, I am planning to create InfoSpoke(s), put it in a Process chain and using the OS Command ftp the files to different server.
    Is this the right way to do it or are there any better ways? If it is, I need help on where to give the target server name, user_id and PSW in the OS Command variant of Process Chain.
    Also, is it possible to schedule a Infospoke directly from the scheduler (Auotsys...) and still execute weekly/monthly?
    Thanks for your help in advance
    RK

    That's correct.  You'll define the command under the general services tab in the process chain transaction (It's labeled OS Command and is a silver circle thing with a blue dot in it).
    When you drag it into the process chain it will ask for a varient.  In the System Command field for this varient is where you'll define the actual command. (little pencil button next to it).  At this point you can call a script that does the copy or call an actual command that does the copy. 
    Might be easier to control with a script that does the work but if you want to call rcp/scp, the os command will be rcp and parameters will be the filename, etc.  If it's a script then you'll just enter the name of the script in the os command field.
    Hope this helps.
    -bill

  • Process Chain/OS command issue

    Hello,
    I am trying to execute a command similar to the following in an OS command in a process chain:
    cp /path/filename*.txt /path/filenamexxx.txt
    I know it's not a permissions problem.
    This is the error message from the Process Chain Maintenance Log View:
    cp: cannot access /path/filename*.txt: No such file or directory
    External program terminated with exit code 1
    I'm thinking it is a problem with the *(wildcard). If I take out the *(wildcard) it works flawlessly. It seems like SAP is not correctly interpreting the * character.
    The purpose of my doing this is to remove the date text from the end of the file and store it in a different directory without the date text. e.g.
    filename08032006.txt copy to different directory as filename.txt
    Any help will be greatly appreciated.
    Thanks,
    Gary Martins

    hi,
    i do not know what process cain maintenace view is but I wonder how this command should work on the commandline correctly:
    say you have
    filename_1.txt
    filename_2.txt
    and copy them according to your example to
    filename_x.txt
    This would be n files copied to one destination file. At best you had the destination overwritten n times and be left with the last source file in the destination file.
    Would that make sense? Probably therefore this construct is not supported.
    just my 2 cents,
    anton

  • Process Chain/OS Command cp problem

    Hello,
    I am trying to execute a command similar to the following in an OS command in a process chain:
    cp /path/filename*.txt /path/filenamexxx.txt
    I know it's not a permissions problem.
    This is the error message from the Process Chain Maintenance Log View:
    cp: cannot access /path/filename*.txt: No such file or directory
    External program terminated with exit code 1
    Any help will be greatly appreciated.
    Thanks,
    Gary Martins

    Hi Gary,
       Is this file(cp /path/filename*.txt /path/filenamexxx.txt) avaialble at perticular path...??
       File is in application server or workstation(PC). If file is available in one application server and your Pchain running againest another application server, you may get this error. Plz check.
    Hope it Helps
    Srini

  • How to create an OS command that can be used in the process chains

    I need to create a command that can copy files from one location to another for a unix machine.
    I have the commands for the unix machine, but need to create a Z customer command so it can be executed in a process chain in SAP

    Hi Again,
    You can use ABAP program in the process chain.
    I guess there are some OS level commands in ABAP which will allow you to open, close, read , write and move files.
    Serach in ABAP help or on net.
    Bes regards,
    Sunmit.

  • Need to add a command file in process chain

    Hi,
    I have cmd file on the network that will be used to specify which staged data has been successfully loaded to BW.  At the end of the process chain which loads our daily data, this cmd file should be executed. I have never done this before, does anyone have any idea as to how i can include this file in the Process Chain? There are 2 files in that directory; .cmd and .out. Do I need both these files?
    Thanks
    Sameer

    There is OS command provess available in process chai, but i think you cannot use a command file; you have to use more time OS command with single command each time.
    Hope it helps.
    Regards

  • Process chain tables and tcodes

    Hi frinds,
    can any one send me the process chain tables and tcodes . plzz
    regards,.
    rajesh
    my mail id is [email protected]

    Hi Rajesh,
    Process chain tables:
    RSPC_BUFFER Shared Buffer for Processes (Esp. Customer
    RSPC_MONITOR Monitor individual process chains
    RSPCABAPASYNC Logging for ABAP Processes(Synchronously a
    RSPCCATEGORY Process Type Categories
    RSPCCATEGORYT Texts for Category
    RSPCCHAIN Process chain
    RSPCCHAINATTR Attributes for a Process Chain
    RSPCCHAINEVENTS Multiple Events with Process Chains
    RSPCCHAINT Texts for Chain
    RSPCCOMMANDLOG System Command Execution Logs (Process Cha
    RSPCENQUEUE Dummy Table for Runtime Locks of a Process
    RSPCEXOR Excluding Or: Log Table
    RSPCINFO Special Values for Communication between P
    RSPCINFOT Special Values for Communication between P
    RSPCINSTANCE Generic Instance Storage
    RSPCINSTANCET Texts for Generic Instance-Storage
    RSPCLOGCHAIN Cross-Table Log ID / Chain ID
    RSPCLOGCROSS Cross-Table Log ID Old / Log ID New
    RSPCLOGS Application Logs for the Process Chains (G
    RSPCPROCESSLOG Logs for the Chain Runs
    RSPCRUNVARIABLES Variables for Process Chains for Runtime
    RSPCTRIGGER Variants for the Trigger Processes
    RSPCTRIGGERT Texts for the Trigger Variants
    RSPCTYPESDEP Dependencies for Processes
    RSPCTYPESPROC Attributes of BW processes (RSSM)
    RSPCVARIANT Generic Variant-Storage
    RSPCVARIANTATTR Attributes of a Process Variant
    RSPCVARIANTT Texts for Generic Variant Storage
    Regards,
    R.Ravi

  • Issue with ABAP program execution from process chains

    Hi All:
    We have a process chain with 3 steps, each of them executing the same program with three different variants. The program is ftp's the file from APO's dataexchange (mount) to another ftp server. The first variant transfers file A to a directory in the external ftp server (say /X) . The second and the third variants are supposed to transfer different files, B and C to the same directory.
    That is where the problem is. After the process chain is successful, I see two files B and C but the contents are same and that of C. So, if I switch the steps in the PC to bring in A then C and then B, I see files B and C with content of C. I tried C then A then B. I see the file names correct but now the contents are A, A then B.
    Have any of you come across this issue? Do you know that these is an existing problem? IF you have a solution, pl. let me know.
    Thanks
    Narayanan

    Narayanan,
    Instead of doing it in three steps - would it be possible for you to have one UNIX script or equivalent doing the above and calling the same from your process chain ...?
    We do a lot of FTPs but then our file names are standard and we have a UNIX script for the same executed using a system command through a process chain and it has been working without issues for the past 1 year ...
    Maybe I have not got your situation properly ... some more detail on the program details and what you are doing in more detail would help....  also SP levels please..

  • Status of Abap program in process chain

    Hi,
    Is there a way to create process chain of type abap program that determine what the status of the process? In other words, to decide what the status color of the process (red/ green) according to some conditions in the code?
    Thanks,
    Mohamad

    Hi,
    look at this how to
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/509f3ae6-e36e-2910-48a8-ab43dc167dd9
    also:
    1.create a custom defined abap process type which ends correct or invalid
    2. create an abap whith 'E' message command (ends incorrect/red) or 'I' message tpye (ends correct/green)
    /manfred

  • OS command in proces chain

    Hi,
    has anybody experience with runnig unix command from proces chain?
    I tried to do this, but nothing hapened.
    Where should be a problem?
    Thanks
       RH

    Hi,
    Go through this
    Including an OS Command as a Process in a Process Chain:
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/ec745009de3c418dc3f61dd44257d0/content.htm
    Regards-
    Siddhu

  • Process chain to trigger automatically after file arrives in AL11.

    Hi All,
    There is a text file(.txt) which comes from mainframes team every Sunday between 11 AM to 6 PM and gets placed in AL11 inbound directory following which we manually trigger a process chain which uses this file.
    The requirement is that this chain should trigger automatically after the file arrives in AL11 in BW.
    Is it necessary for the mainframe team to send another control file or some other file in addition to the text file to trigger this process chain..?
    Is there any other way the process chain can be triggered in BW without any changes required from the mainframe team.
    Additional information:
    Also I came to know that this can happen through some system command statements using SM49 we can schedule this chain.
    Else can some ABAP Program code be used to make this process automatic?
    Please help me.

    Hi,
    You can do the following, in your process chain change the start variant and make it event dependent. Now you can do the following,
    1) Create a table in SE11 which will have fields like Process chain name and execution date as primary fields. This table will be used further for checking purpose.
    2) Now create a ABAP program as shown in below given article, in this program in addition to raising an event you will have to read the file from app server.
    3) If program can read file from app server means you will raise an event and make entry in above table for preventing further execution of process chain. If program can't read file from app server then program will simply end without doing anything.
    4) Now you can schedule this program after every hour or 30 min. as per your requirement, the program will first check if the process chain execution entry exists in the above 'Z' table or not. If entry exists means the process chain has been already executed and the program will be terminated.
    5) You can use FM to read data from app server. You need to be careful while placing file on app server, because it has to be different naming convention or something else to identify that the current day file is available.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a01cc44a-5aac-2d10-3eaa-a3bbf645d25c?QuickLink=index&overridelayout=true]
    Regards,
    Durgesh.

  • On general services of process chain

    hi bw guys i have doubt on general services of process chain. In general services one process is OS Command there.Is there any scenario for this os command process.please reply me if u know the scenario?  thankyou

    Hi,
    You can use this process type to place an external command in an application serveru2019s operating system.
    Check this:
    Including Operating System Commands as Processes in Process Chains:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b8/ec745009de3c418dc3f61dd44257d0/frameset.htm
    Hope this helps.......
    Rgs,
    Ravikanth.

Maybe you are looking for

  • How to remove old MS Virtual PC resources

    Hi, I'm getting FileSyncAgent errors in the Console from an old VirtualPC bundle file. How do I discover what file is making this call, to then clean it up? 07/12/2010 11:34:17 FileSyncAgent[1702] Error loading /Library/Plug-ins/DiskImages/VirtualPCD

  • Slider doesnt seem to be good scrubbar

    So I have been attempting to use a hslider for a scrubbar using raw video and UIComponent in flex 2. Using the slider control as a seekbar doesnt seem efficient to the below. livedragging doesnt seem to work well because there are too many calls to s

  • Email Sales order link from SAP Work Place

    Dear SAP Gurus, Well guys i have to mail the sales order link through the work place but its not working for the sales order. but its working for delivery order and billing document...so i want to know that why its not working? Regards, Mohsin

  • Memory leak in String(byte[] bytes, int offset, int length)

    Has anyone run into memory leak problem using this String(byte[] bytes, int offset, int length) class? I am using it to convert byte array to string, and I am showing memory leak using this class. Any idea what is going on?

  • Sticky This : Surround Sound coming out of front speakers and Subwoofer not work

    The problem with Creative forum moderators and the like is that they have used their products so often that they forget the basic really simplistic things and as a result have a lot of frustrated customers (As indicated by the number of?problem posts