Refreshing an af:Iterator used in a table column

Adf 11g (11.1.1.2), ADF BC
Hi
I'm having a problem trying to get an af:iterator to refresh.
I have a tree binding in my page as follows, qryCommodityWithPriceIterator is the master, qryCommodityPrice is the detail :
<tree IterBinding="qryCommodityWithPriceIterator"
          id="qryCommodityWithPrice">
      <nodeDefinition DefName="model.qryCommodityWithPrice"
                      Name="qryCommodityWithPrice0">
        <AttrNames>
          <Item Value="CommodityNr"/>
          <Item Value="Designation"/>
        </AttrNames>
        <Accessors>
          <Item Value="qryCommodityPrice"/>
        </Accessors>
      </nodeDefinition>
      <nodeDefinition DefName="model.qryCommodityPrice"
                      Name="qryCommodityWithPrice1">
        <AttrNames>
          <Item Value="CommodityNr"/>
          <Item Value="Price"/>
        </AttrNames>
      </nodeDefinition>
    </tree>In my page I have a table based on qryCommodityWithPrice and a column that has an af:iterator to display the values of the qryCommodityWithPrice0 in an output text (the output text will be replaced by a sparkChart)
              <af:table value="#{bindings.qryCommodityWithPrice.collectionModel}"
                        var="rowX"
                        rows="#{bindings.qryCommodityWithPrice.rangeSize}"
                        fetchSize="#{bindings.qryCommodityWithPrice.rangeSize}"
                        selectedRowKeys="#{bindings.qryCommodityWithPrice.collectionModel.selectedRow}"
                        selectionListener="#{bindings.qryCommodityWithPrice.collectionModel.makeCurrent}" id="t3">
                <af:column id="c6">
                  <af:iterator id="iterator1" value="#{rowX.qryCommodityPrice}"
                               var="dataX" rows="0">
                    <af:outputText value="#{dataX.Price}" id="ot2"/>
                  </af:iterator>
                </af:column>
              </af:table>I have a button that calls an application module method that changes a where clause parameter and re-executes the query for qryCommodityWithPriceIterator
    vo = getqryCommodityWithPrice();
    vo.setWhereClauseParams(null);
    vo.setNamedWhereClauseParam("months", -10);
    vo.executeQuery();I also need to update the where clause for the qryCommodityPrice.
The initial page display is correct, however when I click the button the table refreshes correctly but the af:iterator is displaying stale data, the af:iterator is not getting refreshed.
I think what I need to do is that for each row in the vo qryCommodityWithPrice I need to execute the query for the corresponding qryCommodityPrice vo.
    Row row;
    qryCommodityWithPriceRowImpl arow;
    vo.first();
    while (vo.hasNext()) {
      row = vo.next();  
      arow = (qryCommodityWithPriceRowImpl)vo.getCurrentRow();
      RowIterator ri = arow.getqryCommodityPrice();
      // change where clause and execute query here
    } The problem I have is that I can only get the RowIterator for the qryCommodiyPrice, I can't get the vo to re-execute its query.
Anybody got any ideas?
Regards
Paul

Ok, I was barking up the wrong tree, in fact I wasn't even in the correct forest :-)
I need to go through executeQueryForCollection ...
Regards
Paul

