FM to copy order and items

Hello,
I have a requirement where i need to copy one existing order with all the items and create new one, since it would be mass creation i need some FM/class. Could anyone provide me with some sample code or correct approach.
Thanks,
Lisha

Hi Lisha,
You can use crm_order_maintain to create a new order with line items followed by crm_order_save and commit. And to copy the already exiting order with its line items,use crm_order_read.
Make sure for header_guid and for all line item guids, use GUID_CREATE fm to generate new guid ,in case of existing order header guid and line item guids.
You can check by placing a break point in crm_order_maintain and copy any order manually.
Regards,
Nithish

Similar Messages

  • Sales order and Item no is not appearing in the Notification

    Dear Experts,
    1] While Creating notification through Q1 Notification type I am entering sales order and Item No under Processing tab,And I will save the same.
    When I go QM02 transaction the entered sales order and Item No will not be available.
    2] While Creating notification through F1 Notification type I am entering sales order and Item No under subject tab And I will save the same.
    When I go QM02 transaction the entered sales order and Item No will not be available.here also the enter sales order and item is not available.
    Please suggest how to get the same.
    Thanks in advance

    Dear All,
    Please find the below steps the way I have constructed the Notification.
    Go to Transaction QM01
    In the Initial screen enter Notificaiton Type as 'EC'
    Then Press Enter you will get in to screen.
    Under "Subject" Tab
    Enter Problem by selecting F4 drill down menu
    Enter Department selecting F4 drill down menu
    Then Go to Next Tab "Reference Objects"
    Here Enter Sales Order as '45000031'  and in the next field '10000' and Finally Save the transaction.
    and Note down the Notification Number.
    Then Go to next transaction QM02 [Notification Change]
    Enter the generated Notification No.
    And Go to  Tab "Reference Objects" , Here see the already enter 'Sale order- 45000031 and 'Item-10000' Which will not be appearing.
    Please suggest.
    Your Quick responce is highly appreciated.
    Thanks and Regards

  • Order and item status in sales order

    We had multiple items in the sales order
    for one of the item, the quantity was 5, but user cretaed a delivery of 8. but she only post goods issue for 5.
    the delivery and order was open
    at this stage the archival of delivery took place.
    we changed the status in tables vbuk and vbup to complete.
    but in the display of status in sales order, it still shows being processed.
    What can we do now to set the order status and item status to COMPLETE.
    Thank you for your reply

    Hi,
    This order status will not be complete unless the delivered quantity is equal to the order quantity. You have 2 options. 1. Change the order quantity to 8 and delliver the rest 3 and the order status will be set to COMPLETE. 2. Otherwise, reverse the PGI in VL09n and delete the delivery and create the delivery again for 5 qty. This will set the order status as COMPLETE.
    Regards,
    Raghav

  • Flow of Old Sales Order and item values

    Dear Gentlemen,
    Account Based COPA activated and being used since 2010 in our client system.
    As per the customer requirement,recently we have created two new charateristics ,viz;Sales Order and Sales Order  Item in COPA and values of Sales Order and its item are being flowing in to COPA.
    But customer expecting to flow the values of OLD Sales Order and its items (i.e since 2010) for the above stated new two new characteristics.
    Can anybody throw some light on this as how to bring the values of old sales oredrs and it items.
    Regards
    Su

    Hi SU
    You have created the Characteristics fields now and  you want to effect the data flow in old FY, which may not be possible effect from old fiscal year/periods.
    Can you try use KE21N -repost line items for the current period.

  • Copy order with item

    Hello,
    I have a requirement where i need to copy one existing order with all the items and create new one, since it would be mass creation i need some FM/class. Could anyone provide me with some sample code or correct approach.
    Thanks,
    Lisha

    We have been trying to do this for about 6 months now. I am told that you can not replcate an attachment from CRM to ECC, the best you can do is send an email from CRM with the document attached.
    Karin

  • Framework orders and item categories

    In looking at framework orders it would seem there are 2 item categories that would be valuable for my client, B and D.  In reviewing the configuration, I see the following differences.
    Item cat. B
    Material Required - Not Allowed
    Addit.Acct Assignment - Mandatory
    Inventory Management - Not Allowed
    GR indicator firm - Changeable in PO
    Invoice Receipt - PO Item Linked
    IR indicator - Firmed in PO
    Item cat. D
    Material Required - Not Allowed
    Addit.Acct Assignment - Mandatory
    Inventory Management - Possible
    GR - PO Item Linked
    GR indicator firm - Changeable in PO
    Invoice Receipt - PO Item Linked
    IR indicator - Firmed in PO
    What other differences are there between the two item categories?  I heard that one would default the quantity to 1 and removes the GR... Can anyone validate this?
    Also, I noticed when using a framework order, the validity date is not being checked where the system is allowing invoicing to occur past the validity date.  Is there some place in configuration that we can have this tolerance checked?  Please give details.
    Thank you.
    Nguyen
    Edited by: SCM Supply Chain Management on Sep 5, 2008 7:36 PM

    Hi,
    In case of Item Category B, there is not GR in this case. And in case of Item Category D, you have to create Service Entry Sheet (it is must), which creates a GR document in the background.
    Refer Following links for the above;
    [Blanket Purchase Orders|http://www.sap123.com/showthread.php?t=41]
    [External Service Management|http://www.sap123.com/showthread.php?t=52]

  • SD Order line item

    We have a requirement wherein we want to copy Order line items from VA01 or VA02. The first approach we thought about was to have a 'Duplicate' button on the screen and then create copies of the first line item created using XVBAP etc. But we are not sure what tables SAP hits and what else it does in background. So its not very safe to attempt it this way.
    The second option we thought about is by using the SD order creation BAPI.
    The real problem is, all this is driven by users and they should have an option to choose what line items they are going to duplicate.
    Is there a better, optimized way to do this ?

    You are right. I've done it in the past and it is not simple (at least it is something that you can screw up a lot if not done properly).
    Here is what I recommend:
    Run an example transaction in SE30 (Runtime analysis) or debug. (ask a developer to do that)
    Monitor which form is used by SAPMV45A to fill up an item when you enter it. You should try to mimick the SAP standard. Use the same form. That all should be done within your user exit (like mv45afzz). I can'te remember right now what is the name of if but there is an include where you can put your own fcode processing for the additional data A and B screens. Use one of them to add your buttons.
    Good luck!
    Leonardo

  • Link between sales order and purchase order

    plz explain the link between the sales order and purchase request

    Hi Javed,
    Their are 2 scenario for this.
    1) You create a sales order and the system automatically creates a PR and then you convert to PO.This is third party sales.In PO account assignment the sales order number is directly copied to the PR And PO.
    2) You create a PO wrt to SO .The goods received will be reserved for that SO. third party PO Vendor will directly deliver the goods to customer.The delivery address is copied from sales order.
    Techincally
    EKKN table you have sales order and Item fields (VBELN and POSNR)
    using these fields search for the deliveries in LIPS table
    EKKN-VBELN = LIPS-VGBEL and
    EKKN-POSNR = LIPS-VGPOS
    Edited by: Raj on Jun 19, 2008 6:58 PM

  • Fetching the price of the purchase order and charge it in my SO

    Dear, gurus
    I am doing services mto and even Repair services of customers machinery. I would like to fetch the price incase of purchase order and charge the customer for that purchase in my Sales Order. Is there a way to automatically fetch the price? Or how can I cover this scenario?
    Ex: I receive customers machine and in my plant or workshop I do not have the tool needed or a specialist so I hire someone for the job so I buy or rent it or him from a vendor and in return I want to charge my customer for that purchase.
    Any Ideas?
    P.S. this is not a 3rd party sale scenario its just a simple Sales Order. I was able to fetch the price from the production order with condition type EK02. Is there any condition type for purchase order price fetching?
    Thanks

    Amitesh
    How did the outcome come out as? meaning did that user exit price fetch appear in a condition type in the billing document? If so which one?
    Also, where is the relationship or linkage made from PO to SO? Like how in the world would your sales order know that a purchase order was done. I mean it really is a weird process I mean first the SO should be created then that should trigger the PR and that gets converted to a PO as rightly stated in book terminology. But in this case of first a regular sales order, then out of sap we give our requirement to mm purchasing dept and tell them we need such and such. Once they buy it there is a price which in return we need to charge our customer. Everything can be done manually.
    From my own logic of looking at what you described in the user exit. I presume that from abap side they will only pull a table and field data and populate it where I want it?
    In the PR there is a place where you can assign acct cat C to the sales order and item line what exactly is this for? GL acct are assigned for which purpose or What is it doing? Also, the purpose of that cost center?
    Edited by: Muhammad Ali Lozada on May 31, 2010 12:14 PM

  • Copy Order Problem

    Hi,
    I am having problem with copy order, when I copy order and run workflow on book order it doesnt update line.
    I created a procedure which update order lines when pressing book order it works fine for normal order but not for copied order.
    Is there any limitation for copying order in oracle Order management?
    regards,
    7Z

    Is your procedure called within the workflow? Are there any exceptions encountered within the procedure?
    If you use the standard workflow, I assume everything is working fine with copied orders.

  • CS - Linking of Service order and sales order

    Hello Gurus,
    This is for CS module.
    I have created a service order. I want to have this service order no. in the related sales order. How I can achieve this?
    Regards,
    VM

    VM,
    Go to the service order (IW32) and enter the sales order and item number in the sales document fields
    PeteA

  • Sales Order and Sales Item not copy over to table AFPO-KDAUF and AFPO-KDPOS

    Hi Expert,
    May I know why I run MRP and convert planned order to production order based on Sales Order, why the sales order and sales item is not copied and save in table AFPO-KDAUF and AFPO-KDPOS?
    I can see the sales order and sales item is appearing in MD04, but how is the linkage between production order and sales order/item?
    Thanks.

    Sales order No. and sales line item will only be transfer to production order in MTO ( Make to Order) scenario.
    If your scenario is MTO and the sales order reference is not getting  transfer, then check your requirement type and  requirement class setting in T.Code OVZH and OVZG.
    In standard SAP 'KE' requirement type  40 requirement class is used  for MTO scenario.

  • Third Party GRN Posting Date to be Copied to Sales Order Line item Billing Date

    Hello Experts
    I have a client requirement where in they want to bill line items in the sales order ( third party process ) to the end customer in sync with the GRN posting dates happened in the PO
    For EG if GRN happened on 1st July 2014 then Billing Date should come in as 31st July 2014 so when they execute VF04 giving from and to dates as 1st july to 31st corresponding sales order can be invoiced
    Actual problem is for suppose if i create a sales order in the month of june say 26th basing on the factory calendar setting and invoicing list maintained in the customer master system defaults the billing date to 30th June 2014 , and the same when user runs VF04 from 1st June to 30th June this sales order shows as due and mistakenly end user invoices the customer ( whereas logical GR would have only received in July 1st )
    My requirement is similar to below threads but i am unable to find answer how to copy GR Posting date to Billing Date of the sales order line item
    use GR Doc date as billing date
    3rd party sales process (w/o ship notif) - Billing

    Hi Lakshmipathi ji,
    As my requirement is to update the billing date at the sales order line item level , As a process user goes in executes VF04
    For Ex
    Sales Order Created Date is 1st June 2014 then System Defaults Billing Date at line item to 30th June 2014
    Now when i do GRN suppose on 1st July 2014 for that line item , system should trigger a code where in check the posting date of the GRN and override the same in the Biiling Date field of the sales order line item
    So when VF04 is run for a month All the GRN which are recieved in the month of July are invoiced in July
    Please share me your thoughts do we need to check any userexits from MM side which reads the posting date of GRN and then copies in to my third party sales order
    Regards
    Hiba

  • Copy Control between Sales Orders and Deliveries

    Hi Gurus,
    please can you tell me why copy control between Sales Order and Delivery doesn't work?
    At header level, into copy control, we can set 2 requirement routines, one as general requirement for copying (TVCPL-AUBED) and the other one as requirement for grouping orders into deliveries (TVCPL-AUZUS).
    At header level we can also set a routine for data transfer to define how data are passed from Sales Order header to Delivery header (TVCPL-GRUAK).
    Then we can set routines at item level, one as requirement (TVCPL-AUBED) and one as data transfer (TVCPL-GRUAP).
    When delivery is created with VL10A transaction, at header level only the first  general requirement routine is used (FV50B***). Grouping requirement is not used (we also set a break point and the program is not passing into this routine).
    Then it is used the requirement routine at item level (FV50B***).
    Please can you tel me how we camake working the routine for grouping requirement at header level?
    Thank you very much.
    Kind Regards
    Andrea

    Hi, we used standard routine even if to be sure we run also the generation report you mentioned.
    Please any other suggestions?
    Thank you very much.
    Kind Regards
    Andrea

  • Header and Item Incoterms different in Sales order

    Hello SAP Guru's,
    I have an unique issue of Incoterms in Sales order item being different from the Header, when this happens any change to the header Incoterms is not getting copied to sales order Items.
    The issue is due the different Division maintained for Sales order item in the Material master, which is fetching the Inco 2 from the Different Sales area for this is customer.
    This is fine as per design where Item category is checked for Business data and Sales Document type is checked for different Division in the config.
    However the Business would like the Header Incoterms to be copied to all items and any change in Header should also be copied to Line items also.
    We had narrowed down on Couple of Alternatives:
    Remove the Business data allowed check in the Item category config
    But this would allow all Business data to be copied from sales order header to items
    2. Make changes to VBKD user Exit during Sales order creation to copy the Incoterms from Sales order header to items
    But this is causing multiple lines in VBKD and some issues while adding new items in VA02 ending with an Update termination.
    Would like to know whether there is any other Option whether there would be least impact and also would like your advice on the better Option between the above two Options.
    Thanks and Regards
    Mohammed Roshan

    Hi Lakshimipathi,
    Finally we removed the Business Item check in the Item category which is causing the Header incoterms and any changes in Header incoterms to be copied to Sales Order line items as required but we have an issue where Sales Order item Pricing date is being greyed out due these changes, Currently the Sales order Pricing date is being determined through a Z table triggered from a User Exit which was also editable in Sales order item level.
    Due to these new changes Sales order pricing date is being determined in the header and getting copied to the Sales order line item thus greying out the Sales order item pricing date field.
    Would like to know your thoughts on how removing the Business Item check in Item category in VOV7 is causing the grey out of sales Order item pricing date, where the Business can modify on certain occasions and what would the workaround to restore the functionality of Sales order item pricing date.
    Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

Maybe you are looking for

  • HP Scanjet G3010 driver for Windows 8.1

    Where can I find the driver of HP Scanjet G3010 for Windows 8.1 ?

  • How to make the rows in a AdvancedDataGrid appear editable.

    OK, so I have an AdvancedDataGrid that has a text column and a numeric stepper column. Everything works EXCEPT i want the text box and the numeric appear editable at all times. Until a user focuses in on a specific component, it appears un-editable.

  • Reseting Margins in existing document

    Everything I have tried to change the top and inside margins of an existing document will show guides for the new size, but text will stay snapped to the original size guides. Any thoughts? I use Indesign CS6. -Thanks!

  • XPath and DOM

    Hi, I am wondering how to incorporate support for XPath into my XML DOM app. Do I need to add another library or is support provided in any of the std Java API classes? Thanks for help in advance, Claire

  • Scripts: Select an object with a note, duplicating and applying swatch

    I am trying to write a Javascript that can do the following: 1) Select an object whose note has <Object Name> (so its layers is also selected) 2) Duplicate the layer of that object 3) Rename the new layer to <Layer Name> 4) Apply a swatch to the obje