How to implement a Copy or Create with Reference scenario

For business objects, you might want to implement a Copy or Create with Reference scenario. The following procedure describes the UI configuration that you need if you want to place a copy button (in our example on an OWL) that starts a quick activity floorplan (on the same BO = Copy, or a different BO = Create with Reference). Pre-requisie in the target BO: The target BO requires a BO element SourceBOID and a Copy action that reads the SourceBO by SourceBOID by query, and copies the elements from the source to the target BO.
The UI configuration in the target floor plan is:
1. Open the QAF floor plan of the target BO (target floor plan).
2. In the DataModel view of the target floor plan, select the Root entry and select Add Data Field from the context menu. Rename the created data element to OBN_OriginBOID.
3. Choose the Controller tap, and select INPORTS and choose ADD INPORT from the context menu. A new in-port is created. Rename the in-port, for example to Copy.
4. In the in-port maintenance form, activate the check box OBN INPORT.
5. Select the namespace of your solution and the target business object.
6. In the input field SELECT OPERATION enter Copy. A new select operation is created. The combination of business object name (including namespace), business object node and operation identifies the in-port and therefore the related floor plan as navigation target.
7. Select the port type package /SAP_BYD_UI/SystemPortTypes.PTP.uicomponent.
8. In the PARAMETERS section of the form, click the ADD button. Maintain the binding of the created parameter to /Root/OBN_OriginBOID. Based on this configuration, the system will transfer the parameter of the in-port to the element in the data model when the OBN is executed.
9. In the Properties view, select the drop-down list box of the property EVENTS u2022 ONFIRE. Scroll down and select the entry u2026 NEW EVENT HANDLER u2026. The system starts the maintenance window for event handlers. Rename the event handler to CopyIn.
10. In the OPERATIONS table of the maintenance window for event handlers, select type: BUSINESS OBJECT OPERATION. In the form below the table select the value CREATE for the input field BUSINESS OBJECT OPERATION TYPE. This operation will create a BO instance in the backend when the OBN is executed.
11. In the OPERATIONS table, create a new operation of type: DATAOPERATION.  In the configuration of the data operation, select the operation type ASSIGN, source expression /Root/OBN_OriginBOID and target expression /Root/<BO>/OriginBOID.
12. Create a third operation of type: BUSINESS OBJECT ACTION. Select the Copy action of the target business object and click the BIND button. Note: This action enforces another roundtrip to the backend. The Copy action must be implemented so that it will read the origin BO and copy selected data from the origin to the newly created object.
13. Test the changes in the preview. If no error message is issued, save and activate the floor plan.
The following procedure describes the configuration in the source floor plan (e.g. OWL floorplan ):
1. Open the Source BO OWL floor plan (source floor plan).
2. In the Designer view, place cursor the on the toolbar area and select ADD u2022 APPLICATION-SPECIFIC BUTTON u2022 MY BUTTON from a context menu. Rename the new button to Copy.
3. In the Properties view, select the drop-down list box of the property MENU INFORMATION u2022 NAVIGATION. The system launches the maintenance window for OBN configuration.
4. Select the in-port of the target floor plan by selecting the target business object (with namespace and name) the target business object node and the target operation, and the operation Copy.
5. Choose the navigation style NEWWINDOW.
6. Close the OBN configuration maintenance window by clicking the OK button. The system creates the OBN configuration, an out-port, that is used by the OBN configuration, and an event handler that uses the out-port and that is assigned to the button (see Properties view, EVENTS u2022 ONFIRE).
7. Go to the Controller view and rename the OBN configuration to Copy, the new out port to Copy and the new event handler to CopyOut.
8. Check that the event handler CopyOut fires the out-port Copy.
9. In the Parameters section of the out-port maintenance form, click the ADD button. Maintain the binding of the created parameter as /Root/<BO>/<BO>ID. Based on this configuration, the system will transfer the identifier of the selected source BO to the out-port data structure when the OBN is executed.
10. In the Operations table, select type: FIREOUTPORT. In the form below the table select the out-port CopyOut.
11. Test the changes in the preview. If no error message is issued, save and activate the floor plan.

