Bapi_prodord_get_detail

Hi all,
I'm trying to use bapi_prodord_get_detail to get toos and Prts documents.
I want to see the connection between Operations and their documents. The documents are shown in one level, as if they were attached to the header,
Any Ideas? Mybe use another bapi?
Thanks, Shim

I Done it. THank you for all.

Similar Messages

  • Problem while executing BAPI_PRODORD_GET_DETAIL through JAVA using JCo

    Hi All,
    I am trying to get Production Order details in JAVA program using JCo. Following is the code I have written.
    JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
    JCoFunction function = destination.getRepository().getFunction("BAPI_PRODORD_GET_DETAIL");
    if(function == null)
    throw new RuntimeException("BAPI_PRODORD_GET_DETAIL not found in SAP.");
    function.getImportParameterList().setValue("NUMBER", 1067831);
    JCoStructure struct = com.sap.conn.jco.JCo.createStructure(destination.getRepository().getStructureDefinition("BAPI_PP_ORDER_OBJECTS"));
    struct.setValue("HEADER", 'Y');
    struct.setValue("POSITIONS", 'Y');
    struct.setValue("SEQUENCES", 'Y');
    struct.setValue("OPERATIONS", 'Y');
    struct.setValue("COMPONENTS", 'Y');
    struct.setValue("PROD_REL_TOOLS", 'Y');
    struct.setValue("TRIGGER_POINTS", 'Y');
    function.getImportParameterList().setValue("ORDER_OBJECTS", struct);
    function.getImportParameterList().setValue("COLLECTIVE_ORDER",'Y');
    try
    function.execute(destination);
    catch(AbapException e)
    System.out.println(e.toString());
    return;
    JCoStructure returnStructure = function.getExportParameterList().getStructure("RETURN");
    if (! (returnStructure.getString("TYPE").equals("") ||
       returnStructure.getString("TYPE").equals("S") ||
       returnStructure.getString("TYPE").equals("W")) )
    System.out.println(returnStructure.getString("MESSAGE"));
    JCoTable codes = function.getTableParameterList().getTable("HEADER");
    int iCnt = codes.getNumRows();
    System.out.println("No Of Rows " + iCnt);
    int iFldCnt = codes.getNumColumns();
    JCoMetaData codesMD = codes.getMetaData();
    for (int i = 0; i < codes.getNumRows(); i++)
    codes.setRow(i);
    // Display the data
    The number which I am passing is a valid production order. When I test this BAPI in SAP gui with same input, it gives back the data but when I try to run this through java I always get the return message as this production order does not exist. Is there anything wrong I am doing?
    I am using JCo 3.0
    I have tried passing various values to ORDER_HEADER structure. I have tried getting the structure from import parameter list and then setting the values on that itself. Nothing has worked for me.
    Thanks,
    Dayanand

    The problem is solved. I just set the order number as string and added 0s before the order number to complete the required length. Also I changed the setting import structure for order header. Each field in the structure should have value as 'X' or ' '
    JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
    JCoFunction function = destination.getRepository().getFunction("BAPI_PRODORD_GET_DETAIL");
    if(function == null)
    throw new RuntimeException("BAPI_PRODORD_GET_DETAIL not found in SAP.");
    function.getImportParameterList().setValue("NUMBER", "000001067831");
    JCoStructure struct = com.sap.conn.jco.JCo.createStructure(destination.getRepository().getStructureDefinition("BAPI_PP_ORDER_OBJECTS"));
    struct.setValue("HEADER", 'X');
    struct.setValue("POSITIONS", 'X');
    struct.setValue("SEQUENCES", 'X');
    struct.setValue("OPERATIONS", 'X');
    struct.setValue("COMPONENTS", 'X');
    struct.setValue("PROD_REL_TOOLS", 'X');
    struct.setValue("TRIGGER_POINTS", 'X');
    function.getImportParameterList().setValue("ORDER_OBJECTS", struct);
    function.getImportParameterList().setValue("COLLECTIVE_ORDER",'X');
    try
    function.execute(destination);
    catch(AbapException e)
    System.out.println(e.toString());
    return;
    JCoStructure returnStructure = function.getExportParameterList().getStructure("RETURN");
    if (! (returnStructure.getString("TYPE").equals("") ||
       returnStructure.getString("TYPE").equals("S") ||
       returnStructure.getString("TYPE").equals("W")) )
    System.out.println(returnStructure.getString("MESSAGE"));
    JCoTable codes = function.getTableParameterList().getTable("HEADER");
    int iCnt = codes.getNumRows();
    System.out.println("No Of Rows " + iCnt);
    int iFldCnt = codes.getNumColumns();
    JCoMetaData codesMD = codes.getMetaData();
    for (int i = 0; i < codes.getNumRows(); i++)
    codes.setRow(i);
    // Display the data
    Regards,
    Dayanand

  • Enquiry in bapi

    Dear all,
    I am calling these 2 bapi's in my program
    BAPI_PRODORDCONF_GET_TT_PROP,
    BAPI_PRODORD_GET_DETAIL.
    Due to this Bapi's report is very slow.
    How can I improve the performance of my report?
    Regards,
    Pooja

    Hi Pooja,
    I agree to the suggestion given adding to that Check with the individual BAPIs too.
    BAPI_PRODORDCONF_GET_TT_PROP :Propose Data for Time Ticket Confirmation 
    it took nearly 6 lak microsecs.
    BAPI_PRODORD_GET_DETAIL: Order detail data
    better to check the where list of these BAPIs also will give u hint the required field too
    code check with SCI and also have a trace
    ST05 .
    May help u.
    Cheers
    Mohinder Singh

  • Is there anyone who can help me out in this!!!!

    Trying this for the fourth time........
    Hi gurus,
    I have posted this thread earlier also but didnt get any response, so I was just wondering did I ask something unrealistic?
    Hi gurus,
    I am working on an interface where I will be getting the production order number and then based on this order number I need to update some fields in transaction code ... CO11N...such as Quantity produced, reason of variance, batch number and posting date. So what I believe is first I need to pass the order number to the BAPI_PRODORD_GET_DETAIL to get the details of the production order and then update the production order by using the BAPI_PRODORDCONF_CREATE_TT, but my problem is I am new to ABAP I got to know what should be the process but I am not being able to implement it. So basically the program needs to pick the data from the internal table and copy it in SAP. My internal table looks liks
    data : BEGIN OF it_input occurs 0,
    order_no like afko-aufnr, "Order Number
    opr_no like afru-vornr,
    quant like afru-lmnga,
    varian like afru-grund,
    budat(10) type c,
    matnr like caufvd-matnr, "Materials
    erfmg like cowb_comp-/cwm/erfmg,
    charg like mcha-charg,
    END OF it_input.
    So can you please help me out in this..I mean step by step or if there is any other suitable way.
    Thanks,
    Rajeev .......

    Rajeev,
    Based on your post, just may not be clear what you are asking for then.
    I think your general approach that you have described is correct.  Without knowing the source of your data for the internal table, it is hard to completely provide an answer but a typical interface might look something like this:
    1.  Selection screen with parameters for the file name (If a file is the source of your data)
    2.  Load data from the file into your internal table.
    3.  Loop at your data
    4.  Call the Get Detail BAPI
    5.  Using the data returned from the get detail BAPI and your internal table create the importing, exporting, tables parameter for your Create BAPI.
    This step might need some more clarification.  I am not sure if you are using the right BAPI for what you are trying to accomplish.  First this appears to be a Create function and not a change, second, it appears that this is for Time Ticket information against a production order.  I haven't used any BAPIs for production orders before so I can't give you a definite answer.  If you cannot find an appropriate BAPI, you might also try creating a BDC/Call transaction update.
    6.  Review the error messages/return code from your production order change
    7.  Output some type of report to the user regarding successful updates, errors, etc.
    I hope this helps provide some guidance.
    Best Regards,
    Chris H.

  • What is the best method to getting the Production Header Status?

    Hi All,
    To get the Production Order Header status I used the following function;
    ***Object to specify only the Prod.Ord header is needed
    v_ORDER_OBJECTS-HEADER = 'X'.
    Refresh IT_HEADER.
    CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
      EXPORTING
        NUMBER                 = wa_itab-AUFNR
        ORDER_OBJECTS          = v_ORDER_OBJECTS
      TABLES
        HEADER                 = IT_HEADER.
    Clear wa_HEADER.
    READ TABLE IT_HEADER WITH
       KEY ORDER_NUMBER = wa_itab-AUFNR INTO wa_HEADER.
    ***Finally got the Status
    wa_itab-STATUS = wa_HEADER-SYSTEM_STATUS.
    If I were to get the status for many Production Orders this would take a lot of time. So I decided to take another way that is;
    SELECT *
      INTO CORRESPONDING FIELDS OF TABLE ittab
    FROM jest
    WHERE objnr = caufv-OBJNR
    The problem in JEST table does not give the order in which each Status was Confirmed. It does not have a Date field to indicate the Date which the Status got confirmed. Because of this I am not in a position to put the Status in Order like it appears in the CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'.
    What I need, is there a table where the Header Status appears in order or a table that has the Date along with the Status?
    Thanks,
    Kishan

    Hi Sailatha Nagasamudram,
    The View VJAUFK points back to JEST table. Though the Date fields are included it does not help to get the Order in which Status were confirmed. The example I took in our system has the same date for all the Statuses. If you goto CO03 and see the Header Status they appear in Order which I am talking about.
    Thanks,
    Kishan

  • Function Module for data retrival for work order clearence (WCA)

    Hi All ,
      Function Module for data retrival for work order clearence (WCA) for a particular Planning plant and (WCD's).
    Thanks.

    Hi Anne,
    BAPI_PRODORD_GET_DETAIL
    BAPI_PRODORD_GET_LIST
    You can find further FM in Function Group COPRINT and CODR or take F4 on CO* in Function Group
    These will serve your purpose.
    Cheerz.
    Ram

  • Inspection lot status per operation

    hi,
    Is there an overview in SAP to get the status of an inspection lot per operation (other than QE51N). I've an operation for each laboratory. I'd like to get an overview of the status per operation. If not which tables should i use?
    Thanks.

    Use Bapi : BAPI_PRODORD_GET_DETAIL
    or
    Table : TJ02T along with JSTO & JEST
    Refer
    Operation status of the production order

  • Production Order  maintain/change

    Hi,
    I need to change operations of a production order via RFC. Therefore I found the function "CLOI_CHANGES_UPL_31" but I have no idea how to use this function. Can anybody give me an example how to change (or even better how to add) operations of a production order.
    An example:
    I've a PO (Nr. 60028803) including three operations 0010, 0020 and 0030. Now I need an operation 0040. How can I add this one via RFC?
    Thanks for any help,
    Joerg

    Hi,
    I would like to update Batch Number into Production Order and by using this CLOI_CHANGES_UPL_31 FM it return no error but when i checked on the BAPI_PRODORD_GET_DETAIL and found that the Batch Number did not change.
    Can anyone be my mentor to guide me how to update batch number into a production order?
    Thanks and Regards,
    WannYang

  • Prodution Order

    Hi gurus,
    I am working on an interface where I will be getting the production order number and then based on this order number I need to update some fields in transaction code ... CO11N...such as Quantity produced, reason of variance, batch number and posting date. So what I believe is first I need to pass the order number to the BAPI_PRODORD_GET_DETAIL to get the details of the production order and then update the production order by using the BAPI_PRODORDCONF_CREATE_TT, but my problem is I am new to ABAP I got to know what should be the process but I am not being able to implement it. So basically the program needs to pick the data from the internal table and copy it in SAP. My internal table looks liks
    data  :  BEGIN OF it_input occurs 0,
              order_no like afko-aufnr, "Order Number
              opr_no like afru-vornr,      
              quant like afru-lmnga,
              varian like afru-grund,      
              budat(10) type c,      
              matnr like caufvd-matnr, "Materials
              erfmg like cowb_comp-/cwm/erfmg,
              charg like mcha-charg,
                      END OF it_input.
    So can you please help me out in this..I mean step by step or if there is any other suitable way.
    Thanks,
    Rajeev .......
    Message was edited by:
            Rajeev  Gupta

    Hi
    Production Order issued based on the Finished Goods. You cannot issue project or cost centre wise. But You can create one UDF and Mention the Project code or cost centre name.
    regards

  • Leading zeros from Adobe form web service data connection

    I created a web service for BAPI_PRODORD_GET_DETAIL and used it as a data connection in an Adobe form. When executing the connection using request parameters of:
    Number = [Production Order #]
    OrderObjects.Operations = 'X'
    no production orders are found.
    I debugged and discovered the BAPI only found production orders when the Number importing parameter contained padded leading zeros. After searching the forums, I suspect (1) I have the wrong field type and / or pattern for the production order number input field or (2) SAP Note 1050826 may apply.
    Does anyone have suggestions on which field types and patterns to use? I have tried each of Text, Numeric, and Decimal. When using Numeric, I set the data format to Float instead of Integer. I tried data patterns such as: num , the data displays with leading zeros but does not pass to the BAPI with them.
    I was also thinking a Formcalc or Javascript may be the solution.
    Livecycle version: 8.1.2
    Component SAP_APPL: 603 (for SAP note relevancy)
    Thank you,
    --- Scott

    Hello,
    maybe it would be the fastest approach here to work with the value as a string and check the length of the "string" and if needed add some leading zeros. You may try some validations, so the value entered by the user is denied if not in the respective format.
    For a smooth start with scripting start here:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    Regards, Otto

  • SAP templates use BAPIs not available in 4.7

    We are trying to use the SAP module library templates for PP - We are running 4.7 and do not have access to BAPIs BAPI_PRODORD_GET_LIST or BAPI_PRODORD_GET_DETAIL, two of the BAPIs used in that template.
    Any suggestions or help would be appreciated.
    Thanks

    If these BAPIs were not available in 4.7, then you would probably have to create them.  But I was pretty sure the Production Order BAPIs were in existence then.  You may want to post on a different board when some more savvy ECC folks would chime in.  Are you sure you don't need the Process Order BAPIs?   For BAPI_PROCORD_GET_LIST and its fellows were not released until ECC 5.5 (I think).
    Regards  and Good luck!
    Mike

  • Bapi or RFC for Scheduled production orders?

    Hi experts,
    I need to extract a list of the Scheduled production orders (for a specific plant)for integration purpose. Does anyone know if there is any BAPI or RFC for this purpose and could anyone tell me which one could be used.
    I noted that a similar topic "Retrieving production orders and material stock out R/3 system" posted Jan 16, 2006 has been discussed but the outcome was only that standard BAPI / RFC should be available for retrieving the production orders but there was no BAPI or RFC mentioned.
    Best regards,
    Niklas

    Hi,
    I found that the following BAPIs can be used with some parameters.
    BAPI_PRODORD_GET_LIST
    BAPI_PRODORD_GET_DETAIL
    Thanks
    Pavan

  • SO 2 PO

    Hi All,
    I've a requirement for XI:
    external system sends the sales order information, in SAP I can create sales order using BAPI_SALESDOCU_CREATEFROMDATA, I need to create Production order BAPI_PRODORD_CREATE based on the sales order creation. I need to send the list of compoments(BOM) using BAPI_PRODORD_GET_DETAIL to external system. During the process if the production order creation not happend due to errors occured, I need to delete the sales order and send the information to external system.
    I'm in design phase, can you let me know, whether the BAPIs are correct or any other efficent functionality is there?
    How can I delete the sales order? is there any BAPI or FM available? or is there any standard report which can do all the above steps.
    Thanks in Adv.
    Zia

    One solution I can think of is you have to write Proxy or RFC in such a way that
    first it execute BAPI_SALESDOCU_CREATEFROMDATA
    then BAPI_PRODORD_CREATE
    then call BAPI_COMMIT
    I guess this should help you.
    Gaurav Jain

  • Its urgent.!!!!!!BAPI for Production Order

    HIi All ,
    i need to fecth Storage Bin/Material/Quantyti/Descrition .
    All values can be obtained from the production order record using the BAPI.
    which BAPI is there for this req?

    some of the function modules are
    <b>BAPI_PRODORD_CHANGE
    BAPI_PRODORD_CHECK_MAT_AVAIL
    BAPI_PRODORD_CLOSE
    BAPI_PRODORD_GET_DETAIL
    BAPI_PRODORD_GET_LIST
    BAPI_PRODORD_RELEASE etc</b> better you put BAPI_PRODORD_*  in Function module field and press F4 and get more BAPI fuction modules according to your  production order scenario.....
    reward points if helpful...
    thanks,
    velu....

  • Bom for production order - Function module

    Hi
    I'm looking for a function module or bapi which can provide me with the BOM for a specific production order.
    The FM should also handle changes to the BOM and just show me the updated BOM on the production order.
    KR
    Jesper Dueholm

    Dear JDU,
    You can use this FM BAPI_PRODORD_GET_DETAIL if you want to get the BOM components related to the production order or
    use FM,CS_BOM_EXPL_MAT_V2 for getting BOM multi-level display.
    There is no functional Module through which you can do BOM changes in the production order or in the BOM and it has to
    reflect the changes in the order immediately.
    Check these functional modules for BOM change,
    S_BI_BOM_CHANGE_BATCH_INPUT   Change bill of material via batch input
    S_BI_CHG_CHANGE_BATCH_INPUT
    S_CL_P_ITM_MASS_CHANGE
    S_CL_S_ITM_CHANGE
    S_CL_S_ITM_CHANGE_COMPLETE
    S_CL_S_ITM_ODP_CHANGE
    S_CL_S_SUI_CHANGE
    S_CL_P_BOM_MASS_CHANGE
    S_CL_S_BGR_CHANGE
    Regards
    Mangalraj.S

Maybe you are looking for

  • Apple TV no longer connects to Samsung Smart TV

    My ATV (newest version) worked just fine for many months connected to my Samsung Smart TV.  Recently, I updated the Samsung  Smart TV software.  The last update was 6 months back.  Now ATV does not  work.  ATV has been connected to HDMI4 and worked j

  • Need tuning in sql

    I have three tables - fund_family a, fund b, fund_registration c. currently the below query is being used to display two columns fund_family_id and fund_family_nm with fund_family_nm as order by. select distinct a.fund_family_id, a.fund_family_nm, fr

  • M2v files are not being read on my  new mac.

    I installed quicktime pro, dvd studio pro 3, final cut pro 4...and my m2v files will not play in quicktime or the preview window. I get a pop up window saying, "Movie could not be opened. not a movie file." With any of those programs installed, shoul

  • HELP!! "timed out" submiting video podcast through iweb to itunes

    I am trying to submit a vid podcast through iweb to itunes and am getting a timed out message. Please help. I have read other posts similar to my problem, and have checked to see that all of my fields are filled in. Don't know what the deal is. thank

  • BO 5.1 : Broadcast Agent Refreshing .rep Problem

    Hi, We still work with BO 5.1. Actually we have a problem with The Broadcast Agent. All days, At the same time, All the jobs seems to be running but all failed with the "Maximum Duration" fixed to 5400 s. But normally, the reports takes < 1mn to refr