How to preserve table selections in bc4j?

In a bc4j table with multiple selection, how do I preserve the selections when I navigate the table back and forth? I see examples, which show do-it-yourself data-bound table but not for bc4j.

I did something similar, but my table was in a template. Here is a snippet of my code:
   * handleSelections
   * Keeps track of the rows that the user has selected from one
   * page to the next.
  private static void _handleSelections(
    BajaContext bc,
    Page page,
    PageEvent event)
    // Get the TableState from the session (the TableState keeps track
    // of the blockSize, and the startIndex)
    // the key to get the TableState from the session is the table name   
    HttpSession sess = bc.getServletRequest().getSession();
    TableState tState = (LovTableState) sess.getAttribute(_TABLE_NAME);
    if (tState == null)
      bc.getErrorLog().logMessage("Table state is null.");
      return;
    String selName = PageEventFlattenedDataSet.getFlattenedName(_TABLE_NAME,
                                                                "selectMode");
    String selParam = event.getParameter(selName);
    // get the selections for the visible table rows.
    Boolean[] selections = tState.getSelections(); // tState has selections which is a Boolean array, the length of the table Data.
    if ( (selParam != null) &&
         ("none".equals(selParam) || "all".equals(selParam)) )
      Boolean val = new Boolean("all".equals(selParam));
      tState.setAllSelections(val);
    else
      DataSet tableInputs = new PageEventFlattenedDataSet(event,
                                                          _TABLE_NAME);
      int sz = tableInputs.getLength();
      int startRowIndex = tState.getStartIndex() - 1;
      int endRowIndex = sz + startRowIndex;
      // loop through the visible table rows.
      for (int i=0; i < sz; i++)
        // get the DataObject representing all the input elements
        // on the current table row.
        DataObject row = tableInputs.getItem(i);
        // Check if this row was selected
        Object value = row.selectValue(null, "selected");
        // Record the state of the selection of this row.
        Boolean val = ((value == null)
                    ? Boolean.FALSE
                    : Boolean.TRUE);
        tState.setSelections( (startRowIndex + i), val);
      return;
  }and a snippet of the uit file:
<tableSelection>
<multipleSelection data:selected="." data:selection="selections@tableState@data:rootAttr"/>
</tableSelection>
I'll try to take a closer look at your code to see what you might be doing wrong, but hopefully my code snippet will help.

Similar Messages

  • How to handle table selection

    In the uix guidelines i found the following example on how to handle table selection:
    public static EventResult doSelectionEvent(BajaContext bc, Page page,
    PageEvent event)
    DataObject tableRows = new PageEventFlattenedDataSet(event, "table1");
    int index = SelectionUtils.getSelectedIndex(tableRows);
    String name = "Nothing Selected";
    // make sure that something was selected:
    if (index>=0)
    DataObject row = TABLEDATA.getItem(index);
    name = row.selectValue(null, "name").toString();
    EventResult result = new EventResult(page);
    result.setProperty("action", event.getName());
    result.setProperty("name", name);
    return result;
    It is not clear to me what TABLEDATA is.
    I read in some other thread that it is a DataObjectList and it represents the 'stored dataObjects'.
    I suppose '_TABLE_DATA' is not real code, may i ask for an example with real code to understand what it is?
    Thanks.

    This code works for me, I hope it is useful.
    (NB: i fear you will not read correctly the line
    with the getRowAtRangeIndex instruction. It's a problem with the editor).
    Mauro
    package view;
    import javax.servlet.http.HttpServletRequest;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.cabo.ui.beans.table.SelectionUtils;
    import oracle.cabo.ui.data.ServletRequestDataSet;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    public class GestEsAction extends DataForwardAction
    // To handle an event named "yourname" add a method:
    // public void onYourname(DataActionContext ctx)
    public void onValida(DataActionContext ctx)
    ServletRequestDataSet ds = new ServletRequestDataSet(req,"ReEsamiRichView12");
    int[] indices = SelectionUtils.getSelectedIndices(ds);
    ApplicationModule am = ctx.getBindingContainer().
    getApplicationModule();
    ViewObject vo = am.findViewObject("ReEsamiRichView1");
    int len = indices.length;
    String idEsameRich, currStato;
    for(int i=0; i<len; i++)
    Row row = vo.getRowAtRangeIndex(indices);
    idEsameRich = row.getAttribute("IdEsameRich").toString();
    currStato = row.getAttribute("Stato").toString();
    if (currStato.equals("E"))
    row.setAttribute("Stato","V");
    am.getTransaction().commit();
    // To override a method of the lifecycle, go to
    // the main menu "Tools/Override Methods...".

  • How insert into table select from table works in jdbc driver?

    Hi, Supposing one table has two LOB fields, one LOB field is BLOB type while the other is CLOB type, I use the following sql statement to copy a row into a new row:
    insert into table (id, file_body, file_content) select new_id, file_body, file_content from table where id = '111';
    After commit on the connection, I can see the copied record in the table and both LOB fields are not null and this's the expected behavior.
    However after some days later, the copy function becomes to be a problem, the BLOB field named file_body can be null when the copy job is done, while other fields copy successfully.
    The issue can not be reproduced every time.
    I suppose the jdbc driver may try to allocate byte buffer in the heap to perform copy operation for BLOB fields,if there is no enough memory available in the heap the copy operation may fail but the commit on the connection can be successful.b/c I can see a lot of OOM errors in the log files and I believe this can contribute to the issue.
    Hope someone can give me a hint or comments.
    Thanks,
    SuoNayi

    I want to figure out what's memory leak point and I have tried the following solutions but none worked:
    1.I have tried to dump the memory of the JVM but failed,I can see the following errors :
    [root@localhost xxx]# jmap -heap:format=b 3027
    Attaching to process ID 3027, please wait...
    Debugger attached successfully.
    Server compiler detected.
    JVM version is 1.5.0_16-b02
    Unknown oop at 0x00002b21a24cd550
    Oop's klass is null
    Finding object size using Printezis bits and skipping over...
    Unknown oop at 0x00002b21a3634380
    Oop's klass is null
    Finding object size using Printezis bits and skipping over...
    2.and the thread stack can not be dumped successfully as well:
    Thread 3046: (state = BLOCKED)
    - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
    Error occurred during stack walking:
    the version of java is:
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-b02, mixed mode)
    I have to added dump thread stack option in JVM arguments, -XX:+HeapDumpOnOutOfMemoryError.
    If there are other solutions please let me know, thanks.

  • How to get table selected row without SelectedRowKeys

    Greetings,
    i am using JDeveloper 11.1.2.4.0 ADF application,
    and i have few table that contains only 1 and some times 2 rows. When the table loads,
    by default, the first row is selected, and i cant call a selection listener (by selecting a row and calling
    a function). What i did (and it worked on the past, i don't know why now it doesn't) is:
    i removed the "SelectedRowKeys" property, so it will not auto select the 1st row on load,
    and on selection event i use this function code:
        public void selectDisease(SelectionEvent selectionEvent) {
            Object _selectedRowData =  Disease_Table.getSelectedRowData(); //the table i select a row
            JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding)_selectedRowData;
            Row rw = _nodeBinding.getRow(); //getting error here
      OperationBinding operation = bindings.getOperationBinding("ExecuteWithParams7");
            operation.getParamsMap().put("disease_id", rw.getAttribute("disease_id").toString());
            operation.execute();
            AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabbed);              
    The error:
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
      at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
      at view.navigation.selectArrergy_MED(navigation.java:489)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      ... 48 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
      at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
      at view.navigation.selectDisease(navigation.java:489)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      ... 48 more
    I use the same method on the past on different application, on same jdeveloper version and it worked, i don't understand
    what i am doing wrong here,
    thanks for any help.

    I finally found the solution, since i don't use the table's property to make a current row, i add it programmatically:
        public static Object invokeEL(String el, Class[] paramTypes, Object[] params) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
            MethodExpression exp = expressionFactory.createMethodExpression(elContext, el, Object.class, paramTypes);
            return exp.invoke(elContext, params);
        public static Object evaluateEL(String el) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
            ValueExpression exp = expressionFactory.createValueExpression(elContext, el, Object.class);
            return exp.getValue(elContext);
        public void rowSelected(SelectionEvent selectionEvent) {
            invokeEL("#{bindings.MyVO.collectionModel.makeCurrent}",
                             new Class[] { SelectionEvent.class },
                             new Object[] { selectionEvent });
            Row rw =
                (Row)evaluateEL("#{bindings.MyVOIterator.currentRow}");
            rw.getAttribute("TheAttribueINeed").toString()); //etc....

  • Cannot select ROWID from a join view without a key-preserved table at OCI c

    Hi All,
    Can anybody help me..?
    When i am creating the request in the presentation services ..
    for some of the columns i am getting the following error..by removing those those columns it's working fine..
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1445, message: ORA-01445: cannot select ROWID from a join view without a key-preserved table at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    Please suggest me a solution..
    Thanks in Advance...

    Looks like you have a view that contains the ROWID of another table. Does the view work first from sqlplus? See whether it returns any data. Its a ORA- specific error. So, the error is related to your view rather than BI EE. Also, how many columns are you trying to pull in your report?
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

  • How to do a SELECT from different tables into an internal table?

    How to do a SELECT from different tables into an internal table?
    I want to select data from MARA, MARC and ZPERSON and populate my ITAB_FINAL
    REPORT  zinternal_table.
    TABLES:
      mara,
      marc,
      zperson.
    TYPES:
    BEGIN OF str_table1,
      v_name LIKE zperson-zname,
      v_matnr LIKE marc-matnr,
      v_emarc LIKE marc-emarc,
      v_werks_d LIKE marc-werks_d,
      v_dstat LIKE marc-dstat,
      END OF str_table,
      i_table1 TYPE STANDARD TABLE OF str_table1.
    DATA:
    BEGIN OF str_table2,
    v_mandt LIKE mara-mandt,
    v_ernam LIKE mara-ernam,
      v_laeda LIKE mara-laeda,
    END OF str_table2,
    itab_final LIKE STANDARD TABLE OF str_table2.

    first find the link between mara , marc and zperson , if u have link to 3 tables then u can jus write a join and populate the table u want ( thats final table with all the fields).
    u defenitely have alink between mara and marc so join them and retrieve all data into one internal table.
    then for all the entries in that internal table retrieve data from zperson into another internal table.
    then loop at one internal table
    read another internal table where key equals in both the tables.
    finally assign fileds if sy-subrc = 0.
    gs_finaltable-matnr = gs_table-matnr
    etc...
    and finally append gs_finaltable to gt_finaltable.
    there u go ur final table has all the data u want.
    regards
    Edited by: BrightSide on Apr 2, 2009 3:49 PM

  • How to get the selected rows in a table

    Hi,
    How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
    Thanks

    Please search the forum before posting questions.
    refer following thread for table selection.
    Re: Record selection with MessageCheckBox and print the selected record.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • 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 to freeze the selection column in the table control of the module pool.

    hi ,
    in my module pool there is a row selection field  <b>w/selcolumn</b> of the table control called as mark.
    how to freeze the selection column where there is no record in the table control row.
    or in other words where wa is initial.
    thanks
    ekta

    Hi all,
    in the PBO of the screen the following code is written.
    say the selection column is MARK and is declared in the data as well.
    thanks
    ekta
    *************************C O D E **************************************************
    MODULE disp_tabctrl1 OUTPUT.
      IF flag_c = 1.
        READ TABLE it_create_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
      ELSE.
        READ TABLE it_material_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
        IF sy-subrc = 0.
          IF ok_code_0101 = '&SEL1'.
            mark = 'X'.
          ELSEIF ok_code_0101 = '&DSEL'.
            mark = ' '.
          ENDIF.
        ELSE.
          LOOP AT SCREEN.
            IF screen-name = 'MARK'.
              screen-input = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      index_t = tab_ctrl1-top_line.
      index_d = tab_ctrl1-top_line + n.
    ENDMODULE.                 " DISP_TABCTRL1  OUTPUT

  • How to make row selection by checkbox in ADF table

    hello,
    using jdev11g TP4 , fusion web application
    when i drag my view object as ADF table into jsf page,
    i want to know how to make row selection by checkbox
    thanks
    greenApple
    Edited by: greenApple on Nov 10, 2008 11:33 AM

    Hi,
    the tree component has changed compared to 10.1.3. You no longer have a tableSelectmany component that renders as checkboxes. Instead you use the ctrl key and select the table rows
    Frank

  • How to find the selected item in alv grid or table control

    can any one tell me please
    how to find the selected item in alv grid or table control

    In table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
    IN PAI
      LOOP AT it_tkhdr.
        FIELD it_tkhdr-sel_row
          MODULE tab_tkhdr_mark ON REQUEST.
      ENDLOOP.
    MODULE tab_tkhdr_mark INPUT.
      MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
    ENDMODULE.                 " tab_tkhdr_mark  INPUT
    here it_TKHDR is internal table sel_row is field for selection
    After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
    regards,
    Gagan

  • How to identify the Selected row number or Index in the growing Table

    Hi,
    How to find the selected Row number or Row Index of growing  Table using Javascript or Formcalc in Interactive Adobe forms
    Thanks & Regards
    Srikanth

    After using bellow script it works fine
    xfa.resolveNode("Formname.Table1.Row1["this.parent.index"].fieldname").rawValue;

  • Table name decided at runtime - How to do a select?

    Hi,
    Searching these forums I found how to do a select * from where the table name is decided at runtime. You use paranthesis on the variable containing the table name.
    However, I still get syntax error I can't solve and need some help.
    This syntax doesnt work, could you help me find out what is the problem?
    SELECT tab1~field1 tab2~field2
    FROM ( (dynamic_tab_name1) AS tab1 INNER JOIN
           (dynamic_tab_name2) AS tab2 ON tab1~someIndex = tab2~someIndex )
    dynamic_tab_name1 and dynamic_tab_name2 are defined as two strings where I concatenate the table prefix name with the system client number.
    The syntax works if i replace the dynamic_tab_name1 and dynamic_tab_name2 with hardcoded table names.
    thanks & regards
    Edited by: Baran Sölen on Feb 5, 2009 1:44 PM

    Well you can generate your program dynamically in the following way.
    But I never like to use the method.
    append 'PROGRAM SUBPOOL no standard page heading.' to code.
    append 'form dyn1.' to code.
    append 'data: begin of i_tab occurs 0,' to code.
    append '      kolnr like t682i-kolnr,' to code.
    append '      gstxt like tmc1t-gstxt,' to code.
    append '      kschl like t685-kschl,' to code.
    append '      vkorg like komg-vkorg,' to code.
    append '      vtweg like komg-vtweg,' to code.
    append '      matkl like komg-matkl,' to code.
    append '      matnr like komg-matnr,' to code.
    append '      inco1 like komg-inco1,' to code.
    append '      inco2 like komg-inco2,' to code.
    append '      charg like komg-charg,' to code.
    append '      vkbur like komg-vkbur,' to code.
    append '      vkgrp like komg-vkgrp,' to code.
    append '      zsales like komg-zsales,' to code.
    append '      end of i_tab.' to code.
    append 'data: begin of i_t682 occurs 0,' to code.
    append '      kolnr like t682i-kolnr,' to code.
    append '      kotabnr like t682i-kotabnr,' to code.
    append '      end of i_t682.' to code.
    data: v_table_name(16),
          v_condition_type_code(72),
          v_kolnr like t682i-kolnr.
    concatenate 'kschl = ''' p_kschl  '''.' into v_condition_type_code.
      loop at i_t682.
        concatenate 'A' i_t682-kotabnr into v_table_name.
        append 'select * from' to code.
        append v_table_name to code.
        append 'appending corresponding fields of table i_tab' to code.
        append 'where kappl = ''V'' and' to code.
        append v_condition_type_code to code.
        append 'if sy-subrc = 0.' to code.
        append 'loop at i_tab where kolnr = '' ''.' to code.
        concatenate 'i_tab-kolnr = ' i_t682-kolnr '.' into code separated by space.
        append code. clear code.
        append 'i_tab-gstxt = ''Description will be put later''.' to code.
        append 'modify i_tab.' to code.
        append 'endloop.' to code.
        append 'endif.' to code.
      endloop.
    append 'export i_tab to memory id ''i_tab''.' to code.
    append 'endform.' to code.
    generate subroutine pool code
             name prog
             message msg
             line lin
             word wrd
             offset off.
    *break-point.
    if sy-subrc = 0.
      perform dyn1 in program (prog).
    endif.
    import i_tab from memory id 'i_tab'.

Maybe you are looking for

  • SCSM 2010 to 2012 Management server upgrade failed

    I upgrading my scsm 2010 to 2012 both Management and DW server. So i have set up the secondary lab environment and do this. The DW server has been upgraded successfully to 2012. When i try to upgrade SCSM Management server, at the finalizing stage, i

  • MSI GT683DX-840US Will Not Boot

    Hello forum members, I have been the happy owner of a $1,400 MSI GT683DX-840US laptop for around three months now. When I first got the machine in June, I replaced the bloatware filled default install with a fresh copy of Windows 7 Ultimate x64. All

  • BPM  HTTP Sync - IDOC Async Timeout

    Hi!!! my scenary is using a BPM          HTTP sync <--> BPM -> IDOC my IP receiver            sender1             transforme              sender2 SI_ABS_SYNC         SI_ABS_REQ          OM_ABS_REQ_to_ABS_RES   SI_ABS_RES SI_ABS_REQ                   

  • Status

    Dear experts, After create cancel invoice under what circumstances the accounting document for both invoice and cancel invoice is 'not cleared'? Thanks.

  • CSV issue

    Hi , I need to create a csv file and load that csv file into database. But while creating csv i am facing problems with line seperators.After typing one line i am pressing "Enter Key" to terminate that line and go to next line.But that is not inserti