Copy From Button Combo

Hi
I am using DI API 8.8 and .net 2.0 to create addon.
I have created a COPY FROM button combo with values SALES QUOTATION and SALES ORDER in my user defined form.
I am also able to handle the event for that.
I want to copy the data from SALES ORDER when i select SALES ORDER. How to do this?

Hello,
Quickly added some pseudocode, search the forum for more specified code.
Documents SalesQuotation = (Documents) company.getObject(.....)
salesorder.getbyKey(salesquoteDocEntry);
SalesQuotation .saveXML(XMLSTREAM)
// Change values in the xmlfile in the XMLSTREAM
Documents Salesorder = (Documents) company.getObject (.....)
Salesorder.getAsXml(XMLSTREAM)
HTH Regards Teun

Similar Messages

  • Simulate Copy-From Button Click on Delivery Document

    Hi Friends,
    How can I 'programmatically' click on Copy From button, and then select the Sales Order?
    (I could get a forum post to capture the Copy From button click in the delivery document, but I want to do clicking also programmatically)
    I could click on the Copy-From button programmatically.
    After that, till I manually click on "Sales Order", control is not returned to the program (It acts similar to a message box:( )
    Do you know any ways to acheive it?
    Thanks.
    Regards,
    Geetha

    Hello Rajkumar,
    I came upon this thread but did not find it to be quite complete (and see that you were looking for a similar answer).  I just wanted to let you know how I am using "Copy To" to copy a Sales Order into an A/R Invoice.  I realize you are desiring a "Copy From" but I believe the steps will be the same (and believe others will value seeing this).  I know there is discussion above that the copy to is a matrix but I found the simplest approach is to just treat it like a combobox.  Here is my code in C#:
    // Declare my variables
    SAPbouiCOM.Form oForm = null;
    SAPbouiCOM.Item oItem = null;
    SAPbouiCOM.ComboBox oCombo = null;
    // Set my form to the currently active form
    oForm = SBO_Application.Forms.ActiveForm;
    // Simulate a "Click" on the Copy To (for A/R Invoice)
    oItem = oForm.Items.Item("10000329");  // This is the Item Number for Copy To
    oCombo = (SAPbouiCOM.ComboBox)oItem.Specific;
    oCombo.Select("A/R Invoice", SAPbouiCOM.BoSearchKey.psk_ByDescription);  //If I want to copy to an A/R Down Payment, I simply change the "A/R Invoice" to "A/R Down Payment"
    In short, by using the combo and "Selecting" the parameter I want, my belief is that SAP automatically initiates the remainder of the work.  Hope this helps you (and others).

  • Copy From Button similar to Purchase Order

    Dear Members,
    I have a user defined for named Quotation. I want to create a Copy from button  in Purchase Order through coding, similar to those present in sale order and copy the contents in quotation to  Purchase Order.
    Please send some sample coding to create a  Copy From  button  in Purchase Order  , and to list  my user defined form quotation,
    similar to present in sale order Copy to A/R Invoice.
    Help will be appreciated to solve this issue.
    Thanks and Regards,
    Venkatesh.R

    could somebody explain me why cannot text in code format and its in one line? - i cannot insert the code for few weeks. thx
    Enable email in your profile and Ill send the code to email - i cannot insert it here.
    Edited by: Petr Verner on Jul 24, 2009 10:22 AM
    If pVal.FormTypeEx = "142" And pVal.BeforeAction And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
                    Dim oform As SAPbouiCOM.Form
                    oform = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                    oform.Items.Add("combo", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
                    oform.Items.Add("button", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    Dim oitem As SAPbouiCOM.Item
                    Dim obutton As SAPbouiCOM.Button
                    Dim ocombo As SAPbouiCOM.ComboBox
                    oitem = oform.Items.Item("combo")
                    oitem.Left = -1 * oform.Items.Item("10000329").Left - 100
                    oitem.Top = 399
                    oitem.Width = 100
                    ocombo = oitem.Specific
                    ocombo.ValidValues.Add("1", "First")
                    ocombo.ValidValues.Add("2", "Seccond")
                    oitem = oform.Items.Item("button")
                    oitem.Width = 100
                    oitem.Left = oform.Items.Item("10000329").Left - 100
                    oitem.Top = 400
                    obutton = oitem.Specific
                    obutton.Caption = "Copy From"
                End If
    If pVal.ItemUID = "button" And pVal.FormTypeEx = "142" And pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
                    Dim oform As SAPbouiCOM.Form
                    oform = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                    Dim oitem As SAPbouiCOM.Item
                    Dim ocombo As SAPbouiCOM.ComboBox
                    oitem = oform.Items.Item("combo")
                    oitem.Left = oform.Items.Item("10000329").Left - 100
                    ocombo = oitem.Specific
                    oitem.Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                    oitem = oform.Items.Item("button")
                    oitem.LinkTo = "combo"
                    oitem.Update()
                End If
    Edited by: Petr Verner on Jul 24, 2009 10:31 AM

  • How to get Reference Doc from copy from button

    Hi..
    I would like to know if there is a way to get the source document or reference document number with-out  sdk or add on development , if you used the copy from button to populate the data?
    sample
    in order entry you can populate the data by using the copy button then choose sales quotation,  then using formatted search or select statement could i get the source documents (sales quotation number)..
    thanks
    Loren

    Hi Loren,
    If you need to get the BaseRef field before saving the document you can use the screen reference in your query:
    SELECT $[$38.44.0]
    Just selects the BaseDocument reference number from a row.  You may want to also use:
    SELECT $[$38.43.0]
    To get the Base Document Type (sales quotation, delivery etc.)
    Bob Richardson

  • Edit "Copy From button" on  A/R Invoice

    Hi
    I've added two extra Forms  "Loading"  &  "Unloading" under A/R Invoice . This is not the problem.
    The problem is---
    I want to get the "Copy from Unloading" dropdown  after clicking the Copy From button  on A/R Invoice  Form.
    Rgds
    Subrata

    Hello,
    (I didn't understand the answer. Would I solve the following problem by that answer?)
    I've made a form for Unloading of goods.
    Now I have to copy the details of the form from "Unloading Form"   to
    "A/R  Invoice"  .
    So, I've to add  one item "Unloading"  with others-"Sales Quotaions",  "Sales Orders" ,  "Deliveries"   in the "Copy From"  button  of  A/R Invoice Form.
    Is it possible?
    If yes, then How?
    Rgds
    Subrata

  • How to disable and hide the menu items of 'copy From' button of Goods Recei

    hi expert,
    I am new in SAP B1. so please help me.
    Q:How to disable and hide the menu items of 'copy From' button of Goods Receipt PO form?
    Regards
    sanoj

    Hi Sanoj,
    Try This.....
    If pVal.FormType = "143" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE And pVal.BeforeAction = False Then
                oform = sbo_application.Forms.GetFormByTypeAndCount(pVal.FormType, "1")
                Dim oitem As SAPbouiCOM.Item
                oitem = oform.Items.Item("10000330")
                'To Disable the button
                oitem.Enabled = False
                'To hide the button
                'oitem.Visible = False
            End If
    Thanks
    Shafi
    Edited by: shafi_sunshine on Sep 15, 2011 7:35 AM

  • Version with "copy to" and "copy from" button

    Hello,
    in which version/SP/PL was the buttons included with "copy from" and "copy to" in quotation, order,...?
    Thanks
    Johann

    Hi Johnn,
    I think these options are there in SBO from Patch 28 onwards.
    Regards
    Raja.S

  • Create a Similar Function of COPY TO and COPY FROM buttons

    Hi you all.
    I'm developing an small add-on. I add a new button in the Good Receipt PO form (143) that will copy all lines of this document to the Delivery form (140).
    The thing is that I was able to add the button and open the form once I click on it, but I don´t know how to copy the lines from one form to the other. I don't need to copy the document´s head information because the Good Receipt PO works with Vendors and the Delivery works with Customers.
    If you could help me with this, I'd really appreciate.
    Thanks in advance
    Regards

    Hi Jose
    Maybe this blog will be helpful:
    Simple Sample Blog - UI API Matrix SerializeAsXML Method
    Kind regards,
    Radek

  • Control the combo box select of COPY FROM in Delivery Order

    Dear all
    I have a requirement where in the user wants to restrict the "copy from" button on the delivery order. They want the delivery orders to be created only from Sales orders.
    So that would mean that i do a bubbleevent = false when any other row is selected in the combo box dropdown. But I am not able to get the control to the combobox.
    In the system information it says that the form is "-9876", but couldnt catch any event on it either.
    Any suggestions to control the selection of the "COPY FROM" combobox is most welcome.
    Thanks in advance
    Rashmi

    Hi Use This Ihave Checked This
    If pVal.Before_Action Then
                    If pVal.FormType = 140 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT And Not pVal.InnerEvent Then
                        If pVal.ItemUID = "10000330" Then
                            If pVal.PopUpIndicator = "2" Then
                                objAddOn.objApplication.SetStatusBarMessage("You Can Not Copy From Returns")
                                BubbleEvent = False
                                Exit Sub
                            ElseIf pVal.PopUpIndicator = "0" Then
                                objAddOn.objApplication.SetStatusBarMessage("You Can Not Copy From Sales Quotations")
                                BubbleEvent = False
                                Exit Sub
                            End If
                        End If
                    End If
                End If
    Mohamed Zubair

  • Credit Memo Copy From Issue

    I have an issue with 2 specific users on the system,  Both Users are 'Professional" users with Full Authorization to all Modules on the system.
    When the two users go into Credit Memo entry,  enter a Customer then Click the  COPY FROM button,  only 2 Open Invoices are displayed in the Invoice Window for the particular customer.  There are MANY Open Invoices for the Customer.  This is NOT specific for this customer,  BUT All customers behave this way for the 2 users in question.
    ANY OTHER USERS on the system can see All open Invoices when using the Copy from feature.
    We already gave full Authorization to the users.  Turned off Authorizations, and updated and the gave the users Full authorizations and updated.  The users were NOT logged in at the time of the changes to the user's Authorizations.
    There are NO Add ons running for the users in question.
    We also copied  Authorizations from a 'Working" user to the users in question but there are no effect.\
    Is there something OTHER Than authorizations that could cause this problem? 
    Any other ideas or suggestions  would be appreciated!!
    Thanks in advance!!
    Dana

    Have you implemented Data Ownership Authorization?  NO
    What is your B1 version and PL? SAP B1 2007 SP00 PL47
    Again,  it is only effecting 2 users with Full Authorizations and Professional License.
    The Invoices displayed are owned by a different user and other invoices owned the
    the same other user are not displayed.

  • Regarding Purchase Order Screen - Copy From

    Hi friends,
    In purchase order screen <b>Copy From</b> Button was in disable mode.i want to enable that button . i am using SAP Business One 2005 A(6.80.317) SP:01 version.
    expecting reply soon ......
    Thanks & Regards
    SARAN

    Hi,
    You cannot enable the Copy From button on the purchase order window. This is because there is no originating document for a purchase order (which is the first document in the chain on the purchasing side).
    Perhaps if you explain your reasons for needing this functionality someone can come up with a suitable workaround.
    Kind Regards,
    Owen

  • Copy From / Copy To

    Hi,
    Is it possible to use Copy From / Copy To functionality for Add-on Screens?
    For Example:
    As of now, PO has a copy to for GR-PO, and GR-PO has a copy from for PO.  I introduce a new screen for subcontracting DCs alone, for which I need to select a few PO and move the data to my DC screen.  Can I add my screen name (DC) in Copy To Menu of PO?  Similarly, is it possible to add the Copy From button to my screen, and add PO there?

    Hi,
    you can create your own button for user screens, but the functionality behind
    the "copy to/from" you have to program yourself ! there's no sap function that will copy the fields for your user form.
    regards
    David

  • Copy from through code

    Hi,
    I want to do the copy from functionality from Goods receipt PO   to Purchase through code in my Addon.Can we assign  a link between these two documents?How will we copy multiple goods receipt PO to one purchase Invoice.?I have no provision to add a copy from button or matrix.All should be done through code.
    Regards
    MANJU

    Hello,
    You can do this vis the DI API. Here is an example code that copies two Goods Receipt POs to one AP Invoice:
    Dim rs, errCode, errMsg
    Dim oAPInvoice As SAPbobsCOM.Documents
    oAPInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
    'We will create the AR Invoice based on two Goods Receipt POs. Both have CardCode = "V10000"
    'Goods Receipt PO DocNum 92 has 3 lines
    'Goods Receipt PO DocNum 94 has 1 line
    oAPInvoice.CardCode = "V10000"
    oAPInvoice.DocDueDate = Now
    'DocNum 92 line 0
    oAPInvoice.Lines.BaseEntry = 92
    oAPInvoice.Lines.BaseLine = 0
    oAPInvoice.Lines.BaseType = CInt(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
    'DocNum 92 line 1
    oAPInvoice.Lines.Add()
    oAPInvoice.Lines.BaseEntry = 92
    oAPInvoice.Lines.BaseLine = 1
    oAPInvoice.Lines.BaseType = CInt(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
    'DocNum 92 line 2
    oAPInvoice.Lines.Add()
    oAPInvoice.Lines.BaseEntry = 92
    oAPInvoice.Lines.BaseLine = 2
    oAPInvoice.Lines.BaseType = CInt(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
    'DocNum 94 line 0
    oAPInvoice.Lines.Add()
    oAPInvoice.Lines.BaseEntry = 94
    oAPInvoice.Lines.BaseLine = 0
    oAPInvoice.Lines.BaseType = CInt(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
    rs = oAPInvoice.Add
    If rs <> 0 Then
        oCompany.GetLastError(errCode, errMsg)
        MsgBox("Error: " & errCode & " - " & errMsg)
    Else
        MsgBox("Done")
    End If
    Regards,
    Paul Feeney
    SAP Business One Forums Team

  • Copy To - Copy from not working

    i am trying to create an invoice drawing from a sale order. but when clicking for 'Copy from' from Invoice its showing the Document wizard and on clicking 'Finish' it is not taking any items to the invoice row. similarly i tried to do it from Sale order to Invoice using 'Copy to' but it is not at all opening any invoice document.
    confused with the SBO actions. wat may be the reason?
    Kindly Help me!!!
    Shiva.
    Edited by: Philip Eller on May 30, 2008 8:37 AM
    Edited by: Philip Eller on Jun 13, 2008 9:34 AM*

    Hi
    Just check the following.
    You need select the customer code, name
    Press the copy from button and choose "sales order"
    select the row(yellow color will appear) you want to copy the document.
    Draw document wizard will appear.
    Press finish
    System message will appear for taxcode
    Press Yes or No
    Then the data will be copied in your target document.
    I think you would have done everything and am wondering why the data are not copying.
    Just explain your steps please.
    Regards,
    Venkatesan G.

  • When will Copy from be enabled??

    Hi all,
    In the Sales Quotation and the Purchase Order documents we have the "Copy From" button which is always disabled. When will this be enabled? Please give a simple example.
    Thanks in advance,
    Vasu Natari.

    Hello Vasu,
    The Copy From option in the Sales Quotation and Purchase Order functions will never be enabled. This is because the Sales Quotation and Purchase Order are the first possible documents that can be created in Sales and Puchasing modules, correspondingly.
    The Copy From option seems to be there for consistency of UI layouts, but will never be used for the two functions.
    I hope this addresses your enquiry.
    Regards,
    Lorna Real

Maybe you are looking for

  • Accounting Entry getting passed in case of Make to Order Scenario

    Hi Experts, In Make to Order scenario, as per my knowledge, when the goods is recieved from Production Order the Accounting entry gets passed is Inventory A/c Debit and Cost of Goods Produced Credit. But how is Cost of Goods Produced, which is  an ex

  • External Hard Drive doesn't work on one usb, but works on the other, help?!

    Hi there, I have a very strange issue here. When connecting my external portable Maxtor 60GB disc to my MBP, I usually use the usb port on the right side of my laptop. However tonight, I connected it to the left usb port and noticed a horrible clicki

  • Recovery

    I have an iPhone4 (GSM) model that is stuck in recovery mode, and whenever I restore it an error comes up saying: Cannot restore iPhone, Error Code:1013. Can anybody help me with this , Thanks.

  • Yellow status does not start  j2E server0

    Hi Gurus, Everything was working fine until today.  SDM and dispatcher green light but server0 yellow status for about for  1 hour now and still does not start. Status starting framework... your help is greatly appreciated. defaultTrace.1.trc below:

  • Text under my embedded Vimeo videos

    Hi.  When I embed videos hosted on Vimeo, it places this purple/pink text/links under the player window.  How can i get rid of this?