Copy data from a UDO form to Goods Receipt PO using UI API

Hi, all
I tried to copy data from a UDO form to Goods Receipt PO using UI API through following codes.
It works fine while copying to a Item-type Goods Receipt PO.
But when the doctype is set to service, I got errors.
I use for-loop to copy two items, Description and LineTotal, into the matrix of Goods Receipt PO form, but both failed.
any suggestion?
Edited by: Chao-Yi Wu on Aug 25, 2009 5:50 AM

Hi  Chao-Yi Wu ,
SBO_Application.ActivateMenuItem("2306")
Dim oFormGR As SAPbouiCOM.Form = SBO_Application.Forms.ActiveForm
Dim omtxIQC, omtxGR As SAPbouiCOM.Matrix
Dim oedIQC, oedGR, oed As SAPbouiCOM.EditText
Dim ocbIQC, ocbGR As SAPbouiCOM.ComboBox
oFormGR.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
oedIQC = oFormIQC.Items.Item("13").Specific
oedGR = oFormGR.Items.Item("4").Specific
oedGR.Value = oedIQC.Value
oedIQC = oFormIQC.Items.Item("21").Specific
oedGR = oFormGR.Items.Item("24").Specific
oedGR.Value = oedIQC.Value
oedIQC = oFormIQC.Items.Item("edComments").Specific
oedGR = oFormGR.Items.Item("16").Specific
oed = oFormIQC.Items.Item("3").Specific
oedGR.Value = oedIQC.Value + ", Goods Recript PO:" + oed.Value
ocbIQC = oFormIQC.Items.Item("cbDocType").Specific
ocbGR = oFormGR.Items.Item("3").Specific
If ocbIQC.Selected.Value = "I" Then
     ocbGR.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
Else
     ocbGR.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
End If
omtxIQC = oFormIQC.Items.Item("mtx_0").Specific
For i As Integer = 1 To omtxIQC.RowCount
omtxGR = oFormGR.Items.Item("38").Specific
       If ocbIQC.Selected.Value = "I" Then
            oedIQC = omtxIQC.Columns.Item("c_ItemCode").Cells.Item(i).Specific
            oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
            oedGR.String = oedIQC.String
            oedIQC = omtxIQC.Columns.Item("c_AQty").Cells.Item(i).Specific
            oedGR = omtxGR.Columns.Item("11").Cells.Item(i).Specific
            oedGR.String = oedIQC.String
            oedIQC = omtxIQC.Columns.Item("col_19").Cells.Item(i).Specific
            oedGR = omtxGR.Columns.Item("14").Cells.Item(i).Specific
            oedGR.String = oedIQC.String
   Else  
omtxGR = oFormGR.Items.Item("39").Specific
           oedIQC = omtxIQC.Columns.Item("c_Descrp").Cells.Item(i).Specific
           oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
           oedGR.String = oedIQC.String
           oedIQC = omtxIQC.Columns.Item("col_16").Cells.Item(i).Specific
           oedGR = omtxGR.Columns.Item("12").Cells.Item(i).Specific
           oedGR.String = oedIQC.String
  End If
            Next
for items the matrix is 38 and for service the matrix is 39
Rgds
Micheal