Hi Dries-
There are no pre-packaged solutions with BADIs since they are, by definition, custom development.  If that's the path you need to go down then consider the following high level alternatives:
Incorporate custom code into the BPC Write Back BADI.  You can restrict the execution of the BADI using filters on the BADI definition, so that the BADI execution only occurs when a data manager package is called, and only for some defined combination of applications/appsets.  Utilized the standard copy/move functions delivered in Data Manager. When the BADI is called, interrogate each record being processed (table CT_ARRAY) and determine if the record has a value you want to process (i.e. save to the target application).  Skip any record that has a zero value.
Another alternative is to develop the BADI as custom logic.  Data Manager parameters can be picked up in Script Logic and the values can be sent to the BADI by adding parameters.  Please see an example of parmater use in the "How To" document for Destination App at:
[EPM How To Guides|https://wiki.sdn.sap.com/wiki/display/BPX/Enterprise%20Performance%20Management%20%28EPM%29%20How-to%20Guides]  > "How-to Desitnation App"
Regards,
Sheldon

Similar Messages

  • How to differentiate the Purch Orders created with reference to in table

    Hi all
      how to differentiate the Purch Orders which are created with reference to Purch requsitions, contract, manual by copying inforecord in the table EKKO/EKPO? Is there any Field Indicators?
    Rgds
    Ramesh

    Hi Ramesh,
    Go through  EKPO there is a Table BANFN it will update when you create a PO with reference to PR
    Do se11 > Table EKPO> CtrlShiftF10 > Assign any of PO no. in the EBELN > Execute > you will find BANFN table
    it indicates Purchase Requisition Number. it will update when you create PO with reference to PR.
    Regards,
    Vraj

  • Copy Sales Order with reference to a Contract

    Hello,
    how can I create a copy of a sales order referred to a contract mantaining the reference?
    I have an order referred to a contract; I would like to create a new order in copy ( va01 - create with Reference) maintaining the relationship to the contract.
    Thank to all,
    Antonio

    Hi,
    You can create a new order by referring to a contract by clicking on "Create with reference".
    Click on Contract and enter the contract number here.You can change teh requested delivery date manually.
    Click on Copy.
    Before this,make sure that the copy controls have been mainatined for these two document types.
    Regards,
    Krishna.
    Note:Please search in the forum before posting basic questions.

  • How to change SelectionColor in TLFTextFielfd created with new TLFTextField(); syntax?

    How to change SelectionColor in TLFTextFielfd created with var txtTest:TLFTextFielfd = new TLFTextFielfd(); syntax ?

    You have posted in the AS1/2 forum.  If you are using a TLFTextField, it can only be used with AS3.  You might need to repost in the AS3 forum if you truly intend to use the TLFTextField.  As far as I can see there is no SelectionColor (or selectionColor) property for the TLFTextField.
    Also, in every instance of the word you have mis-spelled it...
    "TLFTextFielfd" should be "TLFTextField"

  • How many icloud account can we create with one ios device???

    how many icloud account can we create with one ios device???

    i need more then 1 account as i owe itunes some money and i cant access my app store so if i change my icloud account .....all my previous history wont be tracked

  • How do you block copying of content with createPDF??

    new user
    how do you block copying of content with createPDF??

    You'll need Acrobat Std. or Pro. to set security on a PDF document that disallows copying of the content.

  • How to disable pricing condition create with reference in VK11, VK12 & VK13

    we have given the release status for all pricing entry; from VK13 pricing display mode if we select create with reference then Proc status is defualtly it is in the released status.

    Hi,
    I feel that the Generation of Field is not properly done, while creating the table. you can create the new table with the same fields and click on the icon FIELD GENERATION at the left corner of the screen with red and white circle. you can confirm by clicking on the field attribute icon.
    hope this will help,
    Reward if help
    Manoj

  • Remove Header text from a sales order, created with reference to quotation

    Hi all,
    I have a sales order(in VA01) which is created with reference to quotation (in VA21).
    If header text (Notes for logistics, Note for responsible person, Header text Doc & Declaration) in texts tab is maintained in the quotation they are getting copied in Sales Order which is NOT the requirement.
    I need suggestions on how to disable the text that is getting copied.
    Any pointers would be of great help.
    Regards,
    Vamsee Priya.

    Hi Nilesh,
    I created a routine in vofm and this solved my problem.
    Now, I'm having a similar problem where I'm creating an Invoice(through transaction VF01) giving the delivery document number and document type (Invoice F2).
    we are maintaining Header text in Order through which the above mentioned delivery document number is created and this header text should get copied in the Invoice.
    For this, I went into Transaction VOTXN, from there selected billing header, from here kept a break point for the routine BEDINGUNG_PRUEFEN_001 through which the text will get copied.
    Now, when I'm creating the Invoice this routine is getting executed, but still the text is not getting copied.
    Any pointers on this would be of great help.
    Also at the end of your previous mail, you are telling about SPRO - text assignment. Can you please let me know how to I should navigate to this text-assignment??
    Thanks and Regards,
    Vamsee Priya.

  • Enable - Create With Reference in Sales order

    Hi All,
    I want to enable - Create With Reference in Sales order
    We have 1 billing doc type YX1 to be used as reference for a sales order type ZX3
    How to enable Create with reference from Sales Document type YX1 to Sales Document type ZX3.
    Currently, I am getting error 'Copying from sales document type YX1 to ZX3 is not supported'.
    Please let me know the steps to be followed.
    Thank you!
    Regards,
    Shanu Jain

    Hi,
    The error clearly suggests that there is no copy control maintained b/w invoice YX1 and sales order type ZX3. You need to maintain that in SPRO > Sales and Distribution > Sales Documents > Copy control for sales documents. (You may check the correct node here). Here, you select the billing document to sales document.
    Check for source and destination. You can take the source as F2 and CR (if ZX3 is a credit Memo request) as Destination document. You can copy the same and change the source and destination as YX1 as source and ZX3 as destination. Then, at the item level, if you have a new item category you can specify it as the 'Proposed Item Category'. Save it.
    Now try to create the sales document ZX3 w.r.t YX1... It should work.
    Hope this helps
    Thanks
    Mukund S

  • Condition types doubling/tripling/...when sales documents created with reference to other documents

    Hi,
    When I create a sales order with reference to a Quote, the pricing condition types are duplicating. Same is happening when subsequent documents like Billing, credit memo request and credit memo are created. Particularly, the condition types  are doubled/tripled/.... in the subsequent documents. Because of this, pricing net value is calculated wrong. For example, freight charges getting added twice. I searched the forum and found similar issue was discussed at Condition types - Doubling UP  raised by forum member Sridhar Vijjhalwar, however there is no solution added in it.
    Has any other member came across this issue and resolved?
    I have checked the access sequence and exclusive indicators are checked. Copy controls are also checked, looked good and I tested by adding copying type D/G. Checked OSS note also and found one OSS note 1459807 - Invoice has missing/incorrect conditions when created from a sales order.
    but it is not solving the problem either. Issue also elevated to SAP for their investigation. Our system is SAP ECC 6.0 - EHP6.
    Quote Pricing:
    Sales order Pricing:
    I appreciate any pointers to resolve the issue.
    Regards,

    what was the scenario, and how did you replicate?
    It is a configuration for a new project (France country), however we found that the same issue popping up for existing business processes also. As for replicating, we just tried the same procedures, the issue is found in subsequent documents.
    If you have observed one notable thing is - all the condition types which duplicated were Z Conditions, and the standard conditions were never duplicated at least in my case.
    In our case even standard condition types like MWST, SKTO, GRWR, VPRS also shows duplicating.
    if you can throw about the business process?
    As you have mentioned order created with reference to quote was only the straight forward scenario?
    I tested other scenario also, like creating a sales order, then delivery and then billing. In this case in billing document, the condition types are duplicating. If I create a credit memo request against the billing document, then it further duplicating.
    I am not sure what is causing this. I initially thought it may be copy control settings pertaining to the new project, however other business documents also has the same issue. Other business are using different document types.
    Thanks for your follow-up.
    Regards,

  • Can Two Invoice be created with reference to one Return order

    Dear All.
                  Can two SR Invoice be created with reference to one SR Order.

    Thanks JP Sir,
                       Much appriciated ,we are having SAP IS:AFS(Our Business is of Manufacturing & Marketiing.Consumer product.
    Sir- I created a SR Order after creating it forgot to do PGR & without  doing PGR I opened sales log in order & created SR Invoice without doing PGR & when I check it in VF03 ,Issue print out then there was not any material discription in Created Credit Invoice & when I checked Display document then there were no any delivery document then I came to know without doing PGR how material  can be copied  & then did PGR  with reference to same SR Order  n created another Invoice .but my question is that without cancelling previous SR Invoice how another Invoice can be created with reference to same SR Order.
    Thanks,
    Kamlesh

  • Error while posting a sales order created with reference from contract for

    Hi,
    I am posting a sales document( Type: WA)  created with reference from contract document(  type wk2) for delivery.  The item category in the sales order of the Item is WAN. On posting this document for delivery I am getting the error as "Item category WAN is not defined".  Please help me out how to resolve this issue.
    Thanks
    Jayant

    Hi Jayant,
    I think its value contract releated error,
    You suppose to check material item category group through T.code-MM02 into sales2 tab and maintain VCIT,
    and do item category assignment through T.code- VOV4.
    plz.maintain like that,
    WK2 -          -VCIT-         -           - WAN(contract item category),
    wk2  -          -        -VCTR-          - WAN((contract item category),
    you should also maintain same against your standard Sales Document type and for Standard Item category into VOV4,
    WA(standard docu.type) -VCIT-                             -                -TAN(your standard docu.type item category),
    WA(standard docu.type) -         -VCTR(item usage)-              -TAN(your standard docu.type item category),

  • Sales Order CReated with Reference

    Hi,
    I created a sales order with reference to an existing order. I created delivery based on the new order that was created with reference. HOwever, if i try to get the sales order number of my delivery, the sales order that i am getting is the sales order number that was referenced. How will I retreived the new sales order number from VBFA?
    Thanks,
    Louisse

    Hello,
             We can follow the below Procedure to get the Sales Order Number from VBFA Table.
    1. Input the Delivery in VBELN field to get VBELV (Sales Order)
        Number with VBTYP_V = 'C' (Order). 
    2. Now, if the Sales Order which is fetched is the one which is
        referenced, then Input the Sales Order Number again in the
        VBFA Table into the Field VBELV and fetch the Sales Order
        Number (New) in the VBELN Field with VBTYP_N = 'C'.
    3. You should be able to satisfy your requirement.
    Hope it was clear.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Sales Order Created with reference to Contract - Exchange rate Issue

    When Sales Order created with reference to contract VBKD fields KURSK and KURSK_DAT gets copied from contract and not redetrmined based on pricing date and Exchange rate type. I expected it to be determined based on pricing date is standard. What I am missing, should it be controlled by data transfers
    If Document currency and condition currency are different it cause problems with incorrect condition values are calculated, as KOMP-KURSK are copied from VBKD-KURSK
    Any help or directions would be greatly appreciated . We are on 4.7 ISOIL
    Sincerely Julietta

    Well,
    and if we have the same issue, but we don't have OIL Version, but simple 4.6C, which solution has to be applied then?
    Thank you
    Standa

  • Add pricing condition within order created with reference to SPA

    Hi,
    I have a requirement wherein I need to add a $50 fine to order if the total order weight is below 75 kg.
    Problem I am facing is with orders created with reference to SPA wherin pricing is not calculated but copied from SPA.
    Please help me in solving this issue.
    Also, Please let me know the pricing userexit / BADI for CRM wherein this can be coded.
    Regards,
    Willban
    Edited by: willban_sap on Jul 21, 2010 11:43 AM

    Hi Willban,
    wonder wether you could use any weight dependent (net or gross) group condition with a scale. Delow 75 kg across all grouped items you would charge 50 $ and starting at 75 kg you would charge 0 $. As the scale base should get adjusted with the copy / create with reference step, I see no need for custom code.
    Best Regards,
    Michael

Maybe you are looking for

  • PRECISO DE AJUDA. Após instalar a ultima actualização do Mavericks, meu MacBookPro não inicia no arranque.

    Depois de baixar e instalar a ultima actualização do Mavericks 10.9.3 Pediu a activação da conta do iCloud (Apple id e password), eu escolhi "fazer isso mais tarde" Cerca de 7 minutos depois tentei reiniciar, Mas o sistema não arranca, só aparece o s

  • Export to PDF not working

    Presses "Export to PDF" Submit Button (custom button) and pdf comes up (Grey) and throws error message Adobe reader cannot open RequisiitonDetails.pdf because it is either not a supported file type or the file has been damaged..... My Code: OAApplica

  • OS 10.4.11 sys prefs whacky

    "Hi running OS 10 4 11 on G5 1.8DP system preferences seems to be acting odd. Mouse buttons have changed sides. cant switch back in prefs. reset P Ram. Any thoughts?"

  • Data not Updated in Custom Screen fields-Vendor Master

    Hello, I have created a custom screen in vendor master transaction and also implemented the two BADI's below. Business Add-In: Processing Master Data Enhancements (CUSTOMER_ADD_DATA/VENDOR_ADD_DATA) Passed the Custom Program and Screen No in the meth

  • Creating material in multiple plants and storage locations

    Hi Gurus, I am wondering if someone could help me out in this issue, I frequently get 1's and 2 materials creation requirement , is there any simple way , while creating material in MM01 , I could create/extend to all plants and storage locations. I