Urgent: How to copy multiple sales order items into a return sales order?

Dear developers,
I have a requirement to copy multiple sales order items into a single return sales order. For example, generated return sales order have 2 items, item 10 is created with reference to sales item 2610/10 and item 20 is created with reference to sales item 2611/20. What's more, when it happens, copy control should be taken care of. I know it is possible to create this kind of order by transaction. But how to do it in coding?
In current SAP release, there is only BAPI for creating with reference on 1:1 relationship which means copy one document to another but what I need is N:1 copy.
Any suggestion is high appreciated!!
BR,
Tony.

Hi ,
If you are creating sales order by using bapi then after calling bapi you can check import parameter <i><b>SALESDOCUMENT</b></i> in the bapi function module .If this parameter is not initial then sales order is created in this case you can create return order. If this import parameter is initial then sales order is not created and you cannot use return bapi function module.
Bapi is simple method than BDC.
In above case it is required to call BAPI_TRANSACTION_COMMIT after every successful sales order creation.
One more important point is you have to clear import parameter <i><b>SALESDOCUMENT</b></i>  before calling sales order creation function module.
Thanks,
shyla

Similar Messages

  • How to copy one column BLOB value into another column of another database.

    How to copy one column BLOB value into another column of another database.
    BLOB value contains word document.
    I thought of copy the BLOB value into a text file and then update the new column value by the same text in textfile. Will this work?
    Is there any other better way to do this?

    You're welcome
    BLOB fields contains binary data. I don't think you can do this
    Also if I view the BLOB as text. Can I copy it and insert into the new database.
    I think your options are as I said. Datapump or CTAS
    Best Regards

  • How to copy a sales order in istore

    Hi
    Is there any API which will enable a istore user to copy order in IStore - as it is done in OM?
    (1) Our requirement is that For a Model item, we should be able to copy from an existing order from the Order Tracker Page in istore and make one or two changes to the configuration parameters and re-submit the order as a new order.
    (2) Also is it possible to change the order type in istore, for eg. if I want the order type to be a 'Quote" type, is it possible to handle this in istore?
    Thanks in advance.
    Revathi R

    Hi Pradeep,
    I have a requirement for copy the Existing ATO configurator model to new model.
    i.e. Customer will configured the model in istore process flow to create a sales order.
    After that for second sales order customer don't want to make same configuration for new order.
    They want the copy of existing sales order lines into shopping cart.
    so added interface for copying the existing configuration and existing items sales order.
    In this process we could do for normal standard line items. But we are facing some issues in copying the configurator items. Also it should work for both orders created in istore and OM process).
    Steps we are followed for copying the existing ATO models:
    =>First we find the existing configuration's for already created ato model.
    =>Then we copied the existing model configuration into new configuration using cz_cfg_api.copy_configuration API
    =>After that we are passing new configuration detail, model line details and sub item detail into ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows API.
    =>This API's will made the appropriate entry in 'ASO_QUOTE_LINES_ALL' and 'ASO_QUOTE_LINE_DETAILS' tables.
    After the all process when we looking into the cart page the model and model sub-items are created as separate lines.
    It was not fully configured as a model.
    Could you please guide me, anything related configurator process

  • How to manage multiple locations for Item (Management warehouse locations)

    Is there any way, with UDF and Formated Search, to manage multiple locations for Item in the same warehouse
    I must have several (at least 2) locations for the item in the Warehouse and that  i enter in goods receipt and have track of this location and search possibilities at sales order by item and WHS.
    read carefully and imagine how (Management warehouse locations)
    I added a user table '@Location' who linked to a user field 'U_Location in Item master data --> lnventory data line and an ather user field 'U_Location' in sales order
    I met the value of location in the table (list of locations for any warehouse), I select the location of each item while receiving merchandise in the user field of inventory data line (Item M data) and this value appears in the sales order 'U_Location' user field ( only the location value in the default warehouse for this Item)
    or
    create an user field 'location' in Good receipt PO to fill it while receiving merchandise that appears in the sales order to give possibility to find/select the location of the item at this order and in Item master data
    I think we will use all these tables and there is a relationship between all.
    @LOCATION
    PDN1
    OITM
    OITW
    OWHS
    RDR1
    a piece of code has been proposed, but it is not so simple
    SELECT T0.U_Location FROM [dbo].[OITM] T0 WHERE T0.ItemCode = $[$38.1.0]
    Thanks,
    Ouchen

    I believe you are talking about defining BIN's (locations) within a Warehouse.
    This is quite possible and has been explained / discussed on this Forum a few times in the past.  Though I am completely clear on how you would like to implement this I could give you some guidelines..
    Creating a @location UDT is correct to maintain list of warehouse locations
    UDF in Items - Warehouses (Item Master ..Inventory Data Tab..Rows)
    UDF in Marketing Document Rows (When you add a UDF here U_Location then this will available in all marketing documents, both AR and AP)
    You will define a location for an Item in the Item Master....
    In the GRPO..you can use FMS to list the location/s for the Item being received from the Item Master and the User can Select it.
    In the Sales Order, you can select the location from which the Item could be picked..
    Let me know if your process / ideas are different
    Suda

  • How to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller

    we are using VS 2013, I need to run multiple Coded UI Ordered Tests in parallel on different agents.
    My requirement :
    Example:   I have 40 Coded UI Test scripts in single solution/project. i want to run in different OS environments(example 5 OS ).  I have created 5 Ordered tests with the same 40 test cases. 
    I have one Controller machine and 5 test agent machines. Now I want my tests to be distributed in a way that every agent gets 1 Ordered test to execute. 
    Machine_C = Controller (Controls Machine_1,2,3,4,5)
    Machine_1 = Test Agent 1 (Should execute Ordered Test 1 (ex: OS - WIN 7) )
    Machine_2 = Test Agent 2 (Should execute Ordered Test 2 (ex:
    OS - WIN 8) )
    Machine_3 = Test Agent 3 (Should execute Ordered Test 3
    (ex: OS - WIN 2008 server)  )
    Machine_4 = Test Agent 4 (Should execute Ordered Test 4 (ex:
    OS - WIN 2012 server) )
    Machine_5 = Test Agent 5 (Should execute Ordered Test 5 (ex:
    OS - WIN 2003 server) )
    I have changed the  “MinimumTestsPerAgent” app setting value
    as '1' in controller’s configuration file (QTController.exe.config).
    When I run the Ordered tests from the test explorer all Test agent running with each Ordered test and showing the status as running. but with in the 5 Test Agents only 2 Agents executing the test cases remaining all 3 agents not executing the test cases but
    status showing as 'running' still for long time (exp: More then 3 hr) after that all so  its not responding. 
    I need to know how I can configure my controller or how I can tell it to execute these tests in parallel on different test agents. This will help me reducing the script execution time. 
     I am not sure what steps I am missing. 
    It will be of great help if someone can guide me how this can be achieved.
    -- > One more thing Can I Run one Coded UI Ordered Test on One Specific Test Agent?
    ex: Need to run ordered Test 1 in Win 7 OS (Test Agent 1) only.
    Thanks in Advance.

    Hi Divakar,
    Thank you for posting in MSDN forum.
    As far as I know, we cannot specify coded UI ordered test run on specific test agent. And it is mainly that test controller determine which coded UI ordered test assign to which test agent.
    Generally, I know that if we want to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller.
    We will need to change the MinimumTestsPerAgent property to 1 in the test controller configuration file (QTControllerConfig.exe.config) as you said.
    And then we will need to change the bucketSize number of tests/number of machines in the test settings.
    For more information about how to set this bucketSize value, please refer the following blog.
    http://blogs.msdn.com/b/aseemb/archive/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel.aspx
    You can refer this Jack's suggestion to run your coded UI ordered test in lab Environment or load test.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/661e73da-5a08-4c9b-8e5a-fc08c5962783/run-different-codedui-tests-simultaneously-on-different-test-agents-from-a-single-test-controller?forum=vstest
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create multiple Purchase Order  using the same document number?

    HI Friends,
    I m in a product which extracts data from SAP and stored in Access database.
    For that,while i extracting Purchase Order from the Demo Database (SBODemo_US)for OEC Computers,the same DocNum is used for several Purchase Order using Index Line numbers.
    eg:
    DocNum for Purchase Order1 -->3000   0 (Index)
      DocNum for Purchase Order2 -->3000   1 (Index)
        But i can't create multiple Purchase Order using same DocNum manually in SAP B1,Could anybody please help me <b>to create a Purchase Order using same DocumentNumber?</b>
    Thanks in Advance
    SooriyaKala.P

    Hi,
    The problem statement is not quite clear to me.
    As far as I understand your statement, I think you want to club multiple orders into one purchase order using the index incrementally.
    For this I think once you have created the first purchase order, open the purchase order in edit mode the second time and append the new line items.
    If I am getting you wrong please explain the problem statement in more detail.
    Regards,
    Rara.

  • How to reschedule multiple planned orders ?

    Hello guys..
    The rescheduling can be done manually via transaction MDAC/ report SAPMM61P.
    MDAC gathers all parameters necessary for function module MD_SET_ACTION_PLAF. In MDAC only one planned order can be schedule.
    I want to create the report in which, the planned order number should be replaced with selection criteria for multiple planned orders. The other fields should be the same as in transaction MDAC.

    hi,
    there are two ways of doing it but both needs technical person's help:
    1. switch off back ward scheduling - find out the program which is triggering back ward scheduling and make it inactive.
    2. write a code in MV45AFZZ, SDTRM001 stating that when ever system is proposing back date at that point of time it should trigger todays date as Material Availbility Date.
    then no need to change manually to todays date.
    hope this should help you.
    please check the same with ABAPER and update the forum
    regards,
    balajia

  • How to copy playlists form ipod classic into iTunes 12

    I need help transferring my playlist into my iTunes 12 library. My computer crashed and I was only able to get my music library re-installed in  iTunes but my playlists did not show up. Does anybody know how to copy playlists from my I-pod classic into the iTunes 12 .

    I have two scripts for recovering data from devices; ImportDevicePlaylists to import the playlists, and SyncStats to import the ratings and play/skip counts/dates.
    The user tip Recover your iTunes library from your iPod or iOS device has more information on recovering content from devices, but if you have all of the media then the scripts above will probably cover everything that else than can usefully be recovered, though you should still backup and then restore iOS devices.
    See Backup your iTunes for Windows library with SyncToy to ensure you have a full backup of your library in future.
    tt2

  • How to copy data in text file into two-dimensional arrays?

    Greeting. Can somebody teach me how to copy the input file into two-dimensional arrays? I'm stuck in making a matrix with number ROWS and COLUMNS according to the data in "input.txt"
    import java.io.*;
    import java.util.*;
    public class array
        public static void main (String[] args) throws FileNotFoundException
        { Scanner sc = new Scanner (new FileReader("input.txt"));
            PrintWriter outfile = new PrintWriter("output.txt");
        int[][]matrix = new int[ROWS][COLUMNS];
    }my input.txt :
    a,b,c
    2,2,1
    1,1,1
    2,2,1
    3,3,1
    4,4,1
    5,5,1
    1,6,2
    2,7,2
    3,8,2
    4,9,2
    5,10,2

    import java.io.*;
    import java.util.*;
    public class array {
        public static void main(String[] args) throws IOException {
            FileInputStream in = null;
            FileOutputStream out = null;
    try {
        in = new FileInputStream("input.txt");
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String line = null;
        while ((line = reader.readLine()) != null) {
            String split[]=line.split(",");
    catch (IOException x) {
        System.err.println(x);
    } finally {
        if (in != null) in.close();
    }}}What after this?

  • How do I turn a mail item into a calendar item?

    Cant find any topics on mail here but as the question relates to calander as well this is the only place I can post it.
    How can I turn an email into a calander event?
    I've have only been using a Macbook pro now for under 1 month but one critical piece of functionality has me stumped. In outlook, I could turn a mail item into a calendar or task item by simply dragging the message over the calendar icon on Outlook's folder bar and the contents would become a calendar item.
    How do I do that on the Mac? I dont rally want to use third party apps as I would have thought that this basic piece of functionality would have been included?

    Did you hover over the date?
    If the email has no date in it, it would be difficult for an automated process to add it to iCal! However, there are add-ons that provide a basic functionality, though I don't know if they've been updated for 10.8. Take a look, for example, at Mail2iCal

  • How to merge multiple live audio streams into a single stream in FMS?

    I need to merge multiple live audio streams into a single stream so that i can pass this stream as input to VOIP through a softphone.
    For this i tried the following approach:
    Created a new stream (str1) on FMS onAppStart and recorded the live streams (sent throgh microphone) in that new stream.
    Below is the code :
    application.onAppStart = function()
    application.myStream=Stream.get("foo");           
    application.myStream.record();
    application.onPublish = function (client,stream)
          var streamName = stream.name;
          application.myStream.play(streamName,-2,-1};
    The problem is that the Stream.play plays only 1 live stream at a time.As soon as a the 2nd live stream is sent to FMS then Stream.play stops playing the previous live stream.So,only the latest live stream is getting recorded.Whereas i need to record all the live streams in the new stream simultaneously.
    Any pointers regarding this are welcome.
    Thanks

    well i tried this once for one of my scripts and the final conclusion is its not possible to combine two streams into 1.....how would you time/encode the two voices......there is no know solution to this in flash. If you continue on despite me and find a solution please post it so we can explain to rest of world.

  • How to copy my jpeg email signature into mail

    I am desperate to copy my company email signature into  my iPad mail

    Use the iCloud system prefs panel to enable the mail account
    http://www.apple.com/icloud/setup/mac.html

  • How to automatically convert to-do items into events

    Hi, I have a calendar which contains many to-do items with dates. I would like to have these to do items become events. Is there anyway to have ical automatically convert these to-do items into events using a script or plug-in?
    thank you for your help and consideration.
    deborah

    Deborah
    Try this. I suggest you save it in ~/Library/Scripts, so that it will be accessible from the drop-down scripts menu. I also suggest that you try it before using it seriously - in iCal, use File/Backup database, then if you don't like what happens, use File/Revert. Feel free to ask questions!
    AK
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "iCal"
    set CalList to name of every calendar
    repeat with ThisCal in CalList
    set SomeTasks to todos of calendar ThisCal
    set SomeTasks to reverse of SomeTasks --otherwise delete causes problems
    repeat with ThisTask in SomeTasks
    try
    set DoItOn to (due date of ThisTask) + 3 * days --fails if no date
    tell calendar ThisCal
    set ThisEvent to make new event at end of events
    set summary of ThisEvent to summary of ThisTask
    set start date of ThisEvent to due date of ThisTask
    if (count of (description of ThisTask)) is not 0 then set description of ThisEvent to description of ThisTask
    if (count of (url of ThisTask)) is not 0 then set url of ThisEvent to (url of ThisTask) as text
    delete ThisTask
    end tell
    end try
    end repeat --ThisTask in SomeTasks
    end repeat --ThisCal in CalList
    end tell</pre>

  • How to copy Customer Sales Order number to Purchase Order for 3rd party sal

    Hi experts,
    We are doing third party sales. So once we create Customer Sales Orders manually via VA01, users also manually create Purchase Req for it.
    We do not automatically create PR from Sales Order, as this is not my clients requirement. So we don't use item category group BANS in the material master.
    In the item level in the PR under the Contact Person tab, the creation indicator shows "V Sales & distribution document". Once PR is created this updates the PR number under the item level Schedule lines in the Sales Order.
    After PR creation, we run a job to create PO's.
    But the new requirement from the client is to automate this PO creation thru EDI.
    Our SAP is 4.6C & the Idoc type we use is ORDERS05 & Message Type is ORDERS. We are using EDIFACT std.
    Once I get the idoc xml file for this PO, I find that my Customer PO number (from the Sales Order) & also the Customer Sales Order number is not copying to the xml output.
    Please advise what needs to be done inorder to have it.
    This will be great help & I will reward for the answers !
    Rgds,
    Pri

    Tables are related.
    MATNR
    WERKS
    MBDAT
    LGORT
    CHARG
    etc fields are common in both VBBS and VBBE.
    May be you can generate a condition a fetch data using this.
    I hope it helps.
    thanks

  • How to update multiple Sales Orders with one IDOC using IDOC_INPUT_ORDCHG

    Hi Gurus,
    Here's my scenario:
    Consider there are 2 Sales Orders for same Purchase Order -
    Open Quantity
    Sales Order 1
    Article A1
    1
    Sales Order 2
    Article A2
    1
    Say if I want to change Open Quantity of both SO 1 & SO2 by dispatching 1 Quantity each for Article A1 and A2 via ORDCHG, observed that in Include LVEDBF0N, XVBAK-VBELN is checked for only 1 Sales Order.
    Whether it is possible to update multiple SOs with one IDOC using IDOC_INPUT_ORDCHG?

    Hi,
    Check out this link, this deals with the problem you are facing.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

Maybe you are looking for

  • Verizon service is by far the worst. Customer service no better!

    That is my suggestion. Anyone have any corporate verizon management emails? I'd like to share my thoughts to them and here. First let me start off by saying in the past 12 years of owning a cell phone I have had almost every service provider in my ar

  • Can't find remote speakers. Other computers can.

    1. The find remote speakers IS checked in my iTunes. 2. I am accessing the Internet through the Air Port Express, so I know I am connecting to the AP. 3. I can connect to it wired or wirelessly, but I do not have a choose speakers option on iTunes ei

  • Ora Errors in Alert Log:ORA-27508, ORA-27507, ORA-27300, ORA-27301

    Hi All, I have a Solaris 5.9 machine with Oracle 9.2.0 installed on it. But the connectivity to the database is lost intermittently. I am getting the below mentioned message in the Alert Log: ORA-27508: IPC error sending a message ORA-27507: IPC erro

  • Problem in exporting internal table to memory

    Hi, I have to export two internal tables (thead and titem) from a report (RFTBCF00) to memory which i will import in my function module can anyone letme know hw it cud b done . Points will b assigned Thnx,

  • Using the print command in SQL Plus

    When using the following syntax: PRINT :msg, I am finding it difficult to suppress the header 'msg.' Is there someway to do this in SQL Plus? Thanks for your feedback!