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

Similar Messages

  • 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

  • How to create service items and sales order for service contracts.

    Hi,
    I have created item using Purchased Item template and one more item(service item) using service /warranty program template. Then I have used these items to create sales order with service item in it and closed that order , but Iam not getting this order in service contracts. Is this right way to create sales order for service items. I
    item name:- personal_computer
    copied from purchased order template. service is enabled and install base is checked and enable service coverage is enabled.
    item name:- service_item
    copied from service /warranty program template
    service is selected to inactive,
    service type: service
    duration: 1 year
    template: Gold
    and saved the item.
    Then I have used these two items in sales order for service contracts. But that sales order is not hitting in service contracts. Is there any error with item creation.
    Thanks,
    Bharat G.

    Following SAP Notes to be referred for Service Tax:
    1.     778976 u2013 Service Tax and Ecess on Service Tax
    2.     1032265 - SEcess on Service Tax
    Regards
    AK

  • How to link Sales Order with Service Contract and then with Install Base?

    Hi Friends,
    1) I would like to know the integeration process from sales order to Service Contract and then with Install Base.
    2) I couldn't see anything enabled in Service Tab in Order Lines, its grayed out. Is there any set up/profile option to get it enabled?
    3) How can we create AR invoice from Service Contract?
    Please let me know if anyone has idea on this.
    Thanks in Adavance,
    Vara

    Dear Sid,
    Thanks for your promt response.
    Let me explain you what I did.
    1) I have booked a Bill Only sales order which has one order line, mentioned it as Service Item and provided the same details in Service Tab in Order lines. Now Line status is "Fulfilled"
    2) Then Submitted Workflow Back Ground Process for OM Order Lines and it has created an AR Invoice and closed the line
    3) And then submitted "Service Contracts Order Capture Integration Program" from SErvice Contracts Responsibility and it completed normal.
    4) Now I went in to Launch Contracts Window and queried with the sales order but couldn't see any contract created
    5) Then I went in to Reprocess Order Window and found this order shows an error message as "Referenced Product not present in the Installed Base", then I tried to reprocessed it, but the same error message again.
    Here I have few doubts:
    1) Are the AR invoice and Service Contract Billing Invoices same?
    2) In above scenario AR Invoice has been created, I would like to do the billing from SErvice Contracts and need to create an Invoice in AR? how can I do that?
    because as you explained in one of my questions earlier, A Single Invoice can be created for the whole duration of the contract. I want to do that and trying for the same.
    3) Regarding the above error message, how can I resolve it and create the service contract against that Order?
    Thank you so much for your helpful answers.
    Regards,
    Vara

  • Problem with sales order and Service order

    Dear Guru's
    We have a real problem with sales orders and service orders and how we treat these. For a project that uses a WBS, it's not a problem to manipulate SAP to give us a list of shortages (orders with no or limited supply) for each order, but for some reason our after sales orders and our service orders do not work this way.
    Thanks and Regards,
    Deethya.

    CLOSED

  • Difference between sales order and service order?

    Hi Gurus
    Whatu2019s the Difference between sales order and service order?
    Thanks.
    Kumar

    Check below help link for defination and difference in Sales and Service order.
    http://help.sap.com/saphelp_crm70/helpdata/en/17/99fb62928c46c28c10f3ebc52fdfa8/frameset.htm
    http://help.sap.com/saphelp_crm70/helpdata/en/ce/6874bcf29742c395c5e5fae19a0c68/frameset.htm

  • New Report for Opens Sales order and P.O from Plant and S.Loc

    Dear Gurus
    We have repory requiement for Open sales order and P.O to deliver from particular plant and S.Loc.
    If you have already developed this kiond of report help me inthis case.
    Thanks
    ramki

    closed

  • Sales Order # and Despatch Advice # from Invoice #

    Hi all,
    If I know the invoice no, from which tables I can get Sales order # and Despatch Advice #?
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    hi,
    the document flow is stored in VBFA table where you can find out either subsequent documents or preceding doucments.
    And if you specifically want to find for example a sales order for an invoice you can even mention the previous doc category(VBTYP).
    so in your case, go to se16 > give VBFA table > give invoice # in the succeding document field and you will see the order as well the delivery number.
    regards
    sadhu kishore

  • EDI for creation of Sales Order and sending copy of Invoice

    Hello Experts,
    I am working on EDI. We have a scenario, where the purchase order created in the 3rd party system has to be converted into a sales order in our SAP system.
    Then, the regular flow would follow uptil delivery and creation of invoice in SAP.
    We have to send a copy of this Invoice back to the 3rd party system.
    So, in effect, we would have EDI at two points, while capturing the PO from the 3rd party and another when sending a copy of the Invoice back to the 3rd party.
    Please advise on how to go about implementing EDI in the above mentioned scenarios.
    Regards,
    Divyata

    Use EDI 850 Process code ORDE FM IDOC_INPUT_ORDERS for PO (Inbound)
    use EDI 810 Process code SD09  FM IDOC_OUTPUT_INVOIC for Invoic (Outbound)
    Edited by: srini korada on Jun 9, 2011 4:51 PM

  • What is a table containing sales order and the contract it refers to

    Hi,
    I have a following problem (ECC6.0):
    A sales order is created in VA03 and referenced to a contract. I need to locate the table or tables (or FM) which contains the information of the sales order number and the contract number.
    Problem with VA03 is that I can see both numbers in the document flow screen; i.e. sales order (Doc.no) is xxxxx and the Preced.Doc field contains the contract number. However, this is only an ALV view. I cannot get anywhere from the program SAPMV75F.
    I have checked table VBAK and it contains most of dat but not the link itself as it has any sales document. I need to have an entry containing the link between a given sales order (+item) and the contract.
    Instead of creating with "Create with reference" and select Contract (which you need to refer to),  the system is defined so that contract is used with a hierarchy customer. Debugging of creating did not help as the linking was conducted in the background without activation of debugging screen. I'm not an SD and no experience with contract.
    Help is highly appreciated,
    Pipsa

    Hi,
    The field VBAK-GUEBG is used for valid from and valid to date,
    you can find the Preceding and Subsequent sales and distribution document under table 'VBFA'.
    under SMOD, you can find below exit use for Contract data modification:
    V45W0001 Function module exit for copying sales header data into
    items.
    This enhancement contains the user exit:
    -   EXIT_SAPLV45W_001
    regards
    Vivek.
    Edited by: Vievk Vardhan on Jan 29, 2010 3:13 PM

  • Diff. between Sales order and Service order

    Hi Gurus,
    Can anybody tell me what is the diff. between sales and service order? What are the customization settings will be different for the sales and service order?
    Thanks in advance

    Hi Devi,
    Both are two different scenarios. But both are transactions having different purpose.
    Sales order comes to the picture when ever any product or service are going to sale. Service order comes to the picture either after sales order processing, when ever any damage happened to the product or replacement required or in order to return the product. or Service sales scenario.
    For Configuration settings please refer the Best Practices Configuration guides.
    If any clarification please revert...
    Reward if it helps
    Johnny.

  • Difference between Service order and service contract

    Hi
    Can any one plz differenciate the service contract and service order??
    why only service contract products can carry object list entries and why not service products??
    Thanks in advance.Appriciated with points.
    Regards,
    Nagi Reddy

    Service Order:
    A service order is a short-term agreement between service provider and service recipient, in which one-time services are ordered by the service recipient and resource-related billing performed upon completion. Such an order could be, for example, to maintain or repair some equipment, making it necessary to send a technician along with spare parts. These services are usually billed.
    Service Contracts:
    Service contracts are outline agreements with business partners which define services offered for a particular period. You support service contracts by processing contract-based and planned services.
    Service contracts represent long-term service agreements with customers in relation to the content and scope of services guaranteed within specific tolerance limits for certain parameters, for example, within a predefined timeframe.
    I hope this helps

  • Planned Order creation for Sales Order and Purchase Order

    Hi
    We have a following requirement.
    In normal scenario when we have demand for material  which was created by MD61 and in addition to that if there is Sales Order the 1st planned order gets revised.To better expalin this consider possible scenario
    You create plan via MD61 for 200 qty .The system creates Planned Order for 200.
    Now there is Sales Order for 150 peices.Then what happens is original  Planed Order of 200 is changed to 50 and another planned order is created for 150 peices.The requirement is not summed.
    Now in new scenario instead of Sales Order there is Intercompany Purchase Order of 150 peices.
    Now the system is not changing original Planned Order of 200,but it created another planned order of 150.So now there are 2 Planned Orders of 150 and 200.
    What I want to know is there any way wherein the system will reduce the original planned order (similar to Sales Order scenario)
    Regards

    Hi,
    Use Strategy 52 in urs case.
    PIR witll be created .
    None convertable planned order will be created.
    Once you get sales order for that material.
    New planned order will be created which will consume PIR( planned order ).
    Eg.
    PIR 10.
    Planned order 10 qty.
    Sales oder 6
    Planned order for SO 6 qty
    Planned order through pir will become 4 qty.
    Regards,
    Vishal

  • Locking Sales order and line item from reading

    Hi,
    I am writing an interface program to create an offer list inspection report. If two users are running the program at the same time, and if the first user read and processing a sales order line item, it should not read the same sales order line item twice for the second user.
    Please let me know if anybody has used locking sales order at line item level (VBAP).
    The enqueue function for VBAP is not working.
    Any suggestions will be helpful.
    Regards
    Ravikanth

    hi Ravi ,
    u Can lock the Sales Order for processing ,  u cannt restrict users @ tables level.
    u hhave to enqueue the VBELN
    Regards
    Prabhu

  • Learner question on sales order and purchase order

    dear SDN,
    I am a bit confuse about PO and Sales Order.
    My understanding is a Sales order is a contract from customer to sales organization.
    But a PO is also something like that am i right?
    I learnt that to create a Sales order you need the customer number and PO number.
    So, am i right to say that a Sales order is created by the sales organization after receiving the PO raised and issue by the customer?
    So they are basically the same thing but created by different parties?
    Is my understanding correct?
    Best regards
    MZ

    In Other words,
    Lets consider we as a vendor to our customer.
    our customer will place an order with us,  requiring some materials and for his reference within his company he will refer a number which is called as purchase order. ( this PO number will be a reference for our activities like payment request etc. with our customer).
    the Sales order is a copy of our internal tracking information, for the requirement raised by our customer. so with in our company we will refer this SO number while if we need to communicate something to the customer we will refer with his PO number as he may not be aware of our internal numbering system.
    This should not be confused with the Sales Order & the Purchase Order within our SAP system.
    Sales Order - Relation with the customer & company. (outgoing materials for a company normally)
    Purchase Order - Relation between vendor & company ( incoming materials for a company normally).
    Rgds
    Ilango

Maybe you are looking for