Creation of Service Contract from Inbound IDOC

Hi Experts,
I am using Inbound IDOC type ORDERS02 with message type ORDERS for creation of Sales Order. Now my requirement is like to create a  Service Contract from that Inbound IDOC. The IDOC type contains all the data require to create a Service Contract. The scenario is like, after creation of Sales Order it will check for the corresponding Service Contract exits or not by querying on a Z table which contains all those entries.
So my idea is to create a Z Program, in which it will check for the Service Contract and will create the same by reprocessing the same IDOC or by calling some Function Module. Please suggest how shall i proceed to create a Service Contract.
Is there any way to reprocess the IDOC or to collect the Data from the IDOC segments pass them to a FM which is responsible for creation of Inbound IDOC. Please suggest if this is feasible.
Thanks in Advance.
Regards,
Priyabrata.

Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata

Similar Messages

  • Creation of Sales Order and Service Contract from Inbound IDOC

    Hi Experts,
    My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
    I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
    Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
    I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
    Thanks in Advance.
    Regards,
    Priyabrata

    Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
    Regards,
    Priyabrata

  • Error determining posting period(infostructure S008,Variant Z2,RC3) while creating Sales orders from Inbound IDOCS

    Hello,
    I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
    While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
    Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
    Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

    Thank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
    Could it be an issue with e Update rule in this Infostructire S008
    Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
    "Maintenance of SAP standard updates not allowed"
    Kindly advice
    Thanks and Regards
    Mohammed Roshan

  • Sale Order from Inbound IDOC

    I am testing creating Sale Order from inbound IDOC with WE19.
    Partn. number = AAA001
    Partn. type = KU
    Partn.func = PY
    Message Type = ORDERS
    Process Code = ORDE
    I get message 51 "Error: Application document not posted" in IDOC status:
    VKORG, VTWEG, SPART cannot be determined for customer AAA001 , vendor                                                                               
    Message no. VG 204                                                                               
    Diagnosis                                                                               
    No sales organization, distribution channel or division were sent to the
        IDOC. This data is necessary if a sales order is to be added           
        automatically. If this data is unavailable, you cannot create a sales  
        order document.                                                                               
    Procedure                                                                               
    If data on the sales organization, distribution channel and division   
        have not been entered in the IDOC, it must be determined using a user  
        exit defined in the program.

    I will receive IDOC from external non-SAP system.
    How can i populate E1EDK14 segment with appropriate values:
    E1EDK14 -QUALF = 006
    E1EDK14 -ORGID = Division (VBAK-SPART)
    E1EDK14 -QUALF = 007
    E1EDK14 -ORGID = Distribution Chanel (VBAK-VTWEG)
    E1EDK14 -QUALF = 008
    E1EDK14 -ORGID = Sales Organisation (VBAK-VKORG)
    If external system does not know this values?
    Edited by: S S on Feb 28, 2009 12:46 PM

  • Error during Replication of Service Contracts from CRM to ECC

    Hi,
    I'm encountering a problem when replicating a Service Contract from CRM (I'm using SAP CRM 2007) to ECC.
    I insert a first Item which is not relevant for pricing (let say, product 123)
    I Insert a second Item relevant for pricing, with reference to the previous one (let say, product 456)
    I release the Items and I save the contract
    When I try to go in edit mode in the Contract, an error appears:
    An error has occured in the system DE1CLNT200 while copying the document
    Message no. CRM_ORDER_MISC 020
    Diagnosis
    Errors have occured while transferring the document into another system. Remove the error messages from the enclosed log.
    Transmission log
    u2022     SALES_HEADER_IN has been processed successfully (Notification S V4 233)
    u2022     Material 0 does not exist in plant ZX01 / country CH (Notification E V1 391)
    u2022     Error in SALES_ITEM_IN 000101 (Notification E V4 248)
    u2022     Sales document  was not changed (Notification E V4 219)
    It seems that the program does not recognize the product (the error message says "Material 0", not "Material 456") ...
    Any idea?
    Thanks in advance,
    Andrea

    Should it be a problem related to the leading zeros?

  • Creating inbound delivery without reference to PO - from inbound idoc

    Hi guys,
    I have a scenario wherein I need to create inbound delivery from inbound Idoc from external system without reference of PO. There is no PO created in SAP and this inbound delivery will be used just to receive material (purely for logistic purpose).
    I have identified DELVRY03 or 05 as Idoc type but I am not sure whether system will create inbound delivery without having reference PO. I have two questions here -
    1. Can we create inbound delivery without reference to PO?
    2. If yes, which Idoc type should I use to create such inbound delivery?
    Please help.
    Thanks,
    Parimal.

    Dear Parimal,
    In standard, An inbound delivery can be created as follows:
    With reference to a purchase order
    With collective processing for several purchase orders
    With reference to a stock transport order
    With reference to a customer return

  • Creation of backend contract from SRM system?

    Dear Experts,
    I am bit confused with the scenario of creation of backend contract from SAP SRM system? It says in few cases, based on the BAdi 'BBP_DETERMINE_Logsys', the system creates a backned contract directly in a backend ERP system. Why do we need when we have central contract?
    We can meet the same requirement through central contract where we will authorize only purchasing organizations of a backend system and block the contract for local sourcing in SRM?
    Secondly, How to find a contract / scheduling agreement created in a backend system when a central contract is distributed to the backend system?
    Thanks and regards,
    Ranjan

    Hello Ranjan
    question on contracts?
    Note 1476307 - Importing parameter not filled in BADI BBP_DETERMINE_LOGSYS
    in classic scenario , The Business wanted to create a contract from cockpit or via BID
    this BADI helps
    Symptom
    You have implemented BAdi BBP_DETERMINE_LOGSYS to control the system in which contract is created in following scenarios:
    1. Creation of contract from an accepted quote / bid.
    2. Creation of contract from a requisition in SOCO.
    In the method IF_EX_BBP_DETERMINE_LOGSYS~CONTRACT_LOGSYS_DETERMINE of the BAdi implementation, importing parameter IT_ORG doesnot have any values.
    Other terms
    Backend contract
    Reason and Prerequisites
    some business wants to create a backend contract from SRM . see some Dinesh Powale / Claude  threads for more understanding.
    Muthu

  • Not able to create Service Contract from another svc.contract as followup

    Hi,
    I am trying to create a service contract from another service contract as folllow up document as a part of contract renewal process. However, when I click on follow up button, in the popup, not able to the option Service Contract. Hence I am unable to create.
    Could you please let me know, what needs to be done such that Service Contract also will be shown in the popup.
    Thanks for all the replies.
    Thanks,
    Sandeep

    Hello Sandeep,
    It is not possible to create a follow up service contract (BUS2000112) for another service contract (BUS2000112).
    I do not know your business scenario, you can debug method GET_FOLLOWUP_CUST of class CL_CRM_UIU_BT_GET_PROCTYPES and see where the follow-up transaction types are filtered out.
    I met similar case before, the solution provided at that time was
    - modify FM CRM_UBB_FILTER_SUC_PROC_TYPE in line 49. You can comment out the following line:
    delete ct_suc_proc_type where process_type = ls_suc_proc_type-process_type.
    Hope this could be helpful.
    Best regards,
    Maggie

  • Not able to edit Service Contract from WEBUI beacause of error

    Hi,
    I am trying to edit Service Contract from WEB UI. But, when ever I say edit, it is giving error saying
    "Document is being distributed. Changes are not possible".
    Can you please let me know, why such error comes..and how to rectify that.
    Thanks,
    Sandeep

    Hi Sandeep,
    This happens when the document is distributed to ERP Systems. There are certain Item Categories that are sent to ERP System and only once the confirmations comes from those system you can further process those document.
    You won't find any errors there.
    You can check the BDOC Entries and then can find the target system where the document was distributed. And then logon onto that system and release that document.
    Hope this helps.
    Thanks,
    Samantak.

  • CRM- Find Service contract from Internal Order Number

    Hi Friends,
    I would like to know how to get service contract from internal oredr number.
    From service contract we can find internal order number by using CRM_ORDER_READ function module- table et_document_flow, but my requirement is how to find service contract from Internal order number.Any function module or BAPI available for this requierement ?
    Regards
    Vinayak Sapkal

    Hi,
      when the costs are transferred from CRM to R3, they are posted to an internal order. When a service order or incident is transferred to R3, we have to create an internal order for it, regardless of whether or not a contract has been assigned.
    This is all linked to the logic used in CO to find the appropriate internal order. It works as follows:
    The internal order is stored in the table IAOM_ASSIGNMENTS. This is accessed by a guid (the account assignment guid).
    To get this guid, there is a second table IAOM_EXT_OBJ_INF. This table links the GUIDs coming from CRM, dependent on the CO Customizing for CRM (Mass Controlling, Header level, item level controlling etc.)
    This is how we manage to link a service order to the internal order of a contract in the first place.
    When we call CO, CO first looks for an assignment for the object guid passed. If a service order has been linked to a contract, nothing will be found for the object guid. CO will then check for assignments to the reference guid and find the contract entry.
    If no contract has been assigned, CO will create an internal order based on the service order guid.
    From a CRM point of view, costs are assigned directly to an item, and so it makes no sense to have a reference guid for the costs or the possibility to change the guid via BADI.
    regards
    Waman

  • Prevent the Output Message when creating PO from inbound IDOC

    Hi SAP Gurus,
    In my project, I have to create PO from inbound IDOC (PORDCR) with a specific Document Type ('099').
    Requirement: These PO should not generate the output message while the others (Doc Type # '099') do.
    I have the Z fuction module which call BAPI_PO_CREATE for posting IDOC and it works fine.
    In the existing system, there are some set up that trigger the output message type for PO (output NEU) when using ME21 or ME22, as a result my PO created with output message.
    Can you please advise if there are some way (User Exit?) that prevent the output message in this scenario (specific PO Type) without touching the current Condition setup?
    I'm new in MM and really need help!
    Thanks,
    Elaine.

    Hi Vinod,
    I really appreciate your anwer. I'm going to explore this with my functional consultant.
    Just like to have more questions:
    1. Is it easier if we change the existing condition table instead of creating a new routine?
    2. There are two forms for routine 101 (FORM KOBEV_101 and FORM KOBED_101). Can you explain to me why we need 2 here for what purpose of each form.
    3. In the debug mode by using WE19 to post inbound IDOC, I change the SY-SUBRC = 4 and PO created without output message. Is it the right direction? Anything else I need to pay attention to?
    Thanks again.
    Regards,
    Elaine.

  • Creating service contract from OM

    Hi,
    We have tried creating service contracts from OM in 11.5.10.
    Can we create service contracts from OM in 11.5.9? Any pointers where i can confirm this?
    Thanks,
    Sid.

    SId,
    Yes we can!.
    Thanks
    Nagamohan

  • Unable to create a service contract from IDoc BLAORD FM IDOC_INPUT_BLAORD

    I've been testing creating service contracts using BLAORD and it appears that SAP does not have any way of creating a service contract using IDOC_INPUT_BLAORD. Inside this function a BDC is built and either ME31K or ME32K is called. There is processing that checks the service line package numbers, but it doesn't appear to be creating them (Maybe I'm overlooking something). When the BDC is being built the services screen is ignored. There is a user exit that could be used to populate the BDC for these screens.
    I recently had to develop a custom BDC to create service contracts becuase, to the knowledge of our best ABAP-ers, there is no SAP standard functionality to create service contracts programmatically besides using a BDC. My custom BDC will fail when run in background because of a GUI control on the services screen. It runs fine in the foreground. The short dump is 'RAISE_EXCEPTION'. Short text: Exception condition "CNTL_ERROR" raised. Termination is occurring in CL_GUI_DOCKING_CONTAINER->CONSTRUCTOR. We're on ECC 6.0.
    I checked the SAP Notes system and I was unable to find anything related specifically to contracts for this issues. I did see that SAP has released OSS notes for other BDC processes so that they would be able to run in background.
    I am wondering if there is anyone who currently is able to create service contracts using IDOC_INPUT_BLAORD. My plan is to set up an RFC between SAP systems. The customer wants to be able to receive contracts on demand. Has anyone done this before for service contracts? What has your approach been? Is there anyway of having the function run in foreground when it receives a IDoc?
    Thanks for your input,
    Steve

    Hello Steve,
    Did you get a solution to Service Contract (Purchase) creation through BLAORD or through any other FM please?
    BAPI_CONTRAT_CREATE does not handle services.
    Have a similar requirement and trying to avoid BDC.
    Thanks & Regards
    Prashanth

  • Creation of Mfg Service contract from IB Instance number

    Hi Team,
    We have a requirement from client that we need to create a Mfg Service contract for a given IB Instance number. Can you please let me know, if we have any API for this?
    I tried to create contract using Oks_Contracts_Pub.Create_Contract_Header API but this contract is not associated with Instance in IB.
    Please help to provide any ideas on this. We are on 11.5.10 version.
    Thanks/Suresh K

    Solution: You need to associate Contract with Covered line with that serial number.

  • Updating transaction MD61 using information from inbound IDOC

    Is there any standard IDOC type for Planned Independent Requirement(having fields of table PBED and PBIM in its segment)?If such an IDOC type doesnt exist then i have to go for custom idoc type creation
    I have an inbound IDOC having 4 fields in its segment
    1.SAP Material number
    2.Plant
    3.Plant Quantity
    4.Requirement date
    Now i have to use this information in IDOC to update transaction MD61(create a planned order).
    constraints:
    in MD61 screen1
    SCREEN 1
    Material radio button is defaulted to on. This must also be set in the interface. Material number will be valued from the input file.
    Plant will be valued from the input file.
    Version number defaults to 00, so that value should also be used for the interface.
    Planning Horizon From and To dates will be the same date and valued from the input file.
    Planning Period should be set to D for Day
    SCREEN 2
    Material number should default from SCREEN 1 input. The interface should also do this.
    MRP Area will default from the Plant on SCREEN 1 input. The interface should also do this.
    Version will default from the 00 on SCREEN1. If needed on interface, also default to 00.
    Version Active checkbox will be checked by default.
    Base Unit of Measure will default from material master.
    Only a single date column will appear which should be the date input on SCREEN 1. Value this column with the quantity from the input file.
    Input fields are highlighted in screenshots below.
    After input is complete, use the SAVE icon to store the data.
    Kindly tell me the approach to prepare this interface?

    Done,used BAPI_REQUIREMENTS_CREATE TO DO SO

Maybe you are looking for