Sales order Copying Requirement

Dear Experts,
I went to transaction VOFM to maintain the Copying Requirement for the Sales Order.  When I create a new Routine number, I found out that some has the importing parameter BY_SUBRC in the Subroutine and some do not, I want to ask when the variable BY_SUBRC will be present and when will be absent.  Thanks
Thanks.

Hello,
        There will be scenarios where (as in your requirement), just copying the Sales and Distribution Document will be sufficient. In this case, we'll not require any SUBRC Checks to see if the document is actually copied or not.
       However, there are scenarios where you do not want to COPY a particular Line Item in the Sales Order. Then, in such kind of scenarios, where the access to the Actual Data is limited, we'll use the Parameter BP_SUBRC and make it a non-zero to forcefully fail that routine so that the Line Item is not Copied (requirement is not fulfilled).
Hope it was clear and helpful.
Thanks and Regards,
Venkat Phani Prasad Konduri

Similar Messages

  • BAPI SALES ORDER & Copy with reference

    Hello,
    I'm creating sales order copied with reference to an invoice. My problem is that the data item is empty. When I create the sales order manually and use the option 'Create with reference' and choose an invoice, the sales order is created with all data item. I don't know how I can get to copy the data item from the invoice in the new sales order. The code that I'm using is the following:
    DATA: order_header_in      LIKE bapisdhd1,
          order_partners       LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
          order_text           LIKE bapisdtext OCCURS 0 WITH HEADER LINE,
          order_header_inx     LIKE bapisdhd1x,
          order_item_in        LIKE bapisditm OCCURS 0 WITH HEADER LINE,
          order_schedules_in   LIKE bapischdl OCCURS 0 WITH HEADER LINE,
          order_conditions_in  LIKE bapicond OCCURS 0 WITH HEADER LINE,
          extensionin          LIKE bapiparex OCCURS 0 WITH HEADER LINE,
          partneraddresses     LIKE bapiaddr1 OCCURS 0 WITH HEADER LINE,
          order_cfgs_ref       like BAPICUCFG occurs 0 with header line.
    DATA: salesdocument LIKE bapivbeln-vbeln.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    order_header_in-doc_type   = 'ZA09'.
    order_header_in-sales_org  = '1700'.
    order_header_in-distr_chan = '01'.
    order_header_in-division   = '01'.
    order_header_in-BILL_DATE   = '20060701'.
    order_header_in-ref_doc    = '0900000019'.
    order_header_in-refdoc_cat = 'M'.
    *order_header_in-REF_DOC_L_LONG = '0900000019'.
    order_header_in-purch_no_c  ='prueba'.
    *order_header_in-ord_reason = '003'.
    *order_header_in-pmnttrms   = '0002'.
    *order_header_in-sales_off  = '2800'.
    order_header_in-ref_doc_l  = 'FACTURA ES'.
    *order_header_in-fix_val_dy = '20060701'.
    *order_header_in-currency   = 'USD'.
    *order_header_in-exchg_rate = '1.2'.
    order_partners-partn_role = 'AG'.
    order_partners-partn_numb = '0000000001'.
    order_partners-langu      = 'EN'.
    order_partners-name       = 'El corte aleman'.
    order_partners-country = 'ES'.
    APPEND order_partners.
    order_partners-partn_role = 'RE'.
    order_partners-partn_numb = 'ARR000'.
    order_partners-addr_link  = '0000030044'.
    APPEND order_partners.
    CALL FUNCTION 'ADDR_GET_COMPLETE_ALL_TYPES'
      EXPORTING
        addrnumber                 = order_partners-addr_link
      PERSNUMBER                 =
        address_object_type        = '1'
      IV_CURRENT_COMM_DATA       = 'X'
    IMPORTING
      ADDR1_COMPLETE             =
      ADDR2_COMPLETE             =
      ADDR3_COMPLETE             =
       ADDR1_COMPLETE_BAPI        = partneraddresses
      ADDR2_COMPLETE_BAPI        =
      ADDR3_COMPLETE_BAPI        =
    EXCEPTIONS
      PARAMETER_ERROR            = 1
      ADDRESS_NOT_EXIST          = 2
      PERSON_NOT_EXIST           = 3
      INTERNAL_ERROR             = 4
      OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    data: vl_texto(40) value 'NUEVOOOOO'.
    partneraddresses-name    = vl_texto. clear vl_texto.
    partneraddresses-name_2  = vl_texto.
    partneraddresses-name_3  = vl_texto.
    partneraddresses-name_4  = vl_texto.
    partneraddresses-langu   = 'E'.
    APPEND partneraddresses.
    DATA: vl_cantidad LIKE bapisditm-target_qty.
    vl_cantidad = 1.
    order_item_in-itm_number = 10.
    order_item_in-material = 'HONORARIOS'.
    order_item_in-ref_doc = '0900000019'.
    order_item_in-ref_doc_it = 10.
    order_item_in-ref_doc_ca = 'M'.
    APPEND order_item_in.
    order_schedules_in-itm_number = 10.
    order_schedules_in-req_qty = vl_cantidad.
    APPEND order_schedules_in.
    order_text-text_id = 'Z001'.
    order_text-ITM_NUMBER = ''.
    order_text-langu = 'EN'.
    order_text-text_line = 'Hola, CARACOLAcola'.
    APPEND order_text.
    order_text-text_id = 'Z001'.
    order_text-langu = 'EN'.
    order_text-text_line = 'Adios caracol'.
    APPEND order_text.
    order_text-itm_number = '000010'.
    order_text-text_id = '0001'.
    order_text-langu = 'EN'.
    order_text-text_line = 'Hola, POSICIÓN'.
    APPEND order_text.
    extensionin-structure = 'BAPE_VBAK'.
    extensionin-valuepart1 = '          BCL  7'.
    APPEND extensionin.
    order_cfgs_ref-posex = '10'.
    order_cfgs_ref-config_id = '10'.
    order_cfgs_ref-root_id = '00000001'.
    append order_cfgs_ref.
    CALL FUNCTION 'ZBAPI_SALESORDER_CREATEFROMDT2'
      EXPORTING
       SALESDOCUMENTIN               =  salesdocument
        order_header_in               =  order_header_in
       ORDER_HEADER_INX              =  order_header_inx
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
       salesdocument                 = salesdocument
      TABLES
        return                        = return
        order_items_in                = order_item_in
      ORDER_ITEMS_INX               =
        order_partners                = order_partners
        order_schedules_in            = order_schedules_in
      ORDER_SCHEDULES_INX           =
        order_conditions_in           = order_conditions_in
      ORDER_CONDITIONS_INX          =
        ORDER_CFGS_REF                = order_cfgs_ref
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
        order_text                    = order_text
      ORDER_KEYS                    =
       extensionin                   = extensionin
        partneraddresses              = partneraddresses
    PERFORM  report TABLES return.
    *DATA: salesdocument LIKE bapivbeln-vbeln.
    *DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    *refresh return.
    *CALL FUNCTION 'BAPI_SALESDOCUMENT_COPY'
    EXPORTING
       salesdocument          = '0400000191'
       documenttype           = 'ZA04'
      TESTRUN                = ' '
    IMPORTING
       SALESDOCUMENT_EX       = salesdocument
    TABLES
       RETURN                 = return
    *PERFORM  report TABLES return.
    *write: / salesdocument.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          =
    IMPORTING
      RETURN        =
    *&      Form  report
          text
         -->P_MENSAJE  text
    FORM report  TABLES   p_mensaje STRUCTURE bapiret2.
      DATA: vl_mensaje TYPE string.
      LOOP AT return.
        CLEAR vl_mensaje.
        MESSAGE ID     return-id
                TYPE   return-type
                NUMBER return-number
                INTO   vl_mensaje
                WITH   return-message_v1
                       return-message_v2
                       return-message_v3
                       return-message_v4.
        WRITE: / vl_mensaje.
      ENDLOOP.
    ENDFORM.                    " report

    Hi Manuel,
    There are some function modules which is there to copy the order details. I am not sure about the function module name. But you can search in SE37. But bapi for creating the sales order does not have the functionality of copying the data from one document to another document.
    You can try using this function module.
    BAPI_SALESDOCUMENT_COPY
    Data will be copied based on the copy control routines that is set between the two document types.
    Thanks,
    Arun

  • How to make a field in sales order a required field

    Hi,
    How do i make a certain field in sales order a required field. I want to make the assignment field in accounting tab a required field. How do i configure this.
    Thank you.
    Rachelle

    In you know the Transaction and screen Variant Configurations.
    Use T-code SHD0
    Put your Sales Order t-code There : Va01
    Then Select the feilds or tabs whatever you want as mandatory , optional.
    Customize as per your requirement and save the variant.
    Next GO to the Sales Document types :
    There In the Transaction flow you will find at variant feild.
    Assign this variant there.
    Next when ever you do sales Order for that Document type the feilds will be taken in the fashion of the variant.
    regards,
    SAP SD

  • Release strategy in sales order is required before MRP run

    Hi Experts,
    My requirement is Release strategy in sales order is required before MRP run. My client is doing the following process:
    1) Creation of Sale order (MTO).  Ex: User creates 10 sale orders per day.
    2) MD04- Stock Requirement List. All 10 Sale orders should be displayed. So no problem here.
    3) MD50-Make to order-Planning . Here when user gives the sale order number and sale order item and press enter, then only the released sale orders should be allowed and the rest sale orders it should throw a error message and it should not allow to process further.
    How this situation can be addressed in SAP.
    Kindly post some hints and comments.
    Regards,
    Kiran.

    Hi Kiran,
    Define and Assign status profile BS02 at sales order detail (line item) lets say with create and release status
    SD>Sales>Sales documents>Define and assign status profile
    Have create status as default while creating SO with item
    And do a user exit change for MD50 with ABAP consultant help and release it when user keys in SO and item.
    For other line item I believe it will give an error
    Pls try and update if it solves your requirment
    Regards,
    Siva

  • Cannot edit header price when sales order copied from sales order

    I have a requirement to copy a sales order with Freight manually added in Header Pricing to another sales order.  The Header Price for Freight is grayed out on the target document and the requirement is to have that price field open to edit.  I've tried several copy control settings to no avail.  Will a copy control routine need to be written in order to open the freight price field for edit in the target document?
    I very much appreciate your assistance.
    NP

    Hi Nancy,
    Validate the Pricing Type in the copy control at item category level, by default Pricing type is equal to A (Copy price components and redetermine scale), which can be adjusted to adjust your requirement in copying from another sales order.
    Make sure your setting in the condition type under "Changes which can be made" are supporting the necessary changes a user needs to make.
    Regards,
    Naveen Aggarwal

  • How to change the price in sales order copying from contract?

    Hi All,
    I am creating a sales order with reference to contract & the same prices in the contract are flowing. But the validity of prices are expired & I am unable to edit the prices in the sales oerder level.
    Please suggest what configuration need to do to edit prices in the sales order level.
    Thanks,
    Madhu

    Hello Madhu,
    I am creating a sales order with reference to contract & the same
    prices in the contract are flowing. But the validity of prices are expired
    & I am unable to edit the prices in the sales oerder level.
    Please suggest what configuration need to do to edit prices in the sales order level.
    The configurational setting for changing the pricing flow from Contract to Sales Order is in Copying control. Go to the T-code VTAA and select your relevant Contract and Sales Order. At the Item level itself, you shall find a control called PRICING TYPE. Select the option as B or C.
    Please try out this approach so that your issue related to pricing flow can be avoided.
    Regards,
    Sarthak

  • Sales order item requiring assignment

    Hi SD Gurus
    I need a sales order without any costing/accounting/profitability context/connection/dependencies whatsoever. I have set up a material type which is not valuated , a sales document type where billing fields are blank and an item catgory where billing relevance are blank and item is free of charge item
    However when I create the sales order I get information message "A"  as below and subsequently an incompletion log "B".
    How can A and B be eliminated?
    Thanks in advance.
    A :  "Error occurred in derivation rule.
    Step xx Plant/Product -> Prod Category
    No entry in a derivation rule was found for the specified source fields.
    The derivation rule was set up so that an error message appears when this happens.
    The required derivation rule entry would need the following source fields: Plant/Product number"
    B: "Missing data : "profitability segment number "> Complete data > Account assignment > order?"

    Hi, friend
    I checked the IMG settings using  key word 'Derivation'.
    I got some T-codes, There were some nodes located there.
    I don't know which configuration should be the right one for u.
    You should check the message first, then confirm what the function is .
    For the Incompletion Log message, you just need to create a new procedure without checking that field.
    Hope can give you some useful hints.
    Wink

  • Delivery block in sales order and requirements md04

    Hello and good morning to all,
    we have the following scenario:
    From our customer we received some sales order via EDI. "XI"/"SAP" created the standard sales order TA with delivery block Z1 ( header ) - all things are blocked.
    The problem is, for the sales orders with delivery block Z1 we have also requirements in md04.
    We have also set Reasons for and Scope of Deliv.Blocks: Transfer of Req.Block
    How we can block / stop the requirements in md04 for sales orders with delivery block?
    Thanks for your help!
    Best regards
    Petra Schober

    I dont think with Standard Customization you can achieve this with Delivery blocks. As you aware, with delivery blocks you can just stop the confirmation ,pick, pack & GI. but the TOR.
           Even if you set the Delivery block "01- Credit limit', then system re-set confirm qtty as "Zero". But still order requirements will pass to MD04 ( assumption , Block is temparory, anytime it can be released, but if requirement is not transferred for planning, then its difficult for the planner to make the requirement available on specified time) .
                     Only "reason for rejection" will restrict to not to transfer to MD04. So try to explore the functionality of "Reason for rejection" & apply the same with "Delivery Blocks". But you may need enahancement to achieve this.
    Regards,
    Reazuddin MD

  • Sales Order Copy

    Hi All,
    Is there anyway you can copy a sales order and not carry over reference to the customer purchase order number? I want to copy an order from an existing order but create/enter a new PO number in the new order that is created.
    Thanks
    A/A

    you could use the copy ext package for that. see the post from me about 2 months back. Naga had provided a line or 2 of code that I was able to use to ADD a couple fields to be copied. I used the same principal to not copy data. see below
    CREATE OR REPLACE PACKAGE BODY APPS.OE_COPY_UTIL_EXT AS
    /* $Header: OEXCEXTB.pls 115.1 2004/02/03 23:36:57 mchavan noship $ */
    G_PKG_NAME CONSTANT VARCHAR2(30) := 'OE_COPY_UTIL_EXT';
    PROCEDURE Copy_Line_DFF
    ( p_copy_rec IN oe_order_copy_util.copy_rec_type
    , p_operation IN VARCHAR2
    , p_ref_line_rec IN OE_Order_PUB.Line_Rec_Type
    , p_copy_line_rec IN OUT NOCOPY OE_Order_PUB.Line_Rec_Type
    IS
    BEGIN
    -- Addtiional fields to copy--
    p_copy_line_rec.shipping_instructions := p_ref_line_rec.shipping_instructions;
    p_copy_line_rec.packing_instructions := p_ref_line_rec.packing_instructions;
    field that need to NOT copy
    p_copy_line_rec.attribute2 := '';
    p_copy_line_rec.attribute3 := '';
    END Copy_Line_DFF;
    END OE_COPY_UTIL_EXT;

  • Sales order copy via BAPI

    Hi developers,
                 does anybody know if there is a bapi to copy a sales order starting from a different order?
    What I'd like to do is calling a bapi with the document number of the sales order I have to copy as input and obtain a new one identical to the first.
    Is this possible?
    Thanx to all of you and have a nice day.

    Please check in to BAPI_SALESDOCUMENT_COPY.
    Regards,
    Rich HEilman

  • Sales Quotation to Sales Order copy to  creates  Duplicate values.

    Hello,
    I added the  2 columns in Sales Quotation (freight Charges) form  and (inserted/updated)  the  amount.   My problem is when i use the  COPY TO    to  Sales Order ,  duplicate Columns are  creating in  Sales order(freight Charges ) Form.   I  inserted  in  QUT3 Table.
    Thanks,
    Y.
    Edited by: Yughandar on Nov 1, 2011 3:24 AM

    I add the freight items( Handling charges)  in  Freight form in administration.  And   it is  reflected in  Freight charges form in  Sales Quotation.  Using code i  inserted  the values in QUT3 Tabel.   And  when i  use    COPY TO  to  sales order  ,  everything copying to  Sales order but  duplicate  (Handling charges)  Row is  adding in Freight charges form . Means  2 Handling charges rows are displaying..

  • PLANNED ORDER CREATION FROM SALES ORDER SAVING (REQUIREMENT CLASS 200)

    Dear All,
    By using requirement class 200, assembly type 4 (dinamic planned order) Iwould like that at sales order registration the planned order for the sales order material is created.
    I have two problems.
    The system doesn't schedule the planned order, even if the scheduling parametres are entered for planned order type (relation between routing id and planned order type).
    So I have a planned order in which i have to manually schedule it.
    The second problem is that the planned order is firmed at creation. I would like that it was not firmed to adjust by MPS procedure the components from BOM modification. Infact at the creation of the sales order The complete BOM is not defined, and I don't want to unfirm the planned order so run th mps procedure.
    Can anyone answer to these questions?
    Thank's in advance
    Luca Pastura

    Hi Luca Pastura,
    For Scheduling
    1. You need to Give the appropriate check mark ( 1 or 2 ) In the capccity check of the requirement class configuration (ovzg)
    For Firming
    1. Since youare using dyanamic processing ""During dynamic assembly processing, you can not change the quantities and deadlines"
    2. kindly refer the F1 help for the assembly type inthe OVZG.
    Check and confirm
    Reg
    Dsk
    1.

  • Disable Document Flow in Sales Order copy control

    Hello,
    We have a request where the customer doesn't want the docflow to appear when you copy a sales order to another sales order?  I know that you can disable the flag for the item categories however, when you do this, there is still a link between a sales order when it's created by referencing another.  Is there a way to create a sales order via "copy with reference" and to not have them linked in the docflow?  Possibly one of the configuation settings in the copying control?   We are on 6.0. 
    Thanks,
    Chris

    Hi,
    I think It is not possible through configuration.
    Pl try screen exit
    or
    change in standard program,which is not advisable.
    Thanks,
    Vrajesh
    Edited by: Vrajesh G. Nayak on May 4, 2010 1:36 PM

  • Sales order type & requirement planning

    Hi PP Gurus,
    I want to restrict requirement planning on the basis of sales order type. For perticular order type I do not want MRP & for another order type I want planning. Can I do such a setting on the order type? If yes, please tell me.
    Jayesh

    Dear Jayesh,
    -->From sales order MRP get trigger through schedule line ctaegroy so,
    -->You can get this requirement through maintaining different schecduling line categories for non MRP type order and MRP relavented sales orders.
    -->Standard schedule line ctaegeory *without MRP is CN*
    -->Schedule line category will get determine based in these combination
          Item category+MRP type--->Schedule line category
    -->So if you want to define different scedule line categories for different order types you need to define different item categories for that order types through VOV7 transaction.
    -->Then you need to determine those itemcategories through VOV4 transaction for the respective sales document type.
    ->Now you define schedule line categories with MRP and with out MRP through VOV6 transaction.
    For Non MRP schedule line category you remove the check for Req./Assembly in detail screen of schedule line category.
    -->Finnally you do the determination of the schedule line categories through VOV5 transaction.
       Item category of MRP related Order+MRP type-->MRP related schedule line category.
       Item category of Non MRP related order+ No MRP Type-->non MRP related schedule line category.
    Now when you create sales order system consider the schecduline category based on the order type-->itemcategroy in the sales order.
    I hope this will help you,
    Regards,
    Murali.
    Edited by: Murali Mohan.Tallapaneni on Dec 10, 2008 7:30 AM

  • Migo based on sales order error -Require CO object

    Dear Experts,
    We have one process,
    Where we are creating sales order and based on sales order, we are doing migo and miro. final entry will be consumption a/c dr to vendor then we are doing billing for the same.
    We got error in migo based on sales order stated that 'please enter co account assignment object.
    where i will cpature this cost on sales order or cost center.
    I think must be part of sales order becoz we are doing consumption based on sales order and revenue and csot must be flow to copa in billing. M i correct?
    If cost object is sales order or PSG in migo? what setting need to be done for the same.
    What will be the ideal process for the same.
    regards
    RR

    hi ajay,
    I have used AAC -X with item category 's' for third party that was suggested by sap
    and the gl i have defined in okb9 with PSG tick.So consumption account linked to my PSG. becoz i m doing migo/miro based on sales order and final entry will be consumption a/c to vendor in my case.
    System will determine PSG in migo and then billing will happened for the same.So my cost and revenue will flow to COPA.
    We have one programme SDVPRSUPDATE that need to execute every monthend.In order to flow cost to COPA for some cases where Billing happened but no GR happened for the same.then this prograame will flow VPRS cost to COPA.
    regards
    RR

Maybe you are looking for

  • Office 2013 search folder not showing any updates?

    Hi, I am trying to create a search folder for Office 2013 updates but nothing is populating within the folder. I have ticked the "Search all folders" box too and still nothing? any ideas at all? All of the other search folders are working... Bulletin

  • All media I drop to timeline needs to be rendered, what's wrong?

    So here is as much detail as I can give about my problem. I have a new Mac Book Pro. I just installed Final Cut Studio 2. I am editing mp3 sound files and .MPEG video files that I modified from .MOD files. No matter what media I drop into my timeline

  • Connect RE1000 via wired not wireless

    Can the RE1000 connect to the network via the Ethernet jack? We've got a big house with plaster/metal lath walls and it doesn't seem to be picking up the wireless signal of the E4200 V2 once I configure it in the same room, then move it to the other

  • Oracle Real Time Decisions (RTD)

    Hi, We r trying to setup an Oracle Real Time Decisions (RTD) environment. Can any one pls let me know how to integrate Oracle Real Time Decisions (RTD) with Siebel CRM & Oracle BI EE. Any document would be of great help. Your kind response will be ap

  • Iphone will not let me select "don't use icloud"

    I downloaded 5.0.1 software to my iphone and am going through the set-up menu. Under "set up icloud" it will not let me progress with set up if I select "don't use icloud". I don't want to use icloud but the "next" button will not function unless I s