Unlock Purchase Order  failed

Hi All,
I use BAPI_PO_RELEASE to release PO in my function module,
after some transaction, I use BAPI_PO_RELEASE again to the next release step of the same PO, before this, I use BAPI_TRANSACTION_COMMIT, but it seems that the function does not always work, sometimes the system return message that the PO is being Locked by the previous BAPI_PO_RELEASE call.Anyone know what is the reason,please help.Thanks very much!
Pole
Message was edited by: gw gw

Hi Pole,
usually a slow system is the reason...
Use wait = 'X' in bapi_transaction_commit (to be sure it's finished) and most probably that's not enough, so add FM DEQUEUE_ALL. This releases all locks of current session - shouldn't be a problem at this place (usually direct before end of this task / loop).
Regards,
Christian

Similar Messages

  • Import Purchase orders failing with numeric/value error issue

    Import Purchase orders failing with numeric/value error issue

    Hi All,
    Import Purchase Orders program is failing with PL/SQL Numeric or Value Error.
    DECLARE
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 55
    Kindly help me to get the issue fixed

  • Classic Scenario : Purchase Order failing to get created

    Hi,
    We are using SRM 5.0 classic scenario. We are only using SRM for classic scenario only. while trying to create the backend purchase order i get the following error "        Interval of number range object REQREQ does not exist: SC no. PO "
    I have defined the number ranges for PO
    Define Number Ranges for Shopping Carts and Follow-on Document
    EC     3000000000     3009999999     3000000019   internal
    Define transaction type : BUS2201 doc type ECPO
    Description          Purchase Order
    Int. Number Range         EC
    Ext. Number Range         02
    Status Profile
    BTrans.Category      BUS2201
    Description          Purchase Order
    Partner Determ.Proc.
    Text Schema          PO
    Event Schema
    In R/3
    I copied NB transaction type into ECPO
    Defined external number ranges
    Thanks
    Lebo

    Hi
    As Jagadish said,
    1. In SPRO what is the number range you defined for PO in "Define Num range per Backend System for Follow-on doc".
    bp - 10000 19999
    lp  - 20000 29999
    for eg bp -is backend purchase order no ranage
             lp - is local purchase order no ranage 
    2. Then make sure above number range is maintained in "Define Num range per Shopping Cart and Follow-on doc" and it should be Internal num range.
                bacclnt100(backend logical syatem)    bp pr rs
                  bp -backend po no range
                  pr - purchase requst
                  rs -reservation   
    3. this for r/3 classic po i.e bp
    Description Purchase Order
    Int. Number Range : BP
    Ext. Number Range
    Status Profile
    BTrans.Category BUS2201
    Description Purchase Order
    Partner Determ.Proc.
    Text Schema PO
    Event Schema
    4. define number range for local purchase orders
    Description Purchase Order
    Int. Number Range LP
    Ext. Number Range 03
    Status Profile
    BTrans.Category BUS2201
    Description Purchase Order
    Partner Determ.Proc.
    Text Schema PO
    Event Schema
    adding to Jagadish
    since you are in classic scenario
    a) one po number ranage for backend PO
    b) another po number ranage for local PO - Why this is required means if it is ordered a direct local PO will be created SRM rather than R/3 system. this PO document type also must be mapped in r/3.
    c) backend PO number ranage configuaration you can map in backend as external.
    regards
    muthu
    Edited by: Muthuraman Govindasamy on Jun 4, 2009 10:33 AM

  • Price during creating of Draft/Purchase Order fails in SP01 PL04

    Hi,
    we try to port an add-on of us to B1 2005 SP01 PL04. The Add-On create a Draft/Purchase Order by DI Api. Doing so works fine in 2005A SP00 PL08 and PL11.
    Now we try to run it at SP01 and we got wrong prices in the DB.
    Here some sample code in C#:
    SAPbobsCOM.Documents document;
    if(createAsDraftDocument == true)
      document = (SAPbobsCOM.Documents)MainClass.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts));
    else
      document = (SAPbobsCOM.Documents)(MainClass.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders));
    document.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseOrders;
    filling the documents head data
    // adding a document line
    document.Lines.Add();
    // filling line
    document.Lines.ItemCode = 1;
    document.Lines.SupplierCatNum = otherValue;
    document.Lines.Quantity = 1;
    document.Lines.Price = 1;
    // adding the document
    if(document.Add() != 0)
      throw(new DocumentCreationException(MainClass.Company.GetLastErrorDescription());
      // everything OK now
      // fetch last docentry as docentry and save as xml
      SAPbobsCOM.Documents d = (SAPbobsCOM.Documents)(MainClass.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts));
      d.GetByKey(Convert.ToInt32(docEntry));
      string fn = @"E:\draft.xml";
      d.SaveXML(ref fn);
    In the XML I found:
    <?xml version="1.0" encoding="UTF-16"?>
    <BOM>
         <BO>
              <AdmInfo>
                   <Object>112</Object>
              </AdmInfo>
              <ODRF>
                   <row>
                        <DocEntry>6</DocEntry>
                        <DocNum>4</DocNum>
                        <DocType>I</DocType>
                        <CANCELED>N</CANCELED>
                        <Handwrtten>N</Handwrtten>
                        <Printed>N</Printed>
                        <DocStatus>O</DocStatus>
                        <InvntSttus>O</InvntSttus>
                        <Transfered>N</Transfered>
                        <ObjType>22</ObjType>
                        <DocDate>20060615</DocDate>
              <DRF1>
                   <row>
                        <DocEntry>6</DocEntry>
                        <LineNum>0</LineNum>
                        <TargetType>-1</TargetType>
                        <TrgetEntry>0</TrgetEntry>
                        <BaseRef/>
              <TaxOnExpFc>0.000000</TaxOnExpFc>
                        <TaxOnExpSc>0.000000</TaxOnExpSc>
                                  <DRF1>
                   <row>
                        <DocEntry>6</DocEntry>
                        <LineNum>0</LineNum>
                        <TargetType>-1</TargetType>
                        <TrgetEntry>0</TrgetEntry>
                        <BaseRef/>
              <TaxOnExpFc>0.000000</TaxOnExpFc>
                        <TaxOnExpSc>0.000000</TaxOnExpSc>
                        <TaxOnExAp>0.000000</TaxOnExAp>
                        <TaxOnExApF>0.000000</TaxOnExApF>
                        <TaxOnExApS>0.000000</TaxOnExApS>
                        <LastPmnTyp/>
                        <LndCstNum>0</LndCstNum>
                        <UseCorrVat>N</UseCorrVat>
                        <BaseType>-1</BaseType>
                        <BaseEntry>0</BaseEntry>
                        <BaseLine>0</BaseLine>
                        <LineStatus>O</LineStatus>
                        <ItemCode>1</ItemCode>
                        <Dscription>1</Dscription>
                        <Quantity>1.000000</Quantity>
                        <ShipDate>20060615</ShipDate>
                        <OpenQty>1.000000</OpenQty>
                        <Price>5.000000</Price>
                        <TaxOnExAp>0.000000</TaxOnExAp>
                        <TaxOnExApF>0.000000</TaxOnExApF>
                        <TaxOnExApS>0.000000</TaxOnExApS>
                        <LastPmnTyp/>
                        <LndCstNum>0</LndCstNum>
                        <UseCorrVat>N</UseCorrVat>
                        <BaseType>-1</BaseType>
                        <BaseEntry>0</BaseEntry>
                        <BaseLine>0</BaseLine>
                        <LineStatus>O</LineStatus>
                        <ItemCode>1</ItemCode>
                        <Dscription>1</Dscription>
                        <Quantity>1.000000</Quantity>
                        <ShipDate>20060615</ShipDate>
                        <OpenQty>1.000000</OpenQty>
                        <Price>5.000000</Price>
    which isn't as we expected and as it worked on PL00.
    This is the same the draft-form of the last draft we created shows:
    Price is 5 instead of the expected price of 1 we assigned through the DI-Api.
    Note: The Article-price in the item master data is set to 5.00.
    Is anyone out there who could help us as our add-on didn#t work any more on the new SP.
    Thanks
    Gerd

    Hi all,
    we found the problem our self. It seems that the handling of 'Price' and 'UnitPrice' differs a little bit between SP00 and SP01.
    Setting the 'UnitPrice' in the document lines instead of of the 'Price' solves the problem.
    A little bit ugly that the functionallity changes and there is no documentation found.
    Greetings
    Gerd

  • Purchase Order Output Failing

    When a user creates a purchase order, the output (usually set to print and fax) is failing. On the Message window, the output method has a status of "incorrectly processed" and upon attempting to display a print preview of the document an error message is received that "Archive object has not been assigned."
    Manually outputting the purchase order thru ME9F works fine. However, the users needs this to be automatically done as it was before the error started occurring.
    He is the only user experiencing this. What are possible connections between output determination and user or purchasing group? And how can I go about solving this?
    Thanks - points will be rewarded.

    I am not sure what the O/p determination criteria is for PO output. However it seems like the User/ Pgroup is used in condition determination which has either been changed or deleted.
    Could you verify through MN05 if the condition tables are intact

  • Purchase Order to Order Based Transportation Request Scenario Failing - POP_TransportationRequestSUITERequest_Out

    Hi Folks,
        We are configuring an Integration Scenario between SAP ERP & SAP TM. Where we expect when we create or change a Purchase Order in the ECC system we expect an Interface "POP_TransportationRequestSUITERequest_Out" to be triggered and create an OTR in the SAP TM system, which is not happening rather there are other 4 interfaces getting triggered and those are as below
    PurchaseOrderERPRequest_Out_V1
    PurchaseOrderERPReplenishmentOrderCollaborationNotification_Out
    PurchaseOrderChangedInformation_Out
    PurchaseOrderCreatedInformation_Out
    The below are the configurations we did in ECC
    Output Type: TRP0
    Processing Program: RSNASTED
    Form: INITIALIZE_WORKFLOW
    Note: When we create a PO the TRP0 output type doesn't appear in the Output Type (ME22N->GoTo->Messages) automatically.
    Appreciate your expert advice.
    Regards

    Forwarding to financial accounting for the creation of accruals requires a service entry. Every service entry sheet is based on a purchase order. Determining this purchase order is the first stage for forwarding to FI and therefore the first stage required for carrying out settlement
    This purchase order must first be created in Purchasing. Important criteria for the purchase order are:
    Service agents
    Purchasing organization
    Purchasing group
    Plant
    Item category
    You must create the purchase order for a service agent. The purchase order can be valid for the following periods:
    Day
    Week
    Month
    In Customizing the purchasing organization, the purchasing group and the plant must be assigned to the corresponding transportation planning point and the shipment cost type. You make these settings in the IMG. Choose Logistics Execution ® Transportation ® Shipment costs ® Settlement ® Assign purchasing data.
    rgsd
    madhu

  • Purchase Order - save data via BADI failed

    Hi all,
    I have created a zfield in a new tab at item level  of the purchase order that saved data into a custom table successfully. This is via BADI.
    However I like to save the zfield into ci_ekpodb which stored into EKPO.  In the function module that does the
    updates,   i have for a new line item for it to insert into EKPO but it abended with error 'SAPSQL_ARRAY_INSERT_DUPREC".
    This insert results in duplicate database records.
    The codes are: 
    data: lt_item_new  type table of zpo_trace.
    'If  lt_item_new is not initial'.
        Insert EKPO from table lt_item_new.
    Endif.
    Have anyone experience insert new line item into EKPO via ci_ekpodb ?  Pls share any thoughts.
    thanks
    Joyce

    Hi Joyce,
    If you are using the BADI, ME_PROCESS_PO_CUST , you can used the method PROCESS_ITEM .
    You have a object IM_ITEM on which the method get_data or set_data can be called to populate the data to be sent to the EKPO Table.
    Example :
    data : ls_ekpo TYPE mepoitem.
    CALL METHOD im_item->get_data
        RECEIVING
          re_data = ls_ekpo.
    Populate the values against the desired line item as per requirement in the structure ls_ekpo .
    Once done, you can use the method set_data of the same instance to pass the data to the structure.
    CALL METHOD im_item->set_data
            EXPORTING
              im_data = ls_ekpo.
    Hope this helps.
    Regards,
    Sagar

  • Error, While updating a purchase order

    Hi All,
    I am getting following error massage while updating a existing PO:
    " Cannot Insert the value null into column docentry, Table db name.dbo. POR4; column does not allow nulls. Insert Fail."
    We have upto 886 items in the PO and the summary type is " No summary". Even when i treid to change the summary type to "By items", the system is till throwing the same error message. Please let me knwo the cause of this error and how to rectify this??
    Thanks in advance,
    Joseph

    Dear Joseph,
    Please try the followings in a testing database and check the results:
    1. if you give full authorisation to this specific user, will the error persist when adding the rows?
    2. if adding new rows at the end of the purchase order will it be successful?
    3. if you duplicate the sales order then add the new rows, will the error occur?
    4. will the error persist if you upgrade the client to the latest patch?
    5. please check the note 1139134 and 1249795.
    Regards,
    Varun
    SAP Business One Forum Team

  • Automatic creation of transfer orders from goods receipt of purchase order.

    Hi experts
    The project i am currently working on requires the following;
    When goods receipting a purchase order i have a requirement for the system to create automatic transfer orders to put the stock away into storage bins.  I am aware that the stock goes straight into the 902 area once goods receipted.  Is it possible to have the transfer orders created automatically out of 902 once the goods receipt has been posted.
    In support of this, i have made an entry in transaction OMKX for the following;
    Reference Movement Type - 101
    Movement Indicator - B (goods movement for purchase order)
    Movement Type - 101
    TR Create Transfer requirement - X
    Immed. TO Creation - A
    Addl Data - X
    Once i receipt the PO it just sits in 902 and does not create any automatic transfer orders.
    Could someone please help me
    Thanks
    Simon

    Please try to process the material document of the GR manually by LT06 in foreground to find out the root cause of the error.
    You may also want to setup the mail control (V_T321-MAILK) for immediate TO creation in OMKX. The system will send you a express message (depending on your setup) if TO creation is failed.

  • Error adding Goods Receipt PO based on Purchase Order

    I am working on an add-on that was working against a 2005A version of SAP Business One and I am upgrading it to run against a 2007A Company (PL41)
    I am receiving strange errors when testing the add-on.
    I can add a Purchase order not based on a Goods Receipt PO without any problems but as soon as I specify a base type, entry and line I get either -1 General Error, or the Tried to Read/Write Protected Memory Error.  The error I receive seems to arbitrarily change between the two.
    I have read a few notes on the forums about this but none of them have proven useful in solving my problem.  I have checked the DI-API version on my PC and it is definitely using 8.0.177.0 which matches the version of SBO that I am running.  I have re-installed the DI etc without any success.
    The following is the code snippet which I am using to test:  I have verified that the referenced purchase order is open, contains the correct item, customer etc
    int iResult = -1;
    string sResult = string.Empty;
    string sOutput = string.Empty;
    try
    sOutput += Environment.NewLine + "Connecting to company...";
          sbocoy = new SAPbobsCOM.Company();
          sbocoy.Server = "<insert server name here>";
          sbocoy.CompanyDB = "<insert database name here>";
          sbocoy.LicenseServer = "<insert server name here>:30000";
          sbocoy.UseTrusted = true;
          sbocoy.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005;
          sbocoy.UserName = "manager";
          sbocoy.Password = "<inser sap user here>";
          iResult = sbocoy.Connect();
          sOutput += Environment.NewLine + "Connected";
          SAPbobsCOM.Documents PO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
          SAPbobsCOM.Documents GoodsReceiptPO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes);
          sOutput += Environment.NewLine + "Get Purchase Order";
          PO.GetByKey(1402);
          sOutput += Environment.NewLine + String.Format("DocNum: {0}; DocEntry: {1}; ItemCode: {2}; LineNum: {3}", PO.DocNum, PO.DocEntry, PO.Lines.ItemCode, PO.Lines.LineNum);
          GoodsReceiptPO.CardCode = PO.CardCode;
          GoodsReceiptPO.CardName = PO.CardName;
          GoodsReceiptPO.Lines.ItemCode = PO.Lines.ItemCode;
          GoodsReceiptPO.Lines.ItemDescription = PO.Lines.ItemDescription;
          GoodsReceiptPO.Lines.Quantity = 1.0;
          GoodsReceiptPO.Lines.BaseType = int.Parse(PO.DocObjectCodeEx); // If I comment out this and the next two lines the document will add
          GoodsReceiptPO.Lines.BaseEntry = PO.DocEntry;
          GoodsReceiptPO.Lines.BaseLine = PO.Lines.LineNum;
          sOutput += Environment.NewLine + "Adding Goods Receipt...";
          iResult = GoodsReceiptPO.Add();
          sResult = sbocoy.GetLastErrorDescription();
          sOutput += Environment.NewLine + string.Format("Result [{0}] {1}", iResult, sResult);
    catch (Exception ex)
    sOutput += string.Format(Environment.NewLine + "Exception: {0}{1}SBOError: {2}", ex.Message, Environment.NewLine, sbocoy.GetLastErrorDescription());
    The results when I try and reference the purchase order are:
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    If I comment out the 3 lines that reference the base document the Goods Receipt Adds and the following is the output...
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Result [0]
    The above code will work correctly if we base a Delivery Note on a Sales Order so it appears to be specifically related to the Purchasing Documents.
    Edited by: Sean Archer on Feb 2, 2009 2:23 PM

    Hi Ganesh,
    Thank you for the reply.
    I ran the add-on against another database and it is working.
    I also verified that the document was failing to create if done via the Data Transfer Workbench so it would appear the issue affects the DI-API irrespective of add-on.
    I will need to do more testing to confirm whether this is a bug with PL41 of 2007A or a corrupt database as you suggest.
    Cheers,
    Sean

  • EBP purchase order status is comming as blank from last 5 months

    Hi,
    Advance thanks for BW experts.
    Here is the issue I am facing.
    We are extracting shopping cart data from EBP(SRM) daily.
    We are using Data source as '0BBP_TD_PO_1' in SRM.
    In BW it is coming to ODS '0BBP_PO' for collecting data.
    Info source we are using is '0BBP_PO_TD_1'.
    The problem is EBP(SRM) Purchase order status coming as blank from last 5 months, we are using every thing standard objects, no routine, i checked in BW side. I found that purchase order status field coming as blank from SRM. It seems to some problem in extractor?.
    If any one experts in SRM-BW please help me on this how to proceed?.
    for more information PO status filed (InfoObject) in BW is -0bbp_PROPO

    hi,
    take a look sap oss note 827638
    check also 824410,809118
    827638
    Symptom
    Status is blank
    Other terms
    0BBP_TD_PO_1, PO extractor, I1016, Status rejected
    Reason and Prerequisites
    The rejected status is not considered while extraction
    Solution
    Got a mail from customer regarding all the possible statuses which is not populated while extraction.
    Status   Populated or not ?
    Ordered                                             X
    Awaiting Approval                                  X
    In Your Inbox
    Release Rejected
    Held                                                X
    Deleted                                             X
    Outstanding Confirmations Outstanding Invoices
    Transfer Failed                                    X
    Confirmed by Vendor
    Partly Confirmed by Vendor
    Rejected by Vendor
    Changes Transmitted Obviously we dont report on all these statuses in BW but release rejected might be an important status and BATA (customer no: 169433) needs this status to be extracted through the PO extractor. I am changing the extractor code for this status. In future we can enhance this note to take care of other statuses relevant for BW. For now other statuses seems to be not usufull for BW reporting.

  • Purchase Order error message when on Sourcing Cockpit.

    Hi All,
    I have encountered a series of error messages when I try to convert my Shopping Cart into a Purchase Order in SRM 5 within the Sourcing Cockpit. I am using Extended Classic Scenario and have defined the number range in SRM and ECC5. The error messages are below, the moment i try to concert the cart to a Po;
    - Internal number range is missing for transaction type. Inform syst. admin    
    - Transaction type * does not exist. Check entries    
    - Some backend documents could not be generated, or they contain errors  Further Information 
    - No status object is available for 
    I have checked the transaaction type, number ranges assignments, attributes in PPOMA_BBP but fail to find the cause.
    Any pointers would be welcome!
    Thnx,
    Mike

    Hi Muthu,
    The number ranges are consistent as I have checked the number range for local purchase order and this is set as an internal between the range 3000000000 - 3999999999. On the transaction type for BUS2201 Purchase Order, 30 has been set as the Int Number Range, with all other fields left blank.
    The strange thing is that the documents that failed to convert into a PO had been reprocessed in the Application Monitor for Purchase Orders, but when I go back into Sourcing to create the PO, I now get the message:
    "You have either failed to select an item, or you cannot create a follow-on document due to an error that has occurred"
    Regards
    Mike,

  • Purchase order and vendor declaration work list problem

    Now, I'm testing GTS 8.0 for FTA related things.
    In the proceeding the test, I stuck in a problem.
    After making purchase order with order type NB, the system should make the worklist for the long-vendor declaration.
    But it dosen't make the worklist after creating of PO.
    But it make the worklist after Goods Receipts.
    I made related configurations with it.
    1. Activate Transfer of Purchasing Documents ( MM0A ).
    2. Configure Control Setting for Document Transfer.
    In the second transaction, I selected the Application Level MM0A and make document type FNB(Standard PO).
    And I checked all the check boxes including Generate Worklist of Vendor-Based Long-Term Vendor Declarations.
    I did the same configurations with MM0C.
    I searched in every direction, but I fail to get the reason.
    Thank you for the reading.
    Best Regards,
    Jong Hwan.

    I have checked I have already assigned the Partner Scheme to the PO type.
    And, In the first transaction you wrote above(/SAPSLL/PREF_AGR_R3), I got a message.
    Please check the following items:.
    check activity 03 of legal regulation  , "Preference tariff processing"
    Simulation Run - No Database Changes
    And in the second transaction, No data was found for the selection creteria.
    Thank you.
    Best Regards,
    Jong Hwan.
    Edited by: JONG HWAN PARK on Mar 18, 2011 8:33 AM

  • Short Closure and Permanent Closure of Purchase Orders

    Dear Experts,
    Our clientu2019s requirement is to close and block the processing of Purchase Orders for either partly received or no receipt at all.
    The following objectives for the closure of Purchase Orders :-
    1.     The useru2019s should not be able to process the Service or Material Purchase Orders after short closure of the Purchase Orders.
    2.     The Budget commitments for the undelivered Services or Material should get released after short closure of the Purchase Order.
    If a Purchase Order is raised for 100 nos. of a material/services @ Rs. 100 per unit, the total value of the Purchase Order will be Rs. 10000/- and GR has been prepared for say 10 nos, so the value of the GR will be Rs. 1000/-. The Purchase Order is now short closed for 90 nos. Then the following are the objectives to be achieved :-
    1.     The user should not be able to make a GR/SES for 90 nos.
    2.     Commitment Budget for 90 nos (Rs. 9000/- should get released from the Purchase Order.
    We have tried the following :-
    1.     Ticking the Delivery Completion Indicator.
    2.     Putting the Last GR Date
    3.     Making the Message of Last GR from Warning to Error.
    4.     Locking the line item for further processing
    But still the Delivery Completion Indicator, Last GR date and Unlock options are are editable to the user in ME22N and ME23N, where he can remove the tick and date and process the gr.
    Please suggest a solution to achieve the above objective.
    Thanks in advance.
    AJ

    Hi Adwait,
    Reducing the quantity to 90 nos. in the Purchase Order will help in release of my commitement budget. But the line item will still be open to the user for amendment and further processing. If the user amends the purchase order again, the line item can be processed by the user again.
    I want that alongwith the release of the commitment budget the line item should also be permanantly locked for modification by the end user.
    Please suggest further in continuance to the above.
    Thanks in advance.
    AJ

  • Reg: IDOC Purchase Order

    Hi All,
    I have a requirement to trigger a Purchase Order from Stock Transport Order (STO).
    So whenever the STO is created, IDOC needs to be triggered & create a auto PO in the same client.
    I tried with some examples from forum thread, but all goes in vain.
    Could you please advice, what are all the steps needed to achieve this with in a same client. I have created a dummy logical system for Inbound processing with tRFC. Could you please advice this step is really needed.
    Thanks & Regards,
    Uswin
    Edited by: Uswin B on Nov 21, 2011 11:40 AM

    1. You need to setup output determination on the STO (transaction NACE, Application EF). You can create output type similar to NEU and assign it to o/p determination procedure linked to your STO document type. You can't use NEU though as it is configured to create ORDERS message type IDoc. To create PO you need message type PORDCR1.
    2. You have to write your own function module to output IDoc of message type PORDCR1 and call MASTER_IDOC_DISTRIBUTE to trigger it. It is easy if you only map the minimum required fields so that the IDoc doesn't fail in syntax and take it from there. There are no standard functions that I know that created PORDCR1 message type IDoc (others chip in if you know). You need to create your own outbound process code with ALE processing as medium in the output type.
    3. You can set the IDoc from the output type with direct 2 (as inbound) and set up partner profile in the output condition record to point to your inbound LS partner profile
    4. You need to assign inbound message type:PORDCR1, IDOC type PORDCR101 and Process code: BAPI to your receiving LS partner profile
    Those are the settings you need to do. I can't elaborate as there are many things specific to your implementation

Maybe you are looking for