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

Similar Messages

  • 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 create a new view by copying from standard view in IC webclient?

    Hello, expert,
    I need to enhance a sap standard component (BP_Factsheet), inside it I need to create a new view by copying from an existing standard view (Acitivities). However when I try to make a copy, I was asked for destination BSP application, I entered the Z-Application which I used when defining enhancement for the component. After the copy, I don't see the new view.
    Then I tried the destination BP_factsheet, instead of the z-application, then after the copy, I can see the new view. However since it's in SAP application, it seems like it's a MOD, not enhancemnet, and inside the new view, the classes (for context, context nodes, etc.) are not in custom namespace (not starting with Z).
    So please let me know how can I make a copy of sap standar view in custom namespace.
    Thanks in advance.
    Jayson

    When copying you can put any BSP name..normally the practice is to prefix the standard name with a Z.
    Secondly when you want to make changes to the individual classes and methods you need to right click and say enhance. Then the AZ class names etc would be generated. The view should appear in the component wherein you copied the original view from.
    I hope this helps.
    The cookbook should have details on this. Otherwise also its quite intuitive.
    Award points if it helps.
    Thanks.

  • 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

  • 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

  • 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).

  • 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

  • Partner function not copied from notification to order

    hi
      i am using same partner determination procedure for notification and service order. i have defined some new partner functions in the procedure. the problem i'm facing is that only the partner functions which are made mandatory are getting copied from notifictaion to order. however i cannot make all the partner functions mandatory because they may not be relevant for all cases.
    is this common behaviour of system and if so is there any solution (without making partner functions mandatory)
    thanks in advance
    koustav

    Hi,
      This is a Standard Functionality . You can try using the below USER-EXIT for your requirement.
    EXIT_SAPLV09A_002:
              Use this is customer has to be maintained to a specific sales area.
    EXIT_SAPLV09A_003:
               This suits more of your requirement.
    INCLUDE ZXV09U03 - Add your code to copy the specific partner alone to the Doucment if it is an NOTIFICATION TO ORDER alone.
    This is used to control the orgin of partners in the Partner determination procedure..
    Hope this helps.

  • Creating po in me21n with copy from other po

    Can any one tell the procedure to create PO copying from other PO.
    Edited by: Csaba Szommer on Jan 18, 2012 8:06 AM

    Hi,
    Option 1: Goto ME21N, In item Overview move to right side to 4th last column "Purchasing Doc." enter your PO number & press enter, PO will get copied if 1 item is there , otherwise if more than 1 item in PO then it will ask for which item Number you want to copy.
    Option 2: Enter ME21N T.Code
    Click u201CDocument Overview onu201D
    Click u201CSelection Variantu201D and Select Purchase Orders and Enter your PO No. & execute
    you will be able to view in document overview the PO No & Item No,
    Select the PO you need to copy & Click u201CAdoptu201D and you will see all PO details related copy to new PO which you can save.
    Option 3: Enter ME21N T.Code
    Click u201CDocument Overview onu201D
    Click u201CSelection Variantu201D and Select Purchase Orders and Enter your PO No. & execute
    you will be able to view in document overview the PO No & Item No,
    Now select 1st item and press Shift button(or you can also use Ctrl button on your keyboard for randomly selecting the line item) & with mouse select all line items and click 'Adopt' button (next to selection variant button).
    All the 100 items will get copied in the New PO.
    Refer below link for clarification,
    [Copying old PO to New PO|Re: Copy the Purchase Order]

  • Function modules copy from standard FM?

    Hi All,
    I am copying FM CS_BOM_EXPL_MAT_V2 into ZCS_BOM_EXPL_MAT_V2 for some calculation.
    I already copied the Function group CSS4 into ZCSS4 but when I m using ZCS_BOM_EXPL_MAT_V2 in my program I am not
    getting the right BOM.
    Where I am worng plz let me know?
    Thanks and Regards
    Steve

    Copying a complete function group is fraught with future challenges, particularly because you will not get the benefit of any changes / fixes to the standard code that SAP may deliver in subsequent support packs...  You may be better off enhancing the standard code or perhaps writing a "wrapper" around a call to the standard CS_BOM_EXPL_MAT_V2 (or the CS_BOM_EXPLOSION' function that it calls) and use this wrapper logic to customise the results returned to your calling program.
    Jonathan

  • How can i create an album with chose category list and next/previous button

    hello guys im working on a project for my uni i finished the whole website but one thing is missing
    i need to create a photo album with next and previous button, with choosing a category and inside each category i have like 5 pictures and i can change with the next/previous buttons to see another picture of the  same category.
    Please see the picture below to see what i mean.
    some told me it needs flash but i dont know how to work on it :S so plz if anyone can help me
    thank you

    Dear Mr. Murphy,
    thank you for your help.
    Actually i have tried to search for a tutorial and i found that one that was very helpful and gave me the half solution. the part i found and it worked with me is the part of the next and previous buttons and moving from an image to another.
    SO the part i still need is the list so when i click on a category i get the pictures of the chosen category, I had the idea of create a flash for each category alone and maybe i will be able to add them all together.
    But i guess it's too much work and there must be a way where i can make it all in one flash file.
    If you have any idea let me know please, thank you again for your help and i'm trying to search for the AS3 image gallery as you told me.
    Regards

  • 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

  • How do i create a static function in a class and implement ActionListener?

    i am trying to create a pop up dialog box in a seperate class.
    and i want to make the Function static, so that i only need to access it with the class name.
    But how do i have a ActionListener ?
    everything in a static function is static rite?

    import java.awt.*;
    import java.awt.event.*;
    public class StaticFunction
        Dialog dialog;
        private Panel getUIPanel()
            Button button = new Button("show dialog");
            button.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    if(dialog == null)
                        dialog = OutsideUtility.showDialog("hello world");
                    else if(!dialog.isVisible())
                        dialog.setVisible(true);
                    else if(dialog.isVisible())
                        dialog.dispose();
                        dialog = null;
            Panel panel = new Panel();
            panel.add(button);
            return panel;
        private WindowListener closer = new WindowAdapter()
            public void windowClosing(WindowEvent e)
                System.exit(0);
        public static void main(String[] args)
            StaticFunction sf = new StaticFunction();
            Frame f = new Frame();
            f.addWindowListener(sf.closer);
            f.add(sf.getUIPanel());
            f.setSize(200,100);
            f.setLocation(200,200);
            f.setVisible(true);
    class OutsideUtility
        public static Dialog showDialog(String msg)
            Button button = new Button("top button");
            button.setActionCommand(msg);
            button.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    Button button = (Button)e.getSource();
                    System.out.println(button.getActionCommand() +
                                       " from anonymous inner listener");
            button.addActionListener(new ButtonListener());
            Button anotherButton = new Button("bottom button");
            anotherButton.setActionCommand("another button");
            anotherButton.addActionListener(localListener);
            Panel north = new Panel();
            north.add(button);
            Panel south = new Panel();
            south.add(anotherButton);
            Dialog dialog = new Dialog(new Frame());
            dialog.addWindowListener(closer);
            dialog.add(north, "North");
            dialog.add(new Label(msg, Label.CENTER));
            dialog.add(south, "South");
            dialog.setSize(200,200);
            dialog.setLocation(425,200);
            dialog.setVisible(true);
            return dialog;
        private static WindowListener closer = new WindowAdapter()
            public void windowClosing(WindowEvent e)
                Dialog dialog = (Dialog)e.getSource();
                dialog.dispose();
        private static ActionListener localListener = new ActionListener()
            public void actionPerformed(ActionEvent e)
                Button button = (Button)e.getSource();
                System.out.println(button.getActionCommand() +
                                   " from localListener");
        private static class ButtonListener implements ActionListener
            public void actionPerformed(ActionEvent e)
                Button button = (Button)e.getSource();
                String ac = button.getActionCommand();
                System.out.println(ac + " from ButtonListener");
    }

  • How to call LabView function with nested structs and arrays from C#

    Hi,
    I've got the following functions defined in a LabView-dll:
    uint32_t __stdcall VOSC04_General(uint32_t Command, TD18Hdl *Messages);
    uint32_t __stdcall CheckDiameter(uint32_t Command, TD6 *Parameter);
    typedef struct {
     double SP_Diameter;
     double SP_Tolerantie;
     double PV_Diameter;
     } TD6;
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    typedef TD18 **TD18Hdl;
    I've got some C#-code (generated by PInvoke-wizard) to call these functions:
    [DllImport("vosc04.dll")]
    public static extern uint32_t VOSC04_General (uint32_t Command, ref TD18Hdl Messages);
    [DllImport("vosc04.dll")]
    public static extern uint32_t CheckDiameter(uint32_t Command, ref TD6 Parameter);
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD6
       public Double SP_Diameter;
       public Double SP_Tolerantie;
       public Double PV_Diameter;
    The problem now is that when I try to read the Messages-output-parameter, I get wrong values (pointers?). I think that the problem lies in the fact that LabView generated a TD18 AND an TD18Hdl struct.
    How can I correct this problem?
    Can anyone give me some advise to correct this problem? I'm not an expert in C, only in C#.

    I think the problematic line is this:
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    It looks like C# is forcing the array to be of size 1. The thing is, LabVIEW stores arrays as handles which are double pointers to a structure which contains a size element followed by the elements of the array. For your example, int32 arrays are stored in memory as:
    handle -> location -> |size|element 1|element 2| .... |element size-1|
    Because C does not do runtime array bounds checking, you can get away by declaring the structure as:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    The correct declaration would've been:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[size];
     } TD18;
    But size is not a constant, so C/C++ won't let you do that. So, even though the array is declared to be of size 1, it can (and usually does) have more than 1 element. This does not cause a problem because LabVIEW allocates memory based on the actual size of the array.
    If I were you, I'd try to change the prototype of the LabVIEW DLL function to accept a pointer to array data, rather than an array handle, pre-allocate memory for the array in C# and pass a pointer to the allocated memory into LabVIEW so that LabVIEW can "fill it up".
    Let me know if you need more information.
    Pramod

