CRM Copy control: CRM_COPY_BADI for document relationship

Hello!
I need CRM copy control from an opportunity to another opportunity. The implementation of badi CRM_COPY_BADI should include document relationships: target document should be related to the same documents linked in the source document.
I cannot find a method to do this.
Please, could anyone suggest me a solution?
Thank you.
Kind regards.
Elena

Hello Elena,
Please follow the steps below:
1) Go to transaction CRMV_EVENT
    Click on "Object Function/Callback" button
    Create a new entry with following values:
    Function Module: ZCRM_DOCFLOW_COPY_EC
    Object Function: CRM_DOC_FLOW
2) Go to IMG Path: Customer Relationship Management -> Transactions -> Basic Settings -> Edit Event Handler Table :
Here create a new entry with the following details
Trans. Category       BUS2000111     Opportunity
Execution Time        1                                Immediately
Priority                    99
Object Name            ORDERADM_I                       Administration item
Event                       AFTER_CREATE_WITH_REFERENCE
Attribute                   <*>
Function                  ZCRM_DOCFLOW_COPY_EC
Perform Function for Doc.Header = "Checked"
Perform Function for Document Item = "Checked"
Call Callback = space
3) Create function module ZCRM_DOCFLOW_COPY_EC with the following signature:
*"  IMPORTING
*"     REFERENCE(IV_STRVAL_OLD) TYPE  ANY OPTIONAL
*"     REFERENCE(IV_STRVAL_NEW) TYPE  ANY OPTIONAL
**Code:
DATA:
  FIELD-SYMBOLS:
          <ls_orderadm_i_wrk>  TYPE crmt_orderadm_i_wrk,
          <lu_orderadm_i_wrk>  TYPE crmt_orderadm_i_wrk.
  ASSIGN iv_strval_new TO <ls_orderadm_i_wrk>.
  ASSIGN iv_strval_old TO <lu_orderadm_i_wrk>.
4) Now in this function module you can read the docflow of old opportunity (<lu_orderadm_i_wrk>) using 'CRM_DOC_FLOW_READ_OB'
Build the new docflow entry for the new opportunity and call 'CRM_DOC_FLOW_MAINTAIN_OW'
Please let me know if any questions.
Thanks,
Sandeep

