Can I poll an external process to see when it completes?

New to Java programming, I need to kick off an external program and want to monitor it to determine when it terminates. Is this doable using Process class? I'm using Process process = Runtime.getRuntime().exec(cmd); The method calls for Process did not look promising and process.waitFor(); is a blocking call which can cause the program to hang if enough output is not routinely read in.
Thank you for any suggestions.
Ronald

Ronald_Tutone wrote:
New to Java programming, I need to kick off an external program and want to monitor it to determine when it terminates. Is this doable using Process class? I'm using Process process = Runtime.getRuntime().exec(cmd); The method calls for Process did not look promising and process.waitFor(); is a blocking call which can cause the program to hang if enough output is not routinely read in.
Thank you for any suggestions.
RonaldRegarding the blocking call and hang possibility, you need to read this article and implement what it suggests:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Similar Messages

  • How can i open my external locked macbook pro when i have the code

    how can i open my external locked macbook pro when i have the code
    for fun i have external locked my mac, and now i dont know how to open it again :-(
    do someone know where i can write the code so it will work again?
    thankes

    www.itunes.com type that on your internet browser and download the newest version of itunes.

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

  • Need Schedule Lines for the External Processed Operation

    Dear All,
    In My routing, I have totally 10 operations. 2 of which are externally processed Operations.
    When i create Production Order, the system creates Purchase Requisitions for both the Operations.
    My client wants, Schedule lines to be created in the Production Order Operations.
    Please guide me where will be the settings to get this.
    Thanks & Regards
    Bala

    Hi,
    For schedule lines cofigration kindly check the following Path:
    Material management--  Purchasing--
    Schdulling agreement
    Here you need to do the cofigration of the following as per your requirements:
    Number ranges
    Docuemnt types
    Release procedure
    Screen layout ( if required)
    Authorization check for GL Account
    Regards,
    Syed

  • Can i connect a external hard drive to apple tv 3 generation, for see my movies itunes with out use streaming or icloud?

    can i connect a external hard drive to apple tv 3 generation, for see my movies itunes with out use streaming or icloud?  in apple tv 3 and 2?
    That  i want to know is i can connect a external hard drive to apple tv, for see my movies that i keep in my external hard drive,  i dont want to see then  whit the streaming and icloud, or used my  laptop o pc for access de movies and stuff.
    i put iny spanish to, because i feel my english is not so good, but i hope you understand me.
    if i can´t  connect a external hard  drive, wich others media players divices you know that can see itunes movies?
    ¿quisiera saber si se puede conectar una memoria externa al apple tv, para ver el contenido de itunes que tengo guardado en esa memoria como peliculas, ect?
    lo que no quiero es usar  la icloud, o el servicio streamig para ver mi contenido, ni tener que usar la computadora para ver mi contenido el la tv?
    y de no poderse conectar  que otros dispositivos media pleyer conoces para ver peliculas de itunes  en la tv?

    Welcome to the Apple Community.
    can i connect a external hard drive to apple tv 3 generation
    Unfortunately not.

  • Can SAP get material number in Purchase order in external processing?

    I have a question that:
    As I know, Exeternal processing is a service, so that Material number can not be shown in purchase order converted from PR for external processing. Here, PR can be automately generated from transaction CO01 to create an external processing production order. Meanwhile, for external processing, purchase info record is created without material number only with material group.
    So, I want to know that if there any solutions to show material number in purchase order generated for external processing?
    thanks,
    best regards,

    If therer are no production order, How can I get finished products from internal activity and external processing?
    Now, external processing in our company like this:
    1.create an purchase info record. (type:subcontracting, with material group, but not material ID)
    2.Maintan external processing data in external operation where external processing happens.(control key: pp02, external processing data: info record, purchase org. net price, cost element etc.)
    3.create a production order for the material.(one of the operations is an external processing operation described like step 2)
    4.Purchase requstion is changed into Purchase order. (Purchase requestion is automately created with the production order)
    5.MIGO to receive goods from the purchase order.
    6.finished the production order and delivery goods.then the production order is DLV.
    In step 4, purchase order can only get the production order ID, but there are no material ID shown in it. Only method to show material is that maintaining a description text in the external operation, then, purchase order item could show material in material text(but, here, there is no material ID derectly from info record or production order).
    this is the big problem now for our company. No material ID can be automately carried into the purchase order.
    Hope you help..
    thanks...

  • Why can't my MacPro 10.5.8 see external HDs?

    Why can't my MacPro 10.5.8 see external HDs that were previously used for backup on Time Machine on the same machine?
    I tried different cables and still nothing shows up in finder.
    I hooked up both drives to my my Mac Air via USB and they both show up along with the backup history.

    Still haven't hunted down the installastion DVD.  If it is a harware issue, then all connectors, USB, Firewire 400 and FW 800 are not functioning, yet another drive I hooked up to the FW800 works.
    Does it matter what version I boot to?  I have installation S/W from other Macs, but not this MP.   The OS has been upgraded along the way anyway, so it isn't exactly the same as the original installation, but still Leopard.

  • I copied my itunes library via an external hard drive. now when i connect my ipod to the new computer i can see my music but my apps are disabled

    i copied my itunes library via an external hard drive. now when i connect
    my ipod to the new computer i can see my music but my apps are disabled

    Here are the official Apple Support instructions:
    http://support.apple.com/kb/HT4527
    Ciao.

  • I recently changed my PC and I transferred my iTunes music library to an external disc. Now, when I open iTunes I can only see the music I've downloaded, but not the rest of my music. Whatdo I need to do?

    I recently changed my PC and I transferred my iTunes music library to an external disc. Now, when I open iTunes I can only see the music I've downloaded, but not the rest of my music. What do I need to do?

    PDMex wrote:
    I recently changed my PC and I transferred my iTunes music library to an external disc.
    Did you transfer the entire /Music/iTunes/ folder?
    Or did you only transfer /Muisic/iTunes/iTunes media? folder?

  • Error in using External Process in the Process Flow

    I Created a Process Flow with an external process to Move the file from one location to another location,
    I gave the below parameters for the External Process
    COMMAND: move
    PARAMETER_LIST: ?F:\\FlatFiles\\in\\company.txt?F:\\FlatFiles\\error\\company.err
    SUCCESS_THRESHOLD: 0
    SCRIPT:
    The environment is
    Windows 2003
    OWB 9.2.0.8
    OWF Builder 2.6
    When I deploy and execute using Deployment Manager, it gave me the below error
    Starting Execution TEST
    Starting Task TEST
    Starting Task TEST:EXTERNALPROCESS
    CreateProcess: move move F:\FlatFiles\in\company.txt F:\FlatFiles\error\company.err error=2
    Completing Task TEST:EXTERNALPROCESS
    Completing Task TEST
    Completing Execution TEST
    What am I missing something here?
    Is my Parameters correct?
    GIve me the link where I can find more on using External process.
    Please...please...help me..
    Shree

    Nikolai,
    I have created a simple process flow which only calls the external process. The script is on the same host as the process flow is deployed to.
    I have used two diffent values for the command parameter.
    1. I placed the full path of the file in the command parameter and left the script parameter blank:
    COMMAND: /edwftp/ppas/scripts/ClearPPAS.sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT:
    2.I placed the bash command in the command parameter and the full path in the script parameter.
    COMMAND: /usr/bin/sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT: /edwftp/ppas/scripts/ClearPPAS.sh
    Both of these appear to work as they print out the statements inside the script but the files that are supposed to be removed still remain.
    Starting Execution EXTER_FILE
    Starting Task EXTER_FILE
    Starting Task EXTER_FILE:EXTERNALPROCESS
    Removing ActivatedAudit.dat...
    Removing ActivatedCustomers.dat...
    Removing ActiveAudit.dat...
    Removing ActiveCustomers.dat...
    Done!
    Create the Activated Customers data file...
    Create the Active Customers data file...
    Done!
    WARNING: Log file truncated - see RAB for further information.
    /edwftp/ppas/scripts/ActivatedCustomers.sh: /edwftp/ppas/log/ActivatedCustomers.log: cannot create
    /edwftp/ppas/scripts/ActiveCustomers.sh: /edwftp/ppas/log/ActiveCustomers.log: cannot create
    WARNING: Log file truncated - see RAB for further information.
    Completing Task EXTER_FILE:EXTERNALPROCESS
    Completing Task EXTER_FILE
    Completing Execution EXTER_FILE
    The permissions on the /log direcotry are 775. The user I register the file location with owns this directory.
    Can't think of anything else I have missed. I really appreciate your help :)
    Ryan

  • S.O.S PROBLEMS COMUNICANTING EXTERNAL PROCESSES IN JAVA UNDER LINUX

    I've programmed a little program in C called "cinterpreter" which works like
    an interpreter, when it launches it shows a welcome message to the display
    (standart output), then is always waiting for strings from the keyboard
    showing the length of the input strings until the "quit" string is received,
    in that case the C program named "cinterpreter" finish, here we can see the
    code:
    # include <stdio.h>
    # include <string.h>
    # include <stdlib.h>
    char presentacion[8][80] = {
    " ||||||||||||||||||\n",
    " --- Welcome to Maude ---\n",
    " ||||||||||||||||||\n",
    " Maude version 1.0.5 built: Apr 5 2000 15:56:52\n",
    " Copyright 1997-2000 SRI International\n",
    " Thu Aug 9 13:40:25 2001\n",
    " \n",
    " \n"};
    void longitud(char * cadena)
    int t;
    for(t=0;t<3;t++)
    printf("MAUDE_OUT> la cadena %s tiene %d caracteres\n",cadena,strlen(cadena));
    fflush(stdout);
    int main()
    char cadena[80];
    int i;
    char ch;
    for(i=0;i<8;++i) printf("%s",presentacion);
    printf("\n");
    fflush(stdout);
    do {
    printf("Press any key to continue\n");
    scanf("%c",&ch);
    printf("%c\n",ch);
    fflush(stdout);
    }while (ch != 'q');
    printf("\n");
    while( strcmp(cadena,"quit") !=0)
    printf("\nMAUDEENTRADA>");
    fflush(stdout);
    scanf("%s",cadena);
    longitud(cadena);
    I'm intereted in running this program, control it's standart input and
    starndart output through a java program through the Runtime , process class
    and the correponding methods like "exec", getInputStream, getOutputStream,
    getErrorStream, the question is that I do not Know what I'm doing wrongly but
    I don't get what I want, I'm interested in sending input to the C subprocess
    thorugh its stdin getting it by getoutputStream method, and then read its
    answer from its stdout getting it by getoutputStream, then question is that I
    can sent de first string and read the first answer but I can't repeat it
    again, and I would like to begin a dialog with the subprocess so I need to
    send many messages and receive its answer to it, but many times, not just one,
    by the moment I got it but just one, if any body can help with this please
    answer the question or send any answer to the next adresses
    e-mail:
    [email protected]
    [email protected]
    *************** java code **********************
    import java.io.*;
    public class mioss {
    static String proceso = "/bin/cinterprete";
    static Process p = null;
    //--------- input writting method -----------
    static void escribe(OutputStream procesoescribe, String s) {
    BufferedWriter laentrada = new BufferedWriter(new
    OutputStreamWriter(procesoescribe));
    try{
    laentrada.write(s + "\n");
    laentrada.flush();
    }catch(IOException e) {System.out.println("error de escritura");}
    //----------- output reading method ---------------
    static void leesalida(InputStream procesosalida){
    String l;
    BufferedReader lasalida = new BufferedReader(new
    InputStreamReader(procesosalida));
    try{
    while ((l = lasalida.readLine()) != null){
    System.out.println(l);
    } catch(IOException e) {System.out.println("error de readline");}
    //------------- reading error method --------------------
    static void leerror(Process p){
    String l;
    BufferedReader elerror = new BufferedReader(new
    InputStreamReader(p.getErrorStream()));
    try{
    while ((l = elerror.readLine()) != null){
    System.out.println(l);
    elerror.close();
    } catch(IOException e) {System.out.println("error de readline");}
    //--------------- principal method main -------------------------
    static Process proc = null;
    public static void main(String [] Args) {
    try{
    Runtime r = Runtime.getRuntime();
    proc = r.exec(proceso);
    escribe(proc.getOutputStream(),"map(+2)[3,3]");
    leesalida(proc.getInputStream());
    escribe (proc.getOutputStream(),"map(*3)[2,2]");
    leesalida(proc.getInputStream());
    }catch(Exception e) {System.out.println("error de ejecucion del
    proceso");}
    System.out.println("THE END OF THE PROGRAM");

    The problem is with the leesalida method.
    There you are reading form the output sream of the process usingBufferedReader.readLine.
    readLine returns null only when it gets to the end of the stream, or here the stream ends only when the external processes ends.
    You can modify your code like this:
    public class mioss {
        static String proceso = "cinterprete";
        static Process p = null;
        //--------- input writting method -----------
        static void escribe(OutputStream procesoescribe, String s) {
         BufferedWriter laentrada = new BufferedWriter(new
             OutputStreamWriter(procesoescribe));
         try{
             laentrada.write(s + "\n");
             laentrada.flush();
         }catch(IOException e) {System.out.println("error de escritura:" + e);}
        //----------- output reading method ---------------
        static void leesalida(InputStream procesosalida, int nLines){
         String l;
         BufferedReader lasalida = new BufferedReader(new
             InputStreamReader(procesosalida));
         try{
             while(nLines-- > 0) {
              l = lasalida.readLine();
                    System.out.println("from java:\t" + l);
         } catch(IOException e) {System.out.println("error de readline");}
        //------------- reading error method --------------------
        static void leerror(Process p){
         String l;
         BufferedReader elerror = new BufferedReader(new
             InputStreamReader(p.getErrorStream()));
         try{
             while ((l = elerror.readLine()) != null){
                    System.out.println(l);
             elerror.close();
         } catch(IOException e) {System.out.println("error de readline");}
        //--------------- principal method main -------------------------
        static Process proc = null;
        public static void main(String [] Args) {
         try{
             Runtime r = Runtime.getRuntime();
             proc = r.exec(proceso);
             leesalida(proc.getInputStream(), 9);
             escribe(proc.getOutputStream(),"first");
             leesalida(proc.getInputStream(), 4);
             System.out.println("Done first !\n");
             escribe (proc.getOutputStream(),"second");
             leesalida(proc.getInputStream(), 4);
             System.out.println("Done second !\n");
         }catch(Exception e) {System.out.println("error de ejecucion del proceso");}
         System.out.println("THE END OF THE PROGRAM");
    } Regards,
    Iulian

  • Production operation external processing goods receipt for subcontract PO

    Hi PP/MM experts,
    I searched for existing forum entries but no luck or final answer.
    I have a question about the goods receipt for a subcontracting PO that is account assigned to an operation of a production order (external processing for operation).
    The following situation:
    Production order type PP02 - external processing
    There is only one operation in the production order with control key PP02 - external processing. I marked the control key PP02 in configuration for 'Automatic goods receipt'.
    I created a PO for the PR is the operation
    When I'm doing the goods receipt of the subcontrating PO a 101 posting is triggered for the finished product and components are consumed by 543 O movements. So far so good. But the inventory for the finished style is not increased. In MIGO I even see that even a batch number for the finished product is determined. Looks like that only the service is posted but not the inventory. I assumed when I mark the operation contol key for 'goods receipt' that the MIGO will also post the inventory for the finished style.
    Reason for PP order and not only subcontract order is that we want to manage capacities of external suppliers with PP capacity planning.
    Is that a bug in our system or normal behaviour? We use SAP ERP 6.5 with IS AFS.
    Thanks in advance for your answers.
    Best Regrads,
    Harry

    Hi Rizzi and all others,
    thanks for your replies.
    I'm using a production order for the following reasons:
    We want to use capacity planning for external suppliers. At least to have some overview of work they have to do in a month
    The external assembly can also be changed to internal assmebly and for that reason we will start always with the same kind of document -> production order.
    But one more thing what is really confusing. In the materials document list MB51 the 101 movement for the service is listed even if the inventory was not increased. That is really confusing for the users.
    Best Regards,
    Harry

  • Can I use  an external hard drive instead of replacing a defective one?

    I'm almost certain I need another hard drive; the current one has been installed less than a year. I'm experiencing regular kernel panics; i've done a clean reinstall.
    Can I use an external HD as my main drive? Other than the kernel issues, everything else works fine
    Message was edited by: joell109

    Has using information on 'resolving kernel panics' helped to
    define or troubleshoot the list of potential causes of these;
    or has the process been partly a guess?
    resolving kernel panics - troubleshooting the issue:
    http://www.thexlab.com/faqs/kernelpanics.html
    Poor or under-qualification RAM, failed or unable to work
    in a later system than a computer was first shipped with,
    can lead to kernel panic issues. So can a combination of
    software that is incompatible. And if there is a problem in
    how the computer reads and writes data to and from the
    hard disk drive, it may be putting corrupted data on the HD.
    {And the logic board or hardware data flow controller (ATA)
    may be defective in such a way as to cause kernel panics..}
    An over-full hard disk drive could be damaging the content
    of the drive in such a manner (due to over-writing content
    and the system being cannibalized) as to cause failures.
    What brand of hard disk drive have you installed into there?
    An external hard disk drive within a FireWire enclosure, one
    that is self-powered so it is on before the computer (and you
    have to consider carefully how you detach or attach it to the
    Mac, since these have to be unmounted a certain way, etc)
    and perhaps large enough in capacity to have it partitioned
    so as to give you a backup location for items or utilities that
    can run from the computer to help you maintain it, etc.
    The externally enclosed FireWire hard disk drive, with AC
    power adapter, and cables, should be able to boot the Mac.
    Not all can do that... ones with a chipset similar to those
    known as 'oxford chipsets' can do this. That is the first test
    to do when you get a FW external HD drive, is to see if it
    can do this primary task with a boot volume installed.
    You can make nice clones, too, if you have a healthy FW
    externally enclosed HDD, a bootable one, & self-powered.
    Mine are full-computer clones; not just the OS, and not
    just the file changes such as a simple backup may provide.
    Carbon Copy Cloner by Bombich is a good tool to have.
    And there are others.
    If your computer is essentially eating hard disk drives and
    there are kernel panics within a relatively short period of
    operational time, there may be something else involved.
    A vintage Disk Warrior may be helpful, if you can find one
    that will work with the current OS on the computer and
    also on the hardware you have, to look into the HDD.
    And the original Mac OS software set included with that
    computer shipped with an Apple Hardware Test... also,
    system logs should indicate the chain of failure; but those
    are often cryptic and few people grasp their messages.
    Good luck & happy computing!

  • I can't format my external hard drive, some one please help me.

    i can't format my external hard drive, when i am trying using disk utility its some times not showing the erase option. when its shows erase option its saying earase failed can not unmount the disk.

    Repair the Hard Drive and Permissions - Mavericks, Lion/Mountain Lion
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.

  • Tracking of wip material in externally processed operation

    Hi All,
    As part of production process, most of the operations would be processed internally in the manufacturing plant and some of the operations would be
    performed by vendor at his own premises (outside the manufacturing plant). Material will be called as WIP (work in process) material if it completes some of the operations (two operations completed out of four operations) in production process without forming its final product shape
    WIP (work in process) material will be sent out to vendor against externally processed operation in production order. We’ve a business requirement to track the WIP (Work in Process, No inventory yet in system) material status details such as when was the WIP material shipped out to service provider by purchasing department or returned back to production floor from stores after receiving from vendor for externally processed operation in production
    order
    The scenario is explained below and the process in SAP would be as follows.
    1. Production order would be created for
    respective header material (semi-finished/finished) with required quantity with five operations to be processed, for example: OP10 (turning), OP20 (drilling), OP30 (milling), OP40 (shaping), OP50 (powder coating). OP10, OP20, OP40, OP50. would be processed internally in the shop floor of the manufacturing plant
    2.After finishing the internal processing at OP10 and OP20,  Operation no 30 (OP30-milling) for the respective header
    material would be processed externally by sending the partially processed part(WIP) to vendor outside the manufacturing plant. In SAP, the partially processed part doesn't have any material code and will not be updated in the inventory and will be treated as WIP (work in process) and automatic purchase requisition for external processing through production order is generated as follows
    For OP30 Milling (Externally processed operation), from PP module perspective, we would be maintaining a control key which supports external
    processing in the Operation 30 (OP30, external processed operation - An externally processed operation is not carried out within own organization, but is assigned to a vendor, who then does the work) with relevant information such as material group, purchase group, description of operation, cost element to track costs in the production order.
    When the respective production order is saved, system creates a purchase requisition for external processed operation 30. We can see
    the number of the purchase requisition on the external processing tab of operation details screen of OP30 in SAP Production order.
    Purchasing department generates a purchase order against the automatic purchase requisition generated in production order, which informs the
    vendor which service is required.
    With reference to the purchase order – service oriented, the WIP material (no material code exists in SAP) is sent out to vendor. After the material has been processed, the vendor delivers the material back to manufacturing plant. When a goods receipt against purchase order is posted at manufacturing plant, the system displays the received quantity on the external processing tab of operation details screen of the operation - OP30 in production order and also displays in order information system reports. It also possible to track the cost incurred for external operation. However, Goods receipt against production order does not cause an increase in the quantity and value of the warehouse stock of header material of production order.
    The above mentioned process is not a subcontracting process - where in we send raw materials and receive semi-finished/finished materials from vendor
    3. The respective partially processed part (WIP) received from vendor is sent to shop floor to complete the rest of the process
    in OP40 (shaping) and OP50 (powder coating).
    4. After OP50, the respective header material (semi-finished/finished) of the production order will be received (goods
    receipt against production order) as inventory in respective storage location.
    With reference to the above process, we can track the status of receipt of WIP material from vendor after processing at his premises;
    however, we can’t track when WIP material ( after completing processing at OP20) was sent out to vendor for external processing by purchasing department and when WIP material was returned back to production shop floor for further processing at OP40 after receiving from vendor by stores.
       Please provide your feedback for the possibility to track the details of WIP material (no material code exists in SAP system) sent out to
    vendor and received back at shop floor from stores for external processed operation of production order
    Thanks for help in advance.
    Regards,
    Rajesh

    Hi Rajesh,
    Process what ever you have explained is the right process with respective to operation wise subcontracting as per SAP Best practice. As you rihtly said in operation wise subcontracting PR is created with any material code. Once PR is created after PO and GR actual cost of that particular operation will be seen on the order. I believe sub contact operation after GR can be confirmed through confirmation transactions. Since it is subcontract operation specfic to peration seperate inventory is not tracked instead cost is reflecting directly on order
    If you to want to track the inventory of the intermdiate product then you need to have a seperate material code for intermediate product (Eg A) received after second operation and do seperate subcontacting PR for seperate new material (Eg B) by issuing the intermediate material (Eg. A). Upon receivng GR for PO inventory will be updated for the new material (Eg B).This new material can be issued to your final product which has operation 0040 and 0050. Here two different material codes will be required.
    Else follow the suggestion given by expert Caetano.
    Thanks & Regards,
    Ramagiri

Maybe you are looking for