Maybe you are looking for

  • Problem with Proximity Sensor

    When I decide to make a call the Proximity Sensor turns off the screen, but when I go to hang up the call I can't because the screen is still turned off. This means I can't hangup on any call! Using iPhone 4 (1 Day Old)

  • CUCM SIP Route Pattern Discussion

    Hello, I have some questions about SIP route pattern configuration but the main question is I can configure SIP route pattern to match any IP address. so if the user dial any ip address it will hit this route pattern. Regards,

  • Integration pack compatibility

    Hi I have SCO 2012 R2 installed with SCCM integration pack version 7.2 and SCCM 2012 sp1 I am trying to create a simple runbook like "get collection members". however the rumbook fails: error "failed to get members of collection 'collectionID'. canno

  • How to go beyond 5 authorized computers?

    I currently have a desktop, a laptop, an old laptop with a crashed hard drive that was authorized, an IPad2, and Ipod, and an IPhone and a desktop at work--all of this I want to authorize to share information across iTunes and the Cloud. This is 7 co

  • More feed posting problems

    I am also getting either error 5002 or just "The iTunes store could not process your request, please try later" The feed has been validated OK It is: brandspanking.co.uk/podcasts/parker/parkerpodcast.xml I have tried on 3 PCs and 2 macs in 2 complete