Similar Messages

  • Does anybody know table for copy controls from Sales document to Delivery

    Hi,
    Does anybody know table for copy controls from Sales document to Delivery. Especially for item level.
    Regards,
    Praveen

    >
    Lakshmipathi wrote:
    > Almost all members know copy control from sale order to delivery.  What exactly your problem is ??   Please post that and avoid asking questions like this !!!!!!!!!!
    >
    > thanks
    > G. Lakshmipathi
    Sorry for my post. I guess you were a wee bit quicker than me in the reposnse

  • Issue with copy control of Delivery document to Billing document

    Hi All,
    I am having some issue with copy control of Delivery document to Billing document.
    I am having two line items in Delivery documetn, one is for item to be delivered to customer and other which is created due to batch determination.
    Now , when I create billing document (VF01) with reference to this delivery document , I want only one line item (for the one which needs to be delivered to customer).
    I have used following things in  copy contro from ZLF to ZF2:
    Copying requirements: 004 ( Deliv-related item)
    Data VBRK/VBRP: 007 "(Inv.Split (Rec/Div))
    Is it correct or shall I use something else, so I have only one line item in Billing document.
    Regards
    Nidhi

    Pls. search the forum.
    Pls. refer the below link -
    Line with 0 quantity for main item with batch split
    Thanks

  • New copy control requirement for deliveries

    Hi
    I am trying to create new copy control requirement for deliveries in VOFM tcode. when i enter 901 and enter it is asking for access key. is it that we nned to et access for creating custom requirements also or am i doing somehting wrong.?
    thanks
    sankar

    Hi Sankara,
    The number space between 500 and 999 is customer space for defining the routines. since you want to define a custom rotuine
    you need to get the access key from sap for that.
    the access key will be generated for the 901 routine that you want to develop
    reward if helpfull
    Thanks
    Akasha

  • Complaint wth ref. to invoice in CRM - Copy control not taken into account!

    Hi all,
    We are facing problems when replicating return orders (business object Complaint)  with reference to invoices in ERP.
    The copy control in ERP is not taken into account. Does anyone know if it is possible to check the copy control when replicating the complaint to ERP with reference to the invoice?
    The return order is being replicated correctly and the link to the invoice is shown (so, the flow is correct).
    But:
    1.- The manual pricing conditions in the invoice in ERP are not being copied in the return order.
    2.- Some data as the 'Incoterms' is being redetermined from the customer master data and is not being copied from the invoice.
    3.- Data related to material is also being redetermined when the order is replicated
    The copy control is not being taken into account and we can replicate return orders from CRM to ERP with reference to invoices for which the copy control is not maintained in ERP...
    Please help...
    Thanks in advance!
    Yolanda

    Try something like this, in place of  ls_input_field_names-fieldname = 'ZZDEP2PVNDPGM'..
    ls_input_field_names-objectname = 'ORDERADM_H'.
      ls_input_field_names-ref_handle = '100'.
      insert ls_input_field_names into table lt_input_field_names.
    Edited by: Kevin Alcock on Aug 10, 2009 4:03 PM

  • Problem with copy control from sales document to billing document

    Hi,
    I have a copy control from a sales document to a billing document,
    which is copying everything from the sales document, except the
    conditoin values. Any ideas on why will a copy routine won't copy the
    condition values from a source document? I don't even have a document
    pricing procedure assigned to my billing document. Any setting, that
    we can do to for the conditions to get copied from the sales document
    to the billing document...just as they are in the sales document?
    Thanks for the help in advance.
    Regards,
    Vijay

    In IMG,
    Implementation Guide for R/3 Customizing (IMG)
    -->Sales and Distribution
       -->Billing
          -->Billing Documents
             -->Maintain Copying Control For Billing Documents
                -->Copying control: Sales document to billing document
    What setting do you have for your source sales document type to target billing document type? Select the row that shows the document type you are interested in and double click on item(on the left pane). Select the item category and do display. What value do you see under the 'Pricing Type' and 'Price Source'?
    May be that is where some config setting is missing.
    Srinivas

  • Copy control settings for Multilevel variant configuration

    Dear All,
    I have  the following scenario for variant configuration A quotation is created for configurable material with multilevel configurable material
    with reference to this quoatation a sales order is created.
    My requirement is that the quoatation must get copied to sales order as it is along with the values for subitems also.
    In copy control settings there is a field at item level called
    configuration :
    In this if I maintain value
    A: The variant is getting copied but  the values for subitems is not getting copied the values for main material is in changable mode.
    B: The variant is getting copied but  the values for subitems is not getting copied the values for main material are not in changable mode.
    C:The variant is getting copied   the values for subitems is  getting copied the values for main material are  in changable mode but the values for subitems are not in changable mode.
    My requiremnt  is that
    The variant must get copied
    the values for subitems must get copied
    the main material vlaues must be in changable mode
    the subitems vlaues must be in changable mode
    How can I fullfill this requiremnt, has any one of you come across this scenario, Pleae provide with solution it is urgent
    Informative answers will be provided maximum points.
    Deepak

    Hai Deepak Mehmi,
    please check in T CODE VTAA
    In the position check
    SalesDocType : Sales order type
    SalesDocType : Inquiry type
    Double clcik and check
    DataT 051 General header data       Copying requirements 002 Header-diff.customer
    DataT 101 Header business data
    DataT 001 Partner header
    And Tick mark for Copy Item Number
    For further check:
    In Item
                                      Copying requirements 301
    DataT 151 General item data                                          Pos./neg. quantity   +
                                                               Copy quantity
    DataT 102 Bus.data/item compl.                                     Pricing type         G
    DataT 002 Partner item                       2 Update document flow   Cont. item copy mode
                                                        Copy product select.
    FPLA  251 Conditions                Configuration
                                                               Campaign Deter.
    Regards,
    Mani

  • Can i know the copy controls functionality for on standard order to billing

    hi,
    sap gurus,
    can i know the copy controls to be set in for functioning standard order to billing document.
    plz say the config settings and t.code for that ie order to billing
    regards,
    balaji.t
    09990019711.

    Dear balaji
    If you can tell us in which scenario, you need the following, it will be easy to suggest.  Anyway you can try with the following which is for service (item category TAD)
    Go to VTFA and maintain the following settings:-
    Header Data
    Copying requirements::::::::001
    Copy item number::::::::::::::X
    Item Level
    Copying requirements:::::::::002
    Data VBRK/VBRP::::::::::::::001
    Billing quantity:::::::::::::::::::A
    Pos/neg.quantity::::::::::::::::+
    Pricing type:::::::::::::::::::::::A
    If it is a third party, then at item category (TAS) level, you need to maintain the following
    Copying requirements::::::::::028
    Data VBRK/VBRP:::::::::::::::000
    Billing quantity::::::::::::::::::::F
    Pos/neg.quantity:::::::::::::::::+
    Pricing type:::::::::::::::::::::::::G
    thanks
    G. Lakshmipathi

  • Copying controls (Restriction for Products)

    Hi All,
    Client creating the opportunity for A,B,C products
    status of products (at item level)
    A - Inprocess
    B - Completed
    C  - Loss.
    Here the requirement when the quotation is created with refference to Opportunity system should allow to create quotation for product B only (Status should be "completed" ).
    Can any one help me to solve this issue
    Thanks
    Gskumar

    Hi sathish,
    Try using the Copy control Badi CRM_COPY_BADI, or use make use of Copying routines in the settings for copying item category.
    Here u can have a check on status, only if it is completed copying should be allowed.
    Regards,
    Shalini Chauhan

  • Copy Control of Biling Documents

    Hello i am having trouble in coping invoices (f2) to invoice list (lr).
    The invoice list is crated but the conditions of the invoice is not passing to the incoice list.
    I think the problem is in the copy control.
    Can some one show the settings of the copy control between them?

    Please see here:
    /message/1752775#1752775 [original link is broken]
    Thanks,
    Feank

  • Problems in Copy Control Setting for Collective invoice..

    I need the  invoice which combines different deliveries  provided the sold to party is same and the delivery date is same. Right now I m using standard routine 11 in the copy control which splits if the purchase order is different or the city code is different. So I need another routine which should remove the splitting criteria.
                The required splitting criteria should be
                1 – Different Sold to parties
                2- Different Delivery date
                3- Different Plant
    Otherwise it should combine the deliveries into one invoice.
    Regards,
    Subho

    Hi Subhasish,
    It's not just ZUKRI - it could be any field and since 011 does not form ZUKRI it isn't in your case. What I'd suggest is:
    1. Create your own Data Transfer Routine as a copy of 011.
    2. Assign it in VTFF.
    3. clear fields that create a split
    Also check partners, because the city code, must come from a partner which is assigned to the header. In case this is unwanted, assign this partner function to item procedure, rather than the header and you'll avoid the split.
    regards,
    Stratis

  • Copying Control Maintenence for Sales Documents

    Dear Experts,
    In our process we have lots of order type like ZMCE, ZMSE, ZSCM etc. and Material is different for the respective Order type. Example X for ZMCE & Y for ZMSE. Now I want to create order ZMCE with reference to Order no. of order type ZMSE. But due to different material it is not happening and showing below error message.
    Choose correct Material for Sea Export order type ZMCE
    I want to create Order with reference to different order but not want to copy line item. Header Data is ok but I don't want Item Data. Can you pls advice/suggest me how can I configure this. Hope my point is clear to you.
    Thanks in advance for your kind support & co-operation.
    Best regards.
    Ripon

    Dear Sir,
    Noted your message with thanks. Yes, our ABAPar give this restriction due to choose correct material for Sales Order type ZMCE. But my requirement was different. When I want to create Sales order (Type : ZMCE) with reference to order type ZMSE then Line item of ZMSE will not copy in ZMCE. How can I configure this ? I want to keep information of header data only not item data.
    Hope my requirement is clear to you.
    Best Regards.
    Ripon

  • FM for Document Relationship in Archive

    Hi All
    There is a transaction ALO1 which shows me the relationship of an archived invoice.
    How can I reuse this in my own program? Anybody some experiance? I have my invoice archived, but there is no VBFA Object available in the archive. But ALO1 is able to find me the related shippings and orders. No clue, how.
    Thank you for any hint
    Herbert

    I found that the FM ASH_HIERARCHY_SHOW shows me the hierarchy.
    But how can I now get for example the order number?

  • Maintain Copy Control for Document Types.

    Hi Gurus,
    My Client has two customized documents both are order Types and wants to maintain Copy control between them.
    If i see VTAA i can find either New Entries option or copy option.
    When i go for new entries option it asks me Requirements and Routines which needs to be set for this copy control and i am not aware of those.
    The Other option is Copy as but since it's customized document types so i am not getting which document should i take as refernce for copying.
    Please suggest me how to proceed.
    Thanks in Advance!!!!

    Hi
    Ideally we don't gamble with standard settings. Not only in copy control but for all other settings related to document types, conditions, movement types etc etc. If standard settings or configuration has been deleted by human error then we should restore standard settings first. May be BASIS guy can do it and if it is not possible then open some other server where these settings are there and you should do all settings manually by copying the standard ones.
    Why we recommend to always copy standard settings and make necessary changes is that standard settings are done by SAP and they have tested it thoroughly and they have hundreds of consultants who have worked on these settings. Standard settings are reliable and we can copy them without any fear of mistake. Whereas if you copy some Z settings or create new one then there are more chances of some wrong or missing settings. Logically may be it sounds not that important or useful but technically it is really fruitful to do this.
    In standard settings system copies all subsequent settings and you don't need to do those settings again and you are already aware of this fact.
    One more benefit is that you only need to change document names and in create new entry you'll have to enter all the fields one by one and you don't know which value is more appropriate for this field. It also saves time efforts and people like me always prefer to save efforts
    Thank$

  • Copy Control for F2-RE

    Dear friends:
    For Sales Returns, we would like to make a copy control from Billing document to Return Order (F2-RE)
    In standard copy control for billing document - sales document, (F2-RE), item category REN is not available.  Only TAN is available.  How in the normal sales returns, the copy control is set?
    With regards,
    Seshappan Viji

    Dear Sheshappan,
    Use trnasaction code VTFA and select tgt document F2 and source doc as RE and go to Item Ctgry. select TAN and copy and maintain Intem ctgry REN.
    I think this will solve your problem.
    get back to me if eny error.
    regards,
    Srikanthraj

Maybe you are looking for