Similar Messages

  • Copy Data from a System Form to another (GetByKey)

    Hi All,
    I 'll try the following: "After the succesful add of a specific Credit Note I want to copy the Cardcode and the Cardname (of this Credit Note) to cardcode and cardname of a Delivery Note".
    I tried the following code without success:
                If (pval.FormType = 179) And (pval.ItemUID = "1") And (pval.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And (pval.Before_Action = False) And (pval.ActionSuccess = True) Then
                    Dim DocEntry As Integer
                    Try
                        Dim oCredit As SAPbobsCOM.Documents
                        oCredit = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
                        Dim oDeliv As SAPbobsCOM.Documents
                        'Creation of Business Objects
                        oDeliv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
                        oCredit.GetByKey(DocEntry)
                        oDeliv.CardCode = oCredit.CardCode
                        oDeliv.CardName = oCredit.CardName
                    Catch ex As Exception
                        MessageBox.Show(ex.Message)
                    End Try
    Thanks in advance,
    Vangelis

    Hello,
    There are a few errors in the code you've pasted:
    oCredit = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
    oDeliv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
    a) both the above lines are creating delivery notes.
    b) where are you getting the docentry value from, get it from the form using UI-API
    c) you can also get the cardcode / cardname value using UI-API, by referring to the fields on the form, rather than using oCredit object.
    c) you are not calling add/update after writing delivery note
    d) lets be clear that you cannot change cardcode / cardname in already created delivery note, and if you are adding a new delivery note you can not do it by just specifying cardcode / cardname
    Rahul

  • How to upload data from excel to form using webutil

    Hi,
    In the sample provided by Oracle
    http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
    Note 247606.1 How to Copy Records From a Form Into Excel
    It shown the methods of how to copy data from form to excel but is there any sample to provide the step on how to read the cell from excel into Form in 10g.

    declare
    args client_ole2.list_type;
    application client_ole2.obj_type;
    vworkbooks client_ole2.obj_type;
    vdoc     client_ole2.obj_type;
    vworksheet     client_ole2.obj_type;
    vrange               client_ole2.obj_type;
    begin
    -- create app object
    application := client_ole2.create_obj('Excel.Application');
    client_OLE2.SET_PROPERTY(application, 'Visible','True');
    -- get workbooks object
    vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
    -- and open a file
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
    vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- get a worksheet object
    -- for this to work you need to know the sheet name or its index
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 1); <-- name or index
    vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);          
    client_ole2.destroy_arglist(args);
    -- get a range object which in this case is just a cell
    -- for this to work you need to know the cell coordinates
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'B6');          
    vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
    client_ole2.destroy_arglist(args);
    -- and here you get the value
    message(client_ole2.get_char_property(vrange,'Value'));
    -- release objects          
    client_ole2.release_obj(vrange);
    client_ole2.release_obj(vworksheet);
    client_ole2.release_obj(vdoc);
    client_ole2.release_obj(vworkbooks);
    client_ole2.release_obj(application);
    end;

  • Copying data from excel(more than one row) and pasting into table control

    I have a requirement to copy data from excel and have it pasted it into the corresponding fields table control when the user clicks on an icon.For the first part I used a class to copy it from the clip board.By the previous process,I get the data inside an internal table, but even after  trying to split the data using 'split at cl_abap_char_utilities=>horizontal_tab into table itab.' it's not working.The table and the excel file are of the same structure.
    Does anyone know any cause as to why it might not work?Is there any other way to achieve my objective?
    Bon

    Hi,
    try to get data into internal table as below
    TYPES :     BEGIN     OF             ty_data          ,
                zbukr     TYPE           payr-zbukr       ,
                hbkid     TYPE           payr-hbkid       ,
                hktid     TYPE           payr-hktid       ,
                rzawe     TYPE           payr-rzawe       ,
                chect     TYPE           payr-chect       ,
                laufd     TYPE           reguh-laufd      ,
                laufi     TYPE           reguh-laufi      ,
                lifnr     TYPE           reguh-lifnr      ,
                vblnr     TYPE           reguh-vblnr      ,
                rwbtr     TYPE           reguh-rwbtr      ,    "uncommented
                unique_no TYPE           char13           ,   " Added SAP Doc. No. and current year concate in NEFT,RTGS and Fund Transfer cases
                END       OF             ty_data          .
    DATA :      wa_file   LIKE LINE OF   it_file          ,
                wa_data   TYPE           ty_data          .
    DATA:      it_data1 TYPE              kcde_intern WITH HEADER LINE,
               wa_data1 LIKE LINE OF      it_data1.
    start-of-selection.
    CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
          EXPORTING
            filename                = lv_file1
            i_begin_col             = '1'
            i_begin_row             = '4'
            i_end_col               = '11'
            i_end_row               = '60000'
          TABLES
            intern                  = it_data1
          EXCEPTIONS
            inconsistent_parameters = 1
            upload_ole              = 2
            OTHERS                  = 3.
        IF sy-subrc = 0.
          PERFORM format_data.
        ENDIF.
    FORM format_data.
      DATA : ld_index TYPE i.
      FIELD-SYMBOLS : <fs>.
      DATA it_tab LIKE wa_data OCCURS 0 WITH HEADER LINE.
          LOOP AT it_data1.
            MOVE it_data1-col TO ld_index.
            ASSIGN COMPONENT ld_index OF STRUCTURE
            it_tab TO <fs>.
            MOVE : it_data1-value TO <fs>.
        MOVE it_data1-value TO p_table.
            AT END OF row.
              APPEND it_tab.
              CLEAR it_tab.
            ENDAT.
          ENDLOOP.
           it_data[] = it_tab[] .
        ENDIF.
    endform.                    "format_data

  • How to transfer data from Mobilephone's form to PC's form?

    Hi
    I'm sorry about the title. The title itself may be hard to understand or even misleading. So I try to explain what is my problem below and hope to find some advices or help about it.
    My question is about the Mobile function in LiveCycle ES2.5. LiveCycle ES2.5 could let users start workflow(for example: a approval process) by a mobile device. I think this function could help sellsmen to report customer information(for example: basic information of a customer's offer) more faster and make the whole application precedure faster than before.
    I try to make a simple demo to show my thought. My needs are written below
    1,  By using iphone, a sellsman write some basic information(such as: name, address, offer number) in a mobile form and submit the information to Data Center and start a approval workflow in Workspace at the same time.
    2,  When the specific employee of Data Center opened the workspace, he will notice the new task and open it. At this time, a dedicated offer sheet will be opened and The Most Important Thing is that the information sent by the selssman are filled in the specific items of the sheet. And The Other Items in the sheet should be editable.
    3,  The mobile form and the offer sheet are both created by LiveCycle ES2.5.
    The most thing I want to do is the second need :   the information sent by the selssman are filled in the same items of the sheet. And the other items in the sheet should be editable.
    I faced problem here.I built a mobile form and a offer sheet, then I noticed that if I want to transfer data, I need Data Model embedded with the forms. But mobile form's Data Model is .fml, offer sheet's Data Model is .xsd.  I don't know how to make the two Data Model connected. I also try to only use .fml to embedded the both forms, but as a result, the items in the offer sheet could not be edited.
    This is my question, and in fact, my way may not be a good one or even just be wrong.  If you notice that, please fix it or if you think there is much easier to realize my needs, please teach me how to do.
    Best wishes.
    En Shoku

    Sharing my thoughts:
    FML and XSD are just Data Models. Which means, they defines how the data are represented within your form/guide.
    But the actual data must be in a XML format only.
    I hope its just a matter of transforming the XML data from Guide[Mobile form] to PDF [PC's form].
    What do you think?
    Nith

  • Extracting data from a pdf form

    Hi,
    livecycle es2, workbench 9.0
    I'm new to workbench and have a problem extracting data from a pdf form submitted to a short lived process.
    I have set up the following very simple process :
    default startpoint >  ProcessForm > exportData > set value > set value > Write Document
    The intention is to update the document and write it to disk. So far, each step works except for the 'export data' where I cannot get the pdf to extract to xml.
    The Input to the 'export data' step is a variable (myDoc), Data Type: Document,  created from the incoming PDF form.
    If I write out myDoc it is an exact copy of the incoming document, so I guess the start and finish steps of of the process are OK.
    The incoming (PDF) form I was given had no data schema, but  I thought I could access the form data by exporting to an xml variable....
      Service : FormDataIntegration  / exportData
    input (PDF Document)    variable : myDoc
      output(Data extracted)     variable : myXMLData
    Then in the next step (set value) access the xml element I am after ..
    Mappings
    Location:  /process_data/@groupId      Expression: /process_data/myXMLData/xdp/datasets/data/form1/mainPage/groupId
    This is did not work, so I got the incoming form, exported the form data to an xml file,  and created a schema using  Stylus Studio. I then imported that into the myXMLdata definition. ( BTW - Do I need to specify the root node after importing it ? )
    Still not working !
    Extra info : The XML view of my incoming  form shows I have a minimal dataset definition- is this OK ??
    <connectionSet xmlns="http://www.xfa.org/schema/xfa-connection-set/2.8/">
       <?originalXFAVersion http://www.xfa.org/schema/xfa-connection-set/2.4/?></connectionSet>
    <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
       <xfa:data xfa:dataNode="dataGroup"/>
    </xfa:datasets>
    The schema created by stylus studio has none of the xfdf, xfa settings I have seen on other schemas - is this OK ?
    Any help to get this fixed greatly appreciated
    thanks
    steve

    hey thanks for the offer, but I am now sorted after I found a simple working example on line.
    This is a similar process to the one I am working on, and is clearly described and easy to follow...
    http://eslifeline.wordpress.com/2009/04/25/extracting-data-from-signed-pdf-using-livecycle -server/
    girish bedekar - I thank you !

  • How to copy data from mac to external hard

    how to copy data from mac to external hard

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

  • ADF 11g can not select and copy data from cell of readonly table in IE

    hi,
    In ADF 11g, when render view object as readonly table with Single RowsSelection, using IE browser can not select and copy data from the cell, but it work in firefox.
    is it a bug?
    Edited by: kent2066 on 2009-5-18 上午8:46

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • Upload data from excel to forms 9.0.4 using webutil 1.0.5

    Hi,
    can anybody provide me the code how to upload the data from excel to forms 9.0.4 using ole2 fuction. From forms to excel it is working fine.
    Regards

    Hello,
    Instead of selecting one key figure in data view, please select all key figures of the planning book and then try all the steps which you have carried out.
    please revert after you carry out this.
    Regards,
    Prafulla

  • How to retrieve input data from a HTML form in the UTF-8 cha

    I encountered the following problem with a JWeb Application:
    I tried to write a JWeb-Application for OAS 4.0, that retrieves
    input data from a HTML form and writes it into an Oracle
    database.
    All processing should be done in the UTF-8 character set.
    The problem is, that the form data retrieved by getURLParameter
    are always encoded in a non-unicode character set and I found no
    way to change this.
    Can anybody tell me what I should do to get the form data in the
    UTF-8 character set?
    null

    Hi
    Try set in the JWEB application's Java environment such
    SYSTEM_PROPERTY: file.encoding=UTF8.
    Andrew
    Thomas Gertkemper (guest) wrote:
    : I encountered the following problem with a JWeb Application:
    : I tried to write a JWeb-Application for OAS 4.0, that
    retrieves
    : input data from a HTML form and writes it into an Oracle
    : database.
    : All processing should be done in the UTF-8 character set.
    : The problem is, that the form data retrieved by getURLParameter
    : are always encoded in a non-unicode character set and I found
    no
    : way to change this.
    : Can anybody tell me what I should do to get the form data in
    the
    : UTF-8 character set?
    null

  • How to combine data from different input forms outside a nested iView

    Hi,
    i try to combine data from different input forms in a single one.
    Because of space reasons in Flex compiling i already use nested iViews. Within these nested iViews its possible to use the 'combine' function to do this.
    But in the main iView I cant compose these function with other elements. I need to do this because of using these model in Guided Procedures with output parameters. These parameters I only get with a 'endPoint'. Unfortunatly its not possible to combine data from different input forms into the 'endPoint'.
    Is there any solution?
    Thanx
    Mathias

    Hi Scott,
    i tried this already and i also tried to map all parameters in the endpoint by drawing lines from the other forms and assign the 'empty parameters' by a formula.
    And when i create a collable object in GP and assign the VC iView, only the parameters of the parent-form (the form who trigger the event) are shown as output-parameters.
    Maybe any other ideas? I cant believe that such a simple thing is not possible?!?!
    In my opinion, thats a bug, that I'am not able to use the combine-operator in the main VC-iView. Whats your mind?
    greets
    mathias

  • Copy data from one Table to another Table

    How can I copy data from one Oracle Table to another Oracle Table on a different server? Question 2: How can I clear all of the data in one Table with a single SQL script?
    Thanks...

    Question 1:
    I assume you have the privileges. If you don't, ask the DBA to give them to you. Then
    1. Login to database_source (It could be either the source or the target. Let's assume it's the source.)
    2. Create a database link to database_target: CREATE DATABASE LINK link_to_database_target CONNECT TO myuserid IDENTIFIED BY mypassword USING 'database_target'; Note the single quotes.
    3. Copy the table data: INSERT INTO targetowner.mytable@link_to_database_target SELECT * FROM sourceowner.mytable; COMMIT;
    Question 2:
    You have two options, but you may not have privileges for both.
    Option 1:
    DELETE FROM tableowner.tablename; COMMIT;
    Advantage: Since this is a DML (Data Manipulation Language) statement, you have to commit the transaction. Also, the data will be gone but the table size is NOT changed, so it's ready for accepting replacement data. DML statements can simply be executed not only from SQL scripts, but from PL/SQL scripts as well.
    Disadvantage: Slow, because all record deletion is logged, so you can recover from it by issuing a ROLLBACK; instead of the COMMIT; above. The table size is NOT changed, so if you are short of disk space or tablespace space, you have not resolved the issue.
    Option 2:
    TRUNCATE TABLE tableowner.tablename;
    Advantage: Since this is a DDL (Data Definition Language) command, you do NOT have to commit the transaction. (DDL commands automatically commit both before and after their execution.) The table size will be changed back to the initial extent size which is the minimum size a table can have and can only be set when the table is created. If it needs to be changed, the table has to be dropped and recreated with a different initial extent size. The statement execution of this command is not logged, therefore it's much faster then the DELETE.
    Disadvantage: No rollback. Being a DDL, this command cannot be executed straight from PL/SQL. If you need to issue this within PL/SQL, you will have to use dynamic SQL.

  • Copying data from one table to another table thru java

    Hi
    I have to copy data from table emp in Database A to table emp in Database B. My input would be table name and number of rows to be fetched. these rows i need to insert in table B.
    The problem over here is I won't be having any info. of table emp i.e the number of columns it has and their type.
    So is their any way i can copy the data from one table to other without having the info abt the number of cols and their type.
    TIA

    Cross post - http://forum.java.sun.com/thread.jspa?threadID=5169293&messageID=9649839#9649839

  • Copy data from one table to another

    Hello everyone,
    I have a student table with fields sno, sname. I created another table student1 with same fields sno, sname and with one new field class.
    Now i want to copy data from sno, sname of student table to sno, sname of student1 table when the class field in styudent1 has no data i.e., its null.
    Could any one let me know how to do this?
    Thanks,
    Prathima

    i want to copy data from sno, sname of student table to sno, sname
    of student1 table when the class field in styudent1 has no dataSo what is the join condition? What column in STUDENT1 tells us what row in STUDENT to copy?
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • I need to copy data from a table in one database (db1) to another table in

    Hi
    I need to copy data from a table in one database (db1) to another table in another database (db2).
    I am not sure if the table exists in db2,,,if it doesnot it needs to be created as well data also needs to be inserted...
    How am I supposed to this using sql statements..?
    I shall be happy if it is explained SQL also...
    Thanking in advance

    How many rows does the table contains? There are manyway you can achieve this.
    1. export and import.
    2. create a dblink between two databases and use create table as select, if structure doesnot exists in other database, if structure exists, use, insert into table select command.
    example:
    create a dblink in db2 database for db1 database.
    create table table1 as select * from table1@db1 -- when there is no structure present
    -- you need to add constraints manually, if any exists.
    insert into table1 select * from table1@db1 -- when there is structure present.
    If the table contains large volume of data, I would suggest you to use export and import.
    Jaffar

Maybe you are looking for