How to process a JCO.Table object line by line

Hello all.
I am new to development using JCo. How to process a JCO.Table line by line?! I want to print each line of the table using System.out.println ...
Thx a lot
Mike

Hi Mike,
here is a sample code for you,
JCO.Table codes = function.getTableParameterList().getTable("INFO");
for (int i = 0; i < codes.getNumRows(); i++) {
          codes.setRow(i);
          int tmp = new Integer(codes.getString("POSNN")).intValue();
          String tmpStr = new String(Integer.toString(tmp));
          ret = result.put(tmpStr, codes.getString("VBELN"));
then using System.out.println(), you can print these values.
regards,
Abhijeet

Similar Messages

  • How to process old WLSTORE table

    Hi,
    For some reason, the JDBC WLSTORE table, has reached more than 200.000 rows. For this reason due performance, we created a new WLSTORE.
    Question is how to process the transations that are keep in the old and unused WLSTORE?
    Best REgards,

    WebLogic is not designed to support this scenario -- but I can give you some ideas that will hopefully get you started. There's no direct way to merge the two stores together, and the methods that do exist may not be "fool-proof" in your particular use case: the recovery process can differ widely from application to application. You may want to consider contacting customer support.
    Processing messages in an old store usually requires (A) the domain, JMS server(s), SAF agent(s), destinations, and store configured the same way they were when the original messages were stored (especially the same configuration names), (B) your application for processing messages, (C) booting the system, and (D) running the application until all messages are processed.
    Also, if your app is transactional (eg, if it uses JMS transacted sessions or JTA/XA transactions), you should (1) copy the current TLOG (default file store) and save it, and then (2) replace it with the original TLOG from the time you system is transactional. (If your using the "JDBC LLR" feature, you should also perform similar steps with the LLR database table.) If you don't perform this step, and you had "in-doubt" transactions at the point you shutdown the original system, its possible that you can lose messages are cause duplicate messages. It’s likely too late for this step perhaps, as the TM subsystem abandons in-doubt transactions that are more than 24 hours old by default (this, in turn forces all in-doubt transactions to rollback, and is equivalent to what happens when deleting the TLOG – but the fully correct behavior would be to complete the commit of those in-doubt transactions that have already been partially committed).
    If step D above is impractical, in some cases it is possible to merge messages from two stores by (1) booting the original system using steps A thru C above, (2) using the console “message management” screens to export the messages to a file, (3) restarting the system with the current store and TLOG, (4) using console "message management" screens to import the messages from the file back into the current system. If I recall correctly, the console export utility uses considerable JVM heap if one attempts to export too many messages in the same operation, also, this process will change the timestamps on the messages and likely cause the old messages to sort after the current messages (so even though the imported messages are older than current messages, current messages will be first in line.)
    As another approach if D is impractical, in some cases it is possible to merge messages from two stores by following steps A-C above, and then configuring a message bridge to forward the messages from the old recovered queue in the old domain into a running new domain. The problem with this approach is that domain names and server names will be duplicated between the two domains, an unsupported setup that can lead to connectivity problems and XA issues (especially if you're using transactions to ensure exactly-once forwarding). To work around the problem, messages can be first forwarded to an intermediary destination on yet a third domain, before ultimately forwarding them into the final system. If I recall correctly, the bridge has a feature that can cause it to preserve the message-id and timestamp of WL JMS messages when they are forwarded between two WebLogic destinations.
    Note that all of the above assumes that the application processing of the old messages doesn't depend on or modify database data / external data that have already been modified by processing that occurred after the original message store was deleted and replaced. For example, some messages may have been superseded by newer messages and therefore should not be processed (depends on the application). If this is an issue, then many use cases would likely require some sort of manual reconciliation and/or custom application coding to guard against old messages messing up state that should not be changed, or using current state that won't reconcile sanely with the old message's "view of the world".
    Hope this helps,
    Tom
    Edited by: TomB on Oct 14, 2009 1:13 PM

  • How to pass the JCO Table and Structure in a collection List to frontEnd

    hi,
    I have a BAPI which is returns me a Table and a structure. As i have used JCO I will receive it in JCO Table and JCO Structure. Now the question is that how I should pass both these of these using a collection to the frontend for displaying the data from it.
    Thanks' & Regards,
    Samir

    Hi Samir,
    As you are trying to pass the Table and the Structure in the form of collection to the JSP page, you can create a javabean with the structure similar to that of the table/Structure.
    Lets assume you have a table called Employee with Emp_Name, Emp_Age, Emp_Sal as three columns, create a java class by name Employee which implements Serializable and attributes as Emp_Name, Emp_Age and Emp_Sal. Generate the setters and getters for the same. In your EJB code, create an instance of this Employee class and set the attributes and save it in a HashMap in the form of key value pair, Value being your Employee class instance and key be your Employee Name. Return the HashMap in your EJB code.
    Use the HashMap in your JSP. Get the Iterator for the HashMap and Loop through the keys to get the values.
    Hope this helps.
    Regards,
    Rekha Malavathu

  • How to keep together Title + table's line across pages

    Hi all, I have a question.
    I'm trying to create a .rtf template where I have a table with 4 lines and a title <PROJ_NAME>
    I need to repeat this table (with all the necessary information - 4 lines) as many times as the projects' names are stored on the DB.
    For example: if the employee has 4 projects, on the report I will see 4 times these table and the relative project name as title.
    So, the repeating group mechanism works perfectly, but I am not able to control how the table's lines are splitted across pages....
    In other words if I have two pages in my .rtf template and I am at the end of the first page:
    1) I don't want to see the title on the bottom of the first page and the relative table above on the second page (title and table splitted on two differents pages)
    2) I don't want to see the title and a portion of the table on the bottom of the first page and the rest of the table (1,2 or 3 lines) above on the second page (table splitted on two differents pages)
    At the end I'd like to see always title and table together even if the page finishes. If the title + table exced the table's vertical border, it has not be splitted, but rewrite entirely (title + table) on the next page.
    The syntax is this:
    <?for-each-group:G_PROJ;./PROJ_NAME?><?PROJ_NAME?>
    TABLE WITH 4 LINES
    <?end for-each-group?>Page break
    I tried also, reading the forum, to use the paragraph properties (Keep lines together), but nothing.....
    Anyone can suggest me something ?
    Thanks in advance
    Alex

    After the for loop,
    take a table (suppose A) with one row and one column. In that table insert the Project name tag. Below that tag, insert an inner table(suppose B) in table A with 4 rows and columns you wish. Now select the outer table A(select the whole table), and in the table properties/Row , in the options , uncheck the 'Allow row to break across pages' property.
    end the for loop.

  • How to process a collection of objects of a derived class?

    I'm trying to clean up some duplicated code.
    I have several classes that have a common parent class. I have in my application several searching and sorting functions that operate on these child classes. But I realized that this is code duplication, as these functions only need data members of the common parent class. So I figured I could make these functions operate on collections of the parent class.
    But during refactoring, I ran into a compiler error that surprised me. This is the SSCCE:
    import java.util.*;
    public class Tinker {
      static class ParentClass {}
      static class ChildClass extends ParentClass {}
      static void processClassCollection( Collection< ParentClass > c ) {}
      public static void main( String[] args ) {
        Collection< ParentClass > parentClassCollection = new Vector< ParentClass >();
        Collection< ChildClass > childClassCollection = new Vector< ChildClass >();
        processClassCollection( parentClassCollection );
        processClassCollection( childClassCollection ); // Why won't this compile?
    }Every object of type ChildClass is also of type ParentClass, right? Every function that requires a ParentClass object, can be passed a ChildClass, right?
    Then, if a function requires a Collection< ParentClass >, why can't I pass it a Collection< ChildClass >?
    Apparently there is a gap of my understanding, either of inheritance, or of Collections. I would very much appreciate clarification, and any suggestion how to deal with such a case.
    -Ron.

    ejp wrote:
    Why can't a Collection< ChildClass > be used where a Collection< ParentClass > is expected?Because Collection< ChildClass > doesn't extend Collection< ParentClass >. They are separate unrelated types.And I think part of the reason this is not allowed. i.e. you can pass ChildClass to a method which expects a ParentClass. is that java doesn't know if you are just looking at the Collection or modifying it. If you could add anything which extends ParentClass to the collection, the collection of ChildClass would not be valid any more.
    The difference is that in the first case, you are passing the reference by value and changing it in the method has no impact on the caller. However, in the case of the Collection, you could corrupt it if you can add objects which the caller does not expect to be in it.

  • How to process batch in ABAP Objects content

    Hi,
    my name is Wadim and i am sorry for my bad english
    I have a problem, maybe someone of you can help me.
    I need a class to pracess batch(bdc) oder a Call transaction which i had recorded with SHDB. I search for it but without success.
    The class should habe all function like the default BDC-Include "bdcrecx1".
    Is there a default class in SAP?
    Thanks for help.
    regards mark
    Edited by: Krapp Wadim on May 20, 2010 9:19 PM

    There is a class CL_HRTNM_QUOTA_BATCH_MANAGER which has a lot of batch functionality.
    I've never used it. My company has our own Z class for batch processing. A lot of similar code is in CL_HRTNM_QUOTA_BATCH_MANAGER in methods BDC_DYNPRO, BDC_FIELD, BDC_SESSION, CREATE_BATCH.
    In my quick look at that class, I don't see where they call BDC_CLOSE_GROUP but you should have a method with this also.

  • How to determine actual table control line

    Hi experts,
    How can I determine the table control line in case of scrollable table control.
    I tried this one, but did not worked correctly:
        GET CURSOR LINE l_line_fc2.
        l_line = l_line_fc2 + ctrl_mod-top_line - 1.
    Everytime I try to catch the top_line of the table control its value is always 1. Is it possible?

    Hi,
    Current table control line will be found in SY-STEPL.
    Regards
    Mohammad Shaik.

  • Webdynpro JCO Connection Object

    Hello,
    I have a Webdynpro Application with a View.
    In the View I call a RFC-Function at the R3 System.
    Now I want Debug the ABAP-Coding in the RFC-Function.
    Do anyone know how I get the JCO Connection Object from a Model Class ?
    I've checked this:
    wdContext.nodeEqui().getCurrentElement().model();
    It doesn't work,.....
    I want set the ABAP debuging ON with the Methode setAbapDebug(true)
    Thanks
    Mike

    Hello,
    Thanks,
    now it works. I've never told you, I used a Custom Controller in der View.
    Client myClient =
                wdThis
               .wdGetMyEquiController()
               .wdGetContext()
               .nodeBapi_Equi_Create_Input()
               .currentBapi_Equi_Create_InputElement()
               .modelObject()
               .modelInstance()
               .getJcoClient();
         myClient.setAbapDebug(true)
    Best regards,
    Mike

  • How to process Line Selection on ALV Table in ABAP WebDynpro

    Hi there,
    I have a view with an ALV table whose context node retrieves its data from a Service Call for a method.
    The method provides certain data of a database table which the ALV displays.
    Now I would like to be able to select one row of that ALV table and after pressing a button or doubleclicking on the row or whatever a different view (as for me it is also ok on the same view) should appear to display the details of that selection.
    I only need to know how to retrieve the selected data.
    Or its index within the internal table.
    I am already looking for hours for a useful thread and actually there is one which obviously is about a similar issue apart from the multiple selection part: 
    How to process multiple row selection in ALV table in Wendynpro ABAP? Help!
    but i am afraid that i don't understand it. Or at least I misunderstand it since it does not work with me.
    The system example mentioned in the thread does not help me either because it somehow does not correspond to my needs, does it?
    It would be GREAT if somebody could help me with that. Please keep it simple for I am not an expert in webdynpro yet (obviously ^^) and also please explain in detail what I have to do with the context nodes since I am not sure whether the selection is stored in my already existing node or whether I need a special one for that.
    Thanks!!
    christina

    Hi Christina,
    If you just want to get one column data of the line that user clicked, use the Web Dynpro Code Wizard to Read Context of attibute you needed, then you will get code as follow:
    * Define data for read attribute
        node_alv TYPE REF TO if_wd_context_node,
        elem_alv TYPE REF TO if_wd_context_element,
        stru_alv TYPE if_view_display=>element_alv ,
        item_column_name  LIKE stru_alv-column_name.
    * navigate from <CONTEXT> to <ALV> via lead selection
      node_alv = wd_context->get_child_node( name = if_view_display=>wdctx_alv ).
    * get element via lead selection
      elem_alv = node_alv->get_element(  ).
    * get single attribute
      elem_alv->get_attribute(
        EXPORTING
          name =  `COLUMN_NAME'
        IMPORTING
          value = item_column_name ).
    The value of column_name is stored in item_column_name.
    If you need the index that the user clicked, try this:
    * Definition of field symbol for index
      FIELD-SYMBOLS : <fs_index> TYPE data.
    * Get the selected index
      ASSIGN r_param->index->* TO <fs_index>.
    The index of clicked line is stored in field symbol <fs_index>.
    Hope it will help.
    Best Regards,
    Stephanie

  • How can I fill a table of objects from cursor with select * bulk collect???

    Hi All, I have a TYPE as OBJECT
    create or replace type dept2_o as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    I can fill a table of objects from cursor with out select * bulk collect...., row by row
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    i integer;
    begin
    i:=0;
    dept_o_tab.extend(20);
    for rec in (select * from dept) loop
    i:=i+1;
    dept_o_tab(i):=dept2_o(
    deptno => rec.deptno,
    dname => rec.dname,
    loc =>rec.loc
    end loop;
    for k IN 1..i loop
    dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
    end loop;
    end;
    RESULT
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    But I can't fill a table of objects from cursor with select * bulk collect construction ...
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    begin
    dept_o_tab.extend(20);
    select * bulk collect into dept_o_tab from dept;
    end;
    RESULT
    ORA-06550: line 6, column 39;
    PL/SQL: ORA-00947: not enough values ....
    How can I fill a table of objects from cursor with select * bulk collect???

    create or replace type dept_ot as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    create table dept
    (deptno number
    ,dname varchar2(14)
    ,loc varchar2(13)
    insert into dept values (10, 'x', 'xx');
    insert into dept values (20, 'y', 'yy');
    insert into dept values (30, 'z', 'zz');
    select dept_ot (deptno, dname, loc)
      from dept
    create type dept_nt is table of dept_ot
    declare
       l_depts dept_nt;
    begin
       select dept_ot (deptno, dname, loc)
         bulk collect
         into l_depts
         from dept
       for i in l_depts.first .. l_depts.last
       loop
          dbms_output.put_line (l_depts(i).deptno);
          dbms_output.put_line (l_depts(i).dname);
          dbms_output.put_line (l_depts(i).loc);    
       end loop;
    end;
    /

  • Object Services - How to loop at a table ' osreftab ' ?

    Hi Object Services Gurus,
    I'm try to transform a table selected via object services (transaction service) to a table with type VRM_VALUES (the one necessary to fill selection screen listbox parameters).
    So, i have a table with type 'osreftab' and i need to loop it accessing the attributes of its lines (which i just know at runtime). How can i proceed with this? Below is what i'm trying..
    * (This is a method of a global class which pretends to transform a variable 'osreftab' into a variable 'vrm_values').
    DATA: l_wa_value TYPE VRM_VALUE,
               l_i_values TYPE VRM_VALUES.
    DATA: l_o_tax_code TYPE OSREF.
    * im_tax_codes type is osreftab
    LOOP AT im_tax_codes INTO l_o_tax_code.
    *l_wa_value-KEY = l_o_tax_code->?
    *l_wa_value-text = l_o_tax_code->?
      APPEND l_wa_value TO l_i_values.
    ENDLOOP.

    You can't cast b/w data reference which l_tax is and object reference which l_o_tax_code is.
    osref is a generic object type and you store a reference to some object in it, right? So the question is: what kind of object you store there? Please note - this must be an object reference , not data reference .
    i.e
    "here goes some class
    class zcl_spfli definition.
    endclass.
    class zcl_spfli implementation.
    endclass.
    "here is an OBJECT REFERENCE for it, (so I refer to a class) i.e persistent object to table SPFLI
    data oref_spfli type ref to zcl_spfli.
    "but here I have a DATA REFERENCE (so I refer to some data object) i.e DDIC structure SPFLI
    data dref_spfli type ref to spfli.
    So my OSREF can hold only oref_spfli but it not intended for dref_spfli . That's why you get this syntax error. Once you have stored reference to zcl_spfli in osref then you will be able to dereference it and access this object's attributes.
    data: osref type osref.
    create object osref_spfli.
    osref = osref_spfli.
    "now osref holds reference to object, you can deference it
    oref_spfli ?= osref.
    osref_spfli->some_attribute = ....
    OSREFTAB is just a table whose line is of type OSREF (so can hold multiple object references - one in each line).
    Regards
    Marcin

  • How to display JCO.Table in jsp, CRM ISA

    Hi,
    I have got a JCO.Table with results from teh CRM system and now want to display this in ISA.
    Is there any templates, or code, that could guide me as to how to transfer the table to jsp.
    thanks,
    sunil

    Hi Sunil,
    The code from bean class is here,
    public void listDetails(String releaseGroup,String releaseCode)                                 
    throws Exception
                    try
                         if (mRepository == null )
                              System.out.println("NuLL");
                         try
    IFunctionTemplate                                         ft=mRepository.getFunctionTemplate("BAPI_REQUISITION_GETITEMSREL");
    myFunction=ft.getFunction();
                   catch (Exception ex)
                   throw new Exception(ex + "Problem retrieving JCO.Function object.");
          if (myFunction == null)
         System.exit(1);
    mConnection.execute(myFunction);
                   JCO.ParameterList input = myFunction.getImportParameterList();
                           input.setValue(releaseGroup,"REL_GROUP");
                           input.setValue(releaseCode,"REL_CODE");
                           input.setValue(releaseFlag,"ITEMS_FOR_RELEASE");
                             System.out.println("Imported");
                         catch (Exception ex)
                              ex.printStackTrace();
                              System.exit(1);
                          mConnection.execute(myFunction);
                JCO.Table codes = null;
               codes =myFunction.getTableParameterList().getTable("REQUISITION_ITEMS");
               size =codes.getNumRows();
               if (size == 0)
                  System.out.println("No value matches the selection cretaria");
               purchaseRequisitionNo = new String[size];
               item   = new String[size];
               requestorName = new String[size];
               description = new String[size];
               creatorName = new String[size];
               purchaseRequisitionDate = new String[size];
               plant = new String[size];
              // getter methods
         public int  getSize() { return size; }
         public String getPurchaseRequisitionNo(int i){return                                                        purchaseRequisitionNo<i>; }
          public String getItem(int i) { return item<i>; }
         public String getDescription(int i) { return description<i>; }
         public String getCreatorName(int i) { return creatorName<i>; }
         public String getPurchaseRequisitionDate(int i)
                                             {return purchaseRequisitionDate<i>; }
         public String  getplant(int i) { return plant<i>; }
    Now in the JSP page get the number of entries in the table and try to get row by row from the bean class using the row number.
    <%
    int count = PR.getSize() ; // This method will return the number of
    rows in the table.
    for ( int i = 0; i < count ; i++ ) {
    %>
    <TR><TD ALIGN = "center"><%= PR.getPurchaseRequisitionNo(i) %> </TD>
    <TD ALIGN = "center"><%= PR.getItem(i) %> </TD>
    <TD ALIGN = "center"><%= PR.getDescription(i) %></TD>
    <TD ALIGN = "center"><%= PR.getCreatorName(i)%> </TD>
    <TD ALIGN = "center"><%= PR.getPurchaseRequisitionDate(i)%> </TD>
    <TD ALIGN = "center"><%= PR.getplant(i)%> </TD>
    <% } %>
    Hope this is a simple way to get your requirement.
    Let me know if this does not help you.
    Thanks
    Kathirvel.

  • How to create an instance of JCO.Table

    hi,
    I am facing a problem while migrating from JCO Client service to Connector Framework.
    Basically i get the output in the format of IRcordSet after calling Back End system.
    I need to convert this to JCO.Table to continue in my code so that i wont change all the code which uses JCO.Table.
    Ex:
                   IConnection connection = null;
                   IConnectorGatewayService service = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
                   try {
                             ConnectionProperties props = new ConnectionProperties(request.getLocale(),request.getUser());
                             String destination = Util.getBESystemID(request);
                             connection = service.getConnection(destination, props);
                             IInteraction interaction = connection.createInteractionEx();
                             IInteractionSpec intSpec = interaction.getInteractionSpec();
                             intSpec.setPropertyValue("NAME", BE_FM_DOWNLOAD); //Function Call /RPM/MSPC_DOWNLOAD;
                             RecordFactory rf = interaction.getRecordFactory();                    
                             MappedRecord inputParams = rf.createMappedRecord("INPUT");
                             //inputParams.put(BE_IN_DOWNLOAD_APP, BE_IN_DOWNLOAD_APP_DEFVALUE, JCO.TYPE_STRING);
    JCO.Table to Object (??)
                             inputParams.put(BE_IN_DOWNLOAD_EXPORTLOG, exportLog);
    exportlog is type JCO.Table
                             MappedRecord outputParams = (MappedRecord) interaction.execute(intSpec, inputParams);
                             connection.close();
              Object result = outputParams.get(BE_OUT_DOWNLOAD_EXPORTLOG);
              //JCO.Table m_downloadExportLog = (JCO.Table)result;//error this wont work
    //Here i need to get m_downloadExportLog
    IRecordSet irs = (IRecordSet)Object;
    Here how can get JCO.Table from IRecordSet???
    Thanks in advance!!
    Regards,
    Ramesh.

    You could retrieve the values and store in a TableView in the following manner.....
    //zData is a JCo.Table
         for (int i = 0; i < TableData.getNumRows(); i++) {
                             //ABCBean zAIPBean = (ABCBean)zData.getRow(i);
                   j = 0;
              //for (JCO.FieldIterator e = zData.fields(); e.hasMoreElements(); ){
                   JCO.FieldIterator e = zData.fields();
                   while (e.hasMoreElements()) {
                             JCO.Field field = e.nextField();
                             data<i>[j] = field.getString();
                             j = j + 1;
                        zData.nextRow();
    Consider rewarding points if the issue is solved ...
    Thanks,
    Devina

  • I am using pages '09. I have been trying to put together a report and I am using tables to help keep my data in line. My data is free text and would like to footnote certain data as to it origin, but footnoting is grey-out. How can I footnote on table mod

    I am using pages '09. I have been trying to put together a report and I am using tables to help keep my data in line. My data is free text and would like to footnote certain data as to it origin, but footnoting is grey-out. How can I footnote in table mode inpages '09?

    Footnotes can only be inserted in the main text area between the margins on a Word Processing document.
    Peter

  • JCO Table Parameter whith 2 lines...

    Hello all.
    How to send 2 lines parameters in the same table to call a BAPI.
    This is my code ...but not work !
    JCO.Table ItemDocCont = function.getTableParameterList().getTable("T_DOCITE");
                     ItemDocCont.setRow(1);
         ItemDocCont.appendRow();
              //item 1
              ItemDocCont.setValue("XXX", "BUKRS");
              ItemDocCont.setValue("1", "BELNR");
              ItemDocCont.setValue("2009", "GJAHR");
              ItemDocCont.setValue("001", "BUZEI");
              ItemDocCont.setValue("TESTE SGTXT ITEM 001", "SGTXT");
              ItemDocCont.setValue("100,00", "WRBTR");
              ItemDocCont.setValue("6154110199", "HKONT");
              ItemDocCont.setValue("0000000000", "AUFPL");
         ItemDocCont.appendRow();
                                               //item 2
              ItemDocCont.setValue("XXX", "BUKRS");
              ItemDocCont.setValue("1", "BELNR");
              ItemDocCont.setValue("2009", "GJAHR");
              ItemDocCont.setValue("002", "BUZEI");
              ItemDocCont.setValue("TESTE SGTXT ITEM 002", "SGTXT");
              ItemDocCont.setValue("100,00-", "WRBTR");
              ItemDocCont.setValue("2113110001", "HKONT");
              ItemDocCont.setValue("0000000000", "AUFPL");
                        mConnection.execute(function);     
    thanks in Advance.
    Regards.
    Taylor

    Hey Taylor,
    Two small issues: Before changing the data you must set the right row. You did this for the first row, but this is incorrect, because row numbers start with 0. I'd do the following:
    ItemDocCont.appendRows(2);
    //item 1
    ItemDocCont.setRow(0);
    ItemDocCont.setValue("XXX", "BUKRS");
    ItemDocCont.setRow(1);
    //item 2
    ItemDocCont.setValue("XXX", "BUKRS");
    mConnection.execute(function);
    In general it's better to create all the new rows at the same time. In your case with two rows that won't make any difference, but in general the one time allocation provides better performance.
    cheers, harald

Maybe you are looking for