Similar Messages

  • Dynamic entry list used in a table column

    On a form, we noticed a dynamic entry list will limit which values a user may enter by validating against the entry list values.  We need to have the same validation occur when a dynamic entry list is used in a table column. Has anyone had success in getting the dynamic entry list to validate the cell values in a table column?

    Hey Dan,
    You are right.... Its a bug... we are also using VC CE 7.1 SP 05....
    When I try in form (with combo box) its working fine...I mean its giving error saying "Character string "4" does not exist in the allowed set of values and its not forwarding any values...
    but when I use it in table, its not giving any error.
    I saw some demos where it was working fine... but those are older sp versions of CE 7.1...
    Try to contact SAP VC team on this....
    PradeeP
    Edited by: pradeep bondla on Oct 6, 2010 12:06 AM

  • Mutating table exception & use of a table column in where clause

    Hello,
    I have a scenario in which I am getting a Mutating table exception in which I have a trigger using which I insert into a second table in case there is an insert in the first table or the one which is associated with the trigger .
    my trigger code has this line which is causing the Mutating table exception :
    BEGIN
    IF INSERTING THEN
    SELECT a,b INTO var_a,var_b
    FROM tableA,tableB,tableC
    WHERE tableC.c = :new:c
    The problem is the tableC reference in my where clause is causing a Mutating table exception , but I don't see any other way in which I can get rid of it cause I need to check if new:c values exists in the table or not , can anybody suggest how I can get rid of the tableC reference in my SQL statement yet be able to check for the value of :new:C in my statement ?

    Hopefully this demonstrates the problem , the bold portion or the where clause is where I am getting flummoxed , I need to be able to compare the new value to a column in table C but if I use tableC reference I get mutating table exception
    create or replace
    trigger myTrigger
    after insert or delete or update on TableC
    referencing old as old new as new
    for each row
    DECLARE val1 number; val2 CHAR(1);
    BEGIN
    IF INSERTING THEN
    SELECT tableA.val1,tableB.val2 INTO val1,val2
    FROM TableA tableA,TableB tableB
    WHERE :new.val1
    AND :new.val1 is not null
    AND tableA.val2 = :new.val2
    AND tableB.val3 = tableA.val3
    AND tableC.val4 = :new.val5
    INSERT INTO TableD (col1 ,
    col2,
    col3,
    col4,
    col5,
    col6,
    col7,
    col8,
    col9)
    VALUES(:new.val1,
    :new.val2,
    :new.val3,
    tableA.val1,
    tableB.val2,
    :new.val4,
    :new.val5,
    :new.val6,
    :new.val7);

  • How to implement ajax at ADF table column or ADF table column button.

    I want to use ajax in table column selection. I have two table. One is master table and second one is detailed table. I have requirement to click master table column and display data in detail table column against the master table column.
    let assume i have two tables 1.
    <af:form id="f1">
    <af:panelSplitter id="ps1" orientation="vertical">
    <f:facet name="first">
    <af:table value="#{radionBean.generatedData}" var="item" columnSelection="single" rowBandingInterval="0"
    id="tableData">
    <af:column sortable="false" selected="true" headerText="Ticket No" align="start" id="c1">
    <af:outputText value="#{item.ticketno}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="Requestor" align="start" id="c2">
    <af:outputText value="#{item.requestor}" id="ot2"/>
    </af:column>
    <af:commandButton text="More" id="cb1" action="#{radionBean.myrow}">
    <f:ajax execute="@this" render=":f1:detailTableData"/>
    <f:setPropertyActionListener target="#{radionBean.currentrow}" value="#{item}"/>
    </af:commandButton>
    </af:column>
    </af:table>
    </f:facet>
    Second table
    <f:facet name="second">
    <af:table value="#{radionBean.detailData}" var="itemdet" rowBandingInterval="0"
    id="detailTableData">
    <af:column sortable="false" headerText="Ticket No" align="start" id="c21">
    <af:outputText value="#{itemdet.ticketno}" id="ot21"/>
    </af:column>
    <af:column sortable="false" headerText="Date" align="start" id="c22">
    <af:outputText value="#{itemdet.date}" id="ot22"/>
    </af:column>
    </af:table>
    </f:facet>
    </af:panelSplitter>
    </af:form>
    The above is my two table when i run the program i have this exception
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
    <FaceletViewHandlingStrategy> <handleRenderException> Error Rendering View[untitled1.jsf]
    java.lang.IllegalArgumentException
         at org.apache.myfaces.trinidad.component.UIXComponentBase.findComponent(UIXComponentBase.java:708)
         at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getResolvedId(AjaxBehaviorRenderer.java:279)
         at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.appendIds(AjaxBehaviorRenderer.java:269)
         at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.buildAjaxCommand(AjaxBehaviorRenderer.java:214)
         at com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:86)
         at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:103)
         at oracle.adf.view.rich.render.RichRenderer._encodeClientBehaviors(RichRenderer.java:3740)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1409)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adf.view.rich.render.RichRenderer.encodeChildInContext(RichRenderer.java:3118)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderDataCell(BaseColumnRenderer.java:1468)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:166)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:2803)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderSingleDataBlock(TableRenderer.java:2433)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:1634)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:560)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:617)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils$EncodeChildVisitCallback.visit(InvokeOnComponentUtils.java:116)
         at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:531)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._visitFacetAsStretched(PanelSplitterRenderer.java:393)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._visitFacet(PanelSplitterRenderer.java:371)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.visitChildrenForEncodingImpl(PanelSplitterRenderer.java:338)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2393)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.visitChildrenForEncodingImpl(DecorativeBoxRenderer.java:214)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2393)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._visitFacetAsStretched(PanelStretchLayoutRenderer.java:856)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._visitFacet(PanelStretchLayoutRenderer.java:834)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.visitChildrenForEncodingImpl(PanelStretchLayoutRenderer.java:793)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at org.apache.myfaces.trinidad.render.CoreRenderer.visitChildrenForEncoding(CoreRenderer.java:228)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncodingImpl(RichRenderer.java:2421)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at org.apache.myfaces.trinidad.render.CoreRenderer.visitChildrenForEncoding(CoreRenderer.java:228)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncodingImpl(RichRenderer.java:2421)
         at oracle.adf.view.rich.render.RichRenderer.visitChildrenForEncoding(RichRenderer.java:2404)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:410)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:695)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:558)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:354)
         at org.apache.myfaces.trinidad.component.UIXDocument.visitTree(UIXDocument.java:82)
         at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
         at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:487)
         at oracle.adfinternal.view.faces.util.rich.InvokeOnComponentUtils.renderChild(InvokeOnComponentUtils.java:42)
         at oracle.adfinternal.view.faces.streaming.StreamingDataManager._pprComponent(StreamingDataManager.java:756)
         at oracle.adfinternal.view.faces.streaming.StreamingDataManager.execute(StreamingDataManager.java:525)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer._encodeStreamingResponse(DocumentRenderer.java:3713)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1475)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at oracle.adfinternal.view.faces.context.PartialViewContextImpl._processRender(PartialViewContextImpl.java:321)
         at oracle.adfinternal.view.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:152)
         at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:974)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         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:122)
         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:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         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:136)
         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)
    Please reply this.......
    THANK YOU IN AN ADVANCE
    Regards
    Muhammad Khurram
    Edited by: 912134 on Feb 3, 2012 4:28 AM

    I don't think you need the f:ajax tag - you should be able to do the synchronization between the tables with the built-in partial page refresh functionality.
    Just define the partialTrigger property of the second table to point to the firsttable.
    http://docs.oracle.com/cd/E16162_01/web.1112/e16181/af_ppr.htm#BGBEGIDF

  • REPORT_ATTRIBUTE_ERROR_MESSAGE in table column?

    Hi all,
    I want to use REPORT_ATTRIBUTE_ERROR_MESSAGE on table column, how can we use this?? or any other way..
    and one more doubt.. i am displaying some message when no element is select on table, it is displaying error message,
    but lead selection is removing? i dont want to remove lead selection . how can we achieve this?
    thanks,
    Venkat.

    Hi,
    Please check this...
      DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.
      DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
      DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
      DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.
      DATA lv_pack_material TYPE wd_this->Element_pack_mat-pack_material.
      DATA: wa_temp TYPE REF TO if_wd_context_element,
            lt_temp TYPE wdr_context_element_set.
    navigate from <CONTEXT> to <PACK_MAT> via lead selection
      lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
      CALL METHOD lo_nd_pack_mat->get_selected_elements
        RECEIVING
          set = lt_temp.
    LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_pack_mat.
        lv_pack_material = ls_pack_mat-pack_material.
        if lv_pack_material is initial.
          lo_api_controller ?= wd_This->Wd_Get_Api( ).
          CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
            RECEIVING
              MESSAGE_MANAGER = lo_message_manager.
    report message
          CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE
            EXPORTING
              MESSAGE_TEXT         = 'Please Select Packing Material...'
              ELEMENT              = wa_temp
              ATTRIBUTE_NAME       = 'PACK_MATERIAL' .
       exit.
        endif.
        append ls_pack_mat to lt_pack_mat.
        CLEAR ls_pack_mat.
      ENDLOOP.
      lo_nd_pack_mat->bind_table( new_items = LT_PACK_MAT
                                     SET_INITIAL_ELEMENTS = abap_false ).
    Thanks,
    Venkat.

  • BUG: Export DDL and Data fails for mixed case table/column names

    Hi there,
    I have found a bug in SQL Developer. See details below.
    Description:
    When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
    - you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
    - add some data rows to the table
    - choose Tools -> Export DDL and Data
    - check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
    -- DDL for Table lowerCase
    CREATE TABLE "DBO_HT"."lowerCase"
    (     "lowerCol1" VARCHAR2(100),
         "UpCol2" VARCHAR2(100),
         "ALLUPCOL3" VARCHAR2(100)
    -- DATA FOR TABLE lowerCase
    -- FILTER = none used
    -- INSERTING into lowerCase
    Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
    -- END DATA FOR TABLE lowerCase
    Remarks
    SQL Developer: version 1.2.1, build MAIN-32.13
    Oracle DBs: 9.2 & Express
    OS: Windows 2000 Professional
    If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
    Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
    I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
    Thanks a lot & bye

    Thanks for your reply.
    ad. 1)
    You're right. I just wanted to give some very short feedback on my experiences with SQL Developer, so I didn't think starting new threads would be necessary, but as I was writing it became much bigger than I initially planned - sorry about that. I will make proper threads as soon as possible. Having "Edit post" button on this forum would also be useful.
    ad. 2)
    Generally, you're right - in most cases it's true that "switching DBMS is a major commitment" and "you will produce terrible code" if you don't learn the new one.
    However, I think that you miss one part of market here - the market that I think Express is also targeted on. I'd call it a "fire&forget databases" market; MySQL comes to mind as possibly most common solution here. It's the rather small systems, possibly web-accessed, whose data-throughput requirements are rather modest; the point is to store data at all, and not necesarily in fastest way, because given the amount of data that is used, even on low-end hardware it will work well enough. What's important here is its general ease of use - how easy is to set up such system, connect and access data, develop a software using it, how much maintenance is needed, how easy this maintenance is, how easy are the most common development tasks as creating a DB, moving a DB from test to production server etc. There, "how easy" directly translates to "how much time we need to set it up", which translates to "how much will the development will cost".
    Considering the current technology, switching the DBMS in such systems is not necesarily a major commitment and believe me that you will not produce terrible code. In many cases it's as simple as changing a switch in your ORM toolkit: hibernate.dialect = Hibernate.Dialect.OracleDialect vs MySQLDialect vs MsSql2005Dialect
    Therefore, in some part of market it's easy to switch DBMS, even on project-by-project basis. The reason to switch will appear when other DBMS makes life easier => development faster. From that point of view, I can understand my colleagues giving me an embarassing look and saying "come on, I won't read all these docs just to have db copied to test server". And it doesn't mean "they are not willing to learn anything new", it's just that they feel such basic task should have self-explaining solution that doesn't require mastering any special knowledge. And if they get such simple solutions somewhere else, it costs them nothing to change the hibernate dialect.
    I think Oracle did the great job with introducing the Express to this "fire&forget" market. The installation is a snap, it just works out of the box, nothing serious to configure, opposite to what I remember from installing and working on Oracle 9 a few years ago. In some places it's still "you need to start SQL*Plus and enter this script", but it's definitely less than before. I also find the SQL Developer a great tool, it can do most of what we need to do with the DB, it's also much better and pleasant to use over Oracle 9 tools. Still, a few basic things still require too much hassle, and I'd say taking your schema to another machine is one of them. So I think that, if you do it well, the "schema copy wizard" you mentioned might be very helpful. If I was to give any general advice for Express line of DB/tools, I'd say "make things simple" - make it "a DB you can't see".
    That's, IMHO, the way to attract more Express users.

  • Table Column Header Text - Refresh Table

    Hi. A question about programmatically changing the Header Text property of a Table Component.
    I've added code, in the backing bean Setter for the Table component, to change the header text as required.
    The problem is that when the page is rendered, the header changes are not displayed initially. Only after a PPR is performed (on a different component) does the table render with my property changes displayed.
    Am I doing the header text manipulation in the wrong place? Is there a way to refresh the table programmatically prior to it rendering initially (e.g. after the RENDER_RESPONSE phase?)?
    Cheers.

    Hi Bala,
    After following your invaluable advice I now have the table displaying more or less as a I need. The labels are set correctly (from the Attribute Hint that I set in the AttrDefImpl), and the Rendered property for each column is now derived from Expression Language pointing to the same AttributeHints...
    However, I'm still struggling with the DisplayIndex for the table columns. I'm attempting to set the DisplayIndex column property using EL that gets a value from the VO binding FieldOrder control attribute (which contains a numeric value). However, this does not resolve properly and in the column Property Inspector the DisplayIndex doesn't seem to display correctly itself...
    I'm wondering if this is because the FieldOrder control attribute is a String while the DisplayIndex takes an Integer. Is there a way to perform some conversion on this in the EL itself? Or maybe that is not the problem.
    Thanks again for all your assistance!

  • How to use selectOneList in a updateable data table column

    Hi,
    Could someone tell me how to use selectOneList (source from a vo X) in an updateable data table column (from another vo Y)?
    I successfully created a page with the data table. However, strange things happened:
    1) the values populated on the selectOneList column don't match the underlying value in vo Y. in fact, every rows in the column got the same value.
    2) when I update one of the rows, the column value in every other rows turns to the new value.
    3) when I sort other columns in the table, the values shown in the selectOneList column get toggled between blank and some incorrect value.
    I believe it is something related to the fact that the same iterator is used to the source view object. If this is the case, how can I solve it?

    See #7 here:
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html

  • Refresh a specific cell in an af:table

    Hi,
    When some changes are made to a cell in a table, I would like to refresh some other cells (on other rows).
    I currently only succeed in:
    - refreshing the complete table (using a partial trigger). This is not a good option, because it takes too long and the input field focus is lost.
    - refreshing other cells on the currently selected row. This is not a good option because some cells I would like to refresh are on other rows.
    How can I do this?
    Version is 11.1.1.4.0, but I'm willing to update to 11.2 if this is needed...

    If you use an af:table this will not be easy as the components are stamped (meaning one component is used for one attribute of all rows). So to change the underlying data is the best option (as you may need to change fields not visible currently).
    Javascript may be an option...
    Timo

  • Can we pass Iterator dynamically to af:table?

    I have about 10 tables that is supposed to be represented dynamicly in an ADF table on one jspx page. All tables have 8 columns that are identical.
    I have plan to create 10 VO's but one Jspx page..Depending upon the user selection i am trieng to pass Iterator to the Jspx table. I am not sure wether it is possible or not .
    I knew by passing dynamic list we can create a table.
    But instead i am trieng to acheve this by passing Iteratot Dynamiclly.
    Can any body help me how to approach in this situation?
    Thanks in Advance.

    Hi Krithika,
    I had solved the problem by using setQuery() for VO even without creating the 10 vo's also .I have created VO called commonTestVO ,depending on the user selction simply dynamically setting the VO query.
    Here is my solution :
    private void processValueChangeEvent(ValueChangeEvent event) {
    if (event.getNewValue().equals("value1")) {
    // sets the iterator required for the table
    DCIteratorBinding iterator = ADFUtils.findIterator("TestVOiterator");
    ViewObject vo = iterator.getViewObject();
    vo.setFullSqlMode(vo.FULLSQL_MODE_AUGMENTATION);
    vo.setQuery("select * from Test_vw where rownum <10");
    vo.executeQuery();
    } else if (event.getNewValue().equals("value2")) {
    / DCIteratorBinding iterator = ADFUtils.findIterator("TestVOiterator");
    ViewObject vo = iterator.getViewObject();
    vo.setFullSqlMode(vo.FULLSQL_MODE_AUGMENTATION);
    vo.setQuery("select * from Test_vw2 where rownum <10");
    vo.executeQuery();
    Jspx Code :
    <af:table value="#{bindings.TestVO.collectionModel}" var="row"
    rows="#{bindings.TestVO.rangeSize}"
    first="#{bindings.TestVO.rangeStart}"
    emptyText="#{bindings.TestVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    binding="#{backing_jsp_webutils_TableTest.table1}"
    id="table1">
    <af:column sortProperty="LookupId" sortable="false"
    headerText="#{bindings.TestVO.labels.LookupId}"
    binding="#{backing_jsp_webutils_TableTest.column11}"
    id="column11">
    <af:inputText value="#{row.LookupId}"
    required="#{bindings.TestVO.attrDefs.LookupId.mandatory}"
    columns="#{bindings.TestVO.attrHints.LookupId.displayWidth}"
    binding="#{backing_jsp_webutils_TableTest.inputText1}"
    id="inputText1">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.TestVO.formats.LookupId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="LookupType" sortable="false"
    headerText="#{bindings.TestVO.labels.LookupType}"
    binding="#{backing_jsp_webutils_TableTest.column12}"
    id="column12">
    <af:inputText value="#{row.LookupType}" simple="true"
    required="#{bindings.TestVO.attrDefs.LookupType.mandatory}"
    columns="#{bindings.TestVO.attrHints.LookupType.displayWidth}"
    binding="#{backing_jsp_webutils_TableTest.inputText2}"
    id="inputText2"/>
    </af:column>
    </af:table>
    but data type and columns size should be sam efor the both tabless or views/.

  • Cache purging in RPD using Event polling table

    Hi All,
    We have a star schema implemented with few dimension tables and one fact. I am trying to implement Cache management using Event Polling table concept.
    During validation,
    1. Created and ran an adhoc user report
    2. Inserted a record in event polling table with one of dimension table(not fact) of star schema used in adhoc reporting.
    3. Cache in the RPD doesn't get purge.
    Also i have tried validating by inserting a Fact table in Event polling table for which cache gets purged in the RPD within certain interval of time.
    Please help , why dimension tables inserted in Event Polling table and the corresponding RPD query is not getting purged.
    Thanks,
    LonaD

    I can't help you with why this happens, but we experience the same behavior in our environment.  I've always chalked it up to either bad design in the cache polling feature or a bug.
    To work around this, in the past we've used one of these two solutions -- (1) Schedule a daily cron job to clear the entire cache sometime after your nightly ETL refresh usually completes (2) Have your nightly ETL refresh trigger a clear of the entire cache as the last thing it does.  This way, your cache is cleared for most queries on a fact by fact basis, and the dimension-only queries (and anything else left over) get cleared at the end.
    If you figure out a way to do this via the event polling, I'd love to hear it.
    Tony

  • How to use simple types for table column names ?

    Hi,
    can any one tell how to to use simple types for table column names?
    It is required in internationalizing of webdynpro applications.
    Regards,
    Rajesh

    Hi,
    1: define required column names in <SimpleType>
    2:use the following code to get those values
    3:bind 'text' property of Column headers to context attributes
    4:take a context attribute 'Value' as type of <SimpleType>
    5:set these values to context attributes
    IWDAttributeInfo objAttrInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.VALUE);
    ISimpleTypeModifiable simple=objAttrInfo.getModifiableSimpleType();
    Map m=simple.getEnumerationTexts();
    Collection c=m.values();
    Iterator it=c.iterator();
    if(it.hasNext())
    wdContext.currentContextElement.set<att1>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att2>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att3>(it.next().toString);
    Regards
    LakshmiNarayana

  • Create Table Control using Dynamic Internal Table.

    Hi,
       I have requirement in which I will create a Dynamic Internal Table and then I need to create a Table Control Using that Internal Table. Now this can't be done using Screen Editor as it requires a pre-defined internal table or a DDIC Object.
      Please Help.

    This should be correct answer(I am not author of code below):
    REPORT ztablemaintace NO STANDARD PAGE HEADING.
    TYPE-POOLS: rsds.
    DATA: is_x030l TYPE x030l,
    it_dfies TYPE TABLE OF dfies,
    is_dfies TYPE dfies,
    it_fdiff TYPE TABLE OF field_dif,
    is_fdiff TYPE field_dif.
    DATA: w_selid TYPE rsdynsel-selid,
    it_tables TYPE TABLE OF rsdstabs,
    is_tables TYPE rsdstabs,
    it_fields TYPE TABLE OF rsdsfields,
    it_expr TYPE rsds_texpr,
    it_ranges TYPE rsds_trange,
    it_where TYPE rsds_twhere,
    is_where TYPE rsds_where,
    w_active TYPE i.
    DATA: it_content TYPE REF TO data,
    it_modif TYPE REF TO data,
    it_fcat TYPE lvc_t_fcat.
    DATA: w_okcode TYPE sy-ucomm.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
    <ntab> TYPE STANDARD TABLE.
    * Macros
    DEFINE table_error.
      message e398(00) with 'Table' p_table &1.
    END-OF-DEFINITION.
    DEFINE fixed_val.
      is_fdiff-fieldname = is_dfies-fieldname.
      is_fdiff-fixed_val = &1.
      is_fdiff-no_input = 'X'.
      append is_fdiff to it_fdiff.
    END-OF-DEFINITION.
    * Selection screen
    SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME.
    PARAMETERS: p_table TYPE tabname OBLIGATORY "table
    MEMORY ID dtb
    MATCHCODE OBJECT dd_dbtb_16.
    SELECTION-SCREEN: BEGIN OF LINE,
    PUSHBUTTON 33(20) selopt USER-COMMAND sel,
    COMMENT 55(15) selcnt,
    END OF LINE.
    SELECTION-SCREEN: SKIP.
    PARAMETERS: p_rows TYPE i. "rows
    SELECTION-SCREEN: END OF BLOCK b01,
    SKIP,
    BEGIN OF BLOCK b02 WITH FRAME.
    PARAMETERS: p_displ TYPE c AS CHECKBOX. "display
    SELECTION-SCREEN: END OF BLOCK b02.
    * Initialization
    INITIALIZATION.
      MOVE '@4G@ Filter records' TO selopt.
    * PBO
    AT SELECTION-SCREEN OUTPUT.
      IF w_active IS INITIAL.
        CLEAR: selcnt.
      ELSE.
        WRITE w_active TO selcnt LEFT-JUSTIFIED.
      ENDIF.
    * PAI
    AT SELECTION-SCREEN.
      IF p_table NE is_x030l-tabname.
        CALL FUNCTION 'DDIF_NAMETAB_GET'
          EXPORTING
            tabname   = p_table
          IMPORTING
            x030l_wa  = is_x030l
          TABLES
            dfies_tab = it_dfies
          EXCEPTIONS
            OTHERS    = 1.
        IF is_x030l IS INITIAL.
          table_error 'does not exist or is not active'.
        ELSEIF is_x030l-tabtype NE 'T'.
          table_error 'is not selectable'.
    *    ELSEIF is_x030l-align NE 0.
    *      table_error 'has alignment - cannot continue'.
        ENDIF.
    * Default values for system fields
        REFRESH: it_fdiff.
        is_fdiff-tabname = p_table.
        LOOP AT it_dfies INTO is_dfies.
          IF is_dfies-datatype = 'CLNT'.
            fixed_val sy-mandt.
          ELSEIF is_dfies-rollname = 'ERDAT'
          OR is_dfies-rollname = 'ERSDA'
          OR is_dfies-rollname = 'AEDAT'
          OR is_dfies-rollname = 'LAEDA'.
            fixed_val sy-datum.
          ELSEIF is_dfies-rollname = 'ERTIM'
          OR is_dfies-rollname = 'AETIM'.
            fixed_val sy-uzeit.
          ELSEIF is_dfies-rollname = 'ERNAM'
          OR is_dfies-rollname = 'AENAM'.
            fixed_val sy-uname.
          ENDIF.
          CALL FUNCTION '/SAPDMC/DATAELEMENT_GET_TEXTS'
            EXPORTING
              name        = is_dfies-rollname
            IMPORTING
              text_middle = is_dfies-reptext
            EXCEPTIONS
              not_found   = 1
              OTHERS      = 2.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          MODIFY it_dfies FROM is_dfies.
      ENDLOOP.
    * Prepare free selection on table
      REFRESH it_tables.
      is_tables-prim_tab = p_table.
      APPEND is_tables TO it_tables.
      CLEAR: w_selid.
    ENDIF.
    IF sy-ucomm = 'SEL'.
      IF w_selid IS INITIAL.
    * Init free selection dialog
        CALL FUNCTION 'FREE_SELECTIONS_INIT'
          EXPORTING
            expressions  = it_expr
          IMPORTING
            selection_id = w_selid
            expressions  = it_expr
          TABLES
            tables_tab   = it_tables
          EXCEPTIONS
            OTHERS       = 1.
      ENDIF.
    * Display free selection dialog
      CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
        EXPORTING
          selection_id            = w_selid
          title                   = 'Selection'
          status                  = 1
          as_window               = 'X'
        IMPORTING
          expressions             = it_expr
          field_ranges            = it_ranges
          number_of_active_fields = w_active
        TABLES
          fields_tab              = it_fields
        EXCEPTIONS
          OTHERS                  = 1.
    ENDIF.
    * Start of processing
    START-OF-SELECTION.
      PERFORM f_create_table USING p_table.
      PERFORM f_select_table.
      PERFORM f_display_table.
    * FORM f_create_table *
    FORM f_create_table USING in_tabname.
      FIELD-SYMBOLS: <fcat> TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = in_tabname
        CHANGING
          ct_fieldcat      = it_fcat
        EXCEPTIONS
          OTHERS           = 1.
      IF sy-subrc = 0.
    *   Complete field catalog
        LOOP AT it_fcat ASSIGNING <fcat>.
          <fcat>-tabname = in_tabname.
        ENDLOOP.
        CALL FUNCTION 'LVC_FIELDCAT_COMPLETE'
          CHANGING
            ct_fieldcat = it_fcat
          EXCEPTIONS
            OTHERS      = 1.
      ELSE.
        WRITE: 'Error building field catalog'.
        STOP.
      ENDIF.
    * Create dynamic table for data
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_content.
      IF sy-subrc = 0.
        ASSIGN it_content->* TO <itab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    * Create dynamic table for modif
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_modif.
      IF sy-subrc = 0.
        ASSIGN it_modif->* TO <ntab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    ENDFORM.                    "f_create_table
    * FORM f_select_table *
    FORM f_select_table.
      IF w_active = 0.
        SELECT * FROM (p_table)
        INTO CORRESPONDING FIELDS OF TABLE <itab>
        UP TO p_rows ROWS.
      ELSE.
    * Selection with parameters
        CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_WHERE'
          EXPORTING
            field_ranges  = it_ranges
          IMPORTING
            where_clauses = it_where.
        READ TABLE it_where INTO is_where WITH KEY tablename = p_table.
        SELECT * FROM (p_table)
        INTO CORRESPONDING FIELDS OF TABLE <itab>
        UP TO p_rows ROWS
        WHERE (is_where-where_tab).
      ENDIF.
      IF sy-dbcnt = 0.
        WRITE: 'No record selected'.
        STOP.
      ENDIF.
    ENDFORM.                    "f_select_table
    * FORM f_display_table *
    FORM f_display_table.
      DATA: l_answer TYPE c,
      l_eflag TYPE c.
      CLEAR: w_okcode.
      REFRESH: <ntab>.
    * Display table contents
      CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
        EXPORTING
          header       = p_table
          tabname      = p_table
          display_only = p_displ
          endless      = 'X'
          no_button    = space
        IMPORTING
          okcode       = w_okcode
        TABLES
    *      nametab      = it_dfies
          table        = <itab>
    *      fielddif     = it_fdiff
          modif_table  = <ntab>
        EXCEPTIONS
          OTHERS       = 1.
      IF sy-subrc = 0.
        IF p_displ IS INITIAL AND w_okcode = 'SAVE'.
    * Confirm update
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              titlebar              = p_table
              text_question         = 'Do you want to update table ?'
              default_button        = '2'
              display_cancel_button = ' '
            IMPORTING
              answer                = l_answer
            EXCEPTIONS
              OTHERS                = 1.
          IF l_answer = '1'.
    * Apply modifications
            IF NOT <ntab>[] IS INITIAL.
              PERFORM f_add_system USING space.
              MODIFY (p_table) FROM TABLE <ntab>.
              IF sy-subrc NE 0.
                l_eflag = 'X'.
              ENDIF.
            ENDIF.
    * Apply deletions
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                TABLES
                  deleted_data = <ntab>
                EXCEPTIONS
                  OTHERS       = 1.
              IF NOT <ntab>[] IS INITIAL.
                DELETE (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
    * Apply creations
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                TABLES
                  new_data = <ntab>
                EXCEPTIONS
                  OTHERS   = 1.
              IF NOT <ntab>[] IS INITIAL.
                PERFORM f_add_system USING 'X'.
                INSERT (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
            IF l_eflag IS INITIAL.
              COMMIT WORK.
              MESSAGE s261(53).
            ELSE.
              MESSAGE s075(3i).
              PERFORM f_select_table.
            ENDIF.
          ENDIF.
    * Display table again
          PERFORM f_display_table.
        ENDIF.
      ENDIF.
    ENDFORM.                    "f_display_table
    * FORM f_add_system *
    FORM f_add_system USING new TYPE c.
      FIELD-SYMBOLS: <irec> TYPE ANY,
      <upd> TYPE ANY.
      LOOP AT it_fdiff INTO is_fdiff.
        READ TABLE it_dfies INTO is_dfies
        WITH KEY fieldname = is_fdiff-fieldname.
        LOOP AT <ntab> ASSIGNING <irec>.
          ASSIGN COMPONENT is_fdiff-fieldname OF STRUCTURE <irec> TO <upd>.
          IF is_dfies-datatype = 'CLNT'.
            <upd> = sy-mandt.
          ELSE.
            CASE is_dfies-rollname.
              WHEN 'AENAM'.
                <upd> = sy-uname.
              WHEN 'AEDAT' OR 'LAEDA'.
                <upd> = sy-datum.
              WHEN 'AETIM'.
                <upd> = sy-uzeit.
              WHEN OTHERS.
            ENDCASE.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    "f_add_system

  • Dynamic iterating over table columns

    hello there,
    i have to create a string depending on the values in my table columns. this string creation is used on different tables with different number of columns and different column types.
    so i want to write a procedure which does simplified the following:
    1. create dynamic rowtype with a select statement
    2. iterate over rowtype columns and append column value to a string
    3. insert the created string in another table.
    by trying this dynamically for any table i run in the following two issues:
    1. creation of a rowtype needs the tabletype
    2. no iterating over rowtype possible
    are their any ideas to solve this issue. or do i have to write a procedure for every table i use.
    regards,
    rené

    You can do it with a single, generic procedure using DBMS_SQL.
    Joe Fuda
    SQL Snippets

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

Maybe you are looking for