How to re-calculate a column value based on another column value in the same ADF Table row

Hi,
I'm using Jdeveloper 11.1.2.3.0.
I have an adf table with 2 columns, columnA and columnB.
When the value changed in ColumnA,
1) i need to call a PLSQL and update the ColumnB value that is returned from PLSQL.
2) Show a warning message if the existing value in ColumnB is different from the one that is returned from PLSQL.
Can anybody suggest how can i accomplish this?
Thanks,
Vinod

hi user,
if you have inputtext means have a valuechangelistener
in that call your pl/sql function supply input value to the appropriate function then grab the result of the function. then bind the column inputtext and compare with it. then raise your warning using FacesMessage classes.
Sameh Nassar: Create PL/SQL Function And Call It From Your ADF Application

Similar Messages

  • Programatically Assigning Column Value Based on Another Column

    I have a problem as follows:
    My database table has the following setup:
    There may be many gift numbers the same, however many different recipient numbers for each gift.
    The receipient number should increment from 1-X based on the gift number, for example, if the gift number is the same then the receipient number should increment for that gift.
    Gift Number
    Recipient Number
    1
    1
    1
    2
    1
    3
    2
    1
    3
    1
    3
    2
    The programmatic code for inserting a new row would be:
    Check if gift number already exsists in database.
    -if it does exsist then find latest and increment current receipient number by one for receipment number
    -if it does not exsit set receipient number at 1
    How do i do this?
    JDEV - 11.1.2.4 (ADF BC)

    Your use case has some flaws which you should think about before trying to implement it.
    1) think about what happens if multiple users try to insert a record at the same time. What can happen? How do you want to handle this situation?
    2) do you really need the number to be gap less? The use case can be implemented easily if you don't have this restriction.
    3) The table should have the technical primary key to avoid pk clashes due to multiple inserts at one time.
    Now, if you have a technical pk as primary key, you can setup a unique key on both of the other columns which prevents that somehow you get duplicates there.
    You let the user insert the gift number and calculate the recipient number as max(recipient number)+1. Then you commit the record. If you don't get an error you are finished, if you get an error you add 1 to the recipient number and try to commit again, until the insert works.
    Timo

  • How to generate a value to field in a row based on another two fields in the same row ???

    I have a quantity and unit price and there is also a field in the same row called total price. I want to get the value automatically of total price from multiplying quantity and unit price.

    Here you go:
    page code
                            <af:panelGroupLayout id="pgl2" layout="horizontal" styleClass="AFStretchWidth">
                                <af:inputText label="Quantity" id="quantity" value="#{bindings.quantity1.inputValue}" autoSubmit="true"
                                              valueChangeListener="#{SetItemBean.valueChangeListenerItem}"/>
                                <af:spacer width="10" height="10" id="s1"/>
                                <af:inputText label="Price" id="price" value="#{bindings.price1.inputValue}" autoSubmit="true"
                                              valueChangeListener="#{SetItemBean.valueChangeListenerItem}"/>
                                <af:spacer width="10" height="10" id="s2"/>
                                <af:inputText label="Sum" id="total" value="#{bindings.total1.inputValue}" partialTriggers="quantity price" readOnly="true"/>
                            </af:panelGroupLayout>
    page bindings
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="12.1.2.66.68" id="SetItemPageDef" Package="de.hahn.blogtest12c.view.pageDefs">
      <parameters/>
      <executables>
        <variableIterator id="variables">
          <variable Name="quantity" Type="java.lang.Number"/>
          <variable Name="price" Type="java.lang.Number"/>
          <variable Name="total" Type="java.lang.Number"/>
        </variableIterator>
      </executables>
      <bindings>
        <attributeValues IterBinding="variables" id="quantity1">
          <AttrNames>
            <Item Value="quantity"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="variables" id="price1">
          <AttrNames>
            <Item Value="price"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="variables" id="total1">
          <AttrNames>
            <Item Value="total"/>
          </AttrNames>
        </attributeValues>
      </bindings>
    </pageDefinition>
    and bean code
        public void valueChangeListenerItem(ValueChangeEvent valueChangeEvent) {
            String comp = valueChangeEvent.getComponent().getId();
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            // get an ADF attributevalue from the ADF page definitions
            AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("quantity1");
            Number q = (Number) attr.getInputValue();
            if (q == null)
                q = 0;
            attr = (AttributeBinding) bindings.getControlBinding("price1");
            Number p = (Number) attr.getInputValue();
            if (p == null)
                p = 0;
            if ("price".equals(comp)) {
                p = (Number) valueChangeEvent.getNewValue();
            } else {
                q = (Number) valueChangeEvent.getNewValue();
            // set new value
            attr = (AttributeBinding) bindings.getControlBinding("total1");
            Number t = q.doubleValue() * p.doubleValue();
            attr.setInputValue(t);
            // update Total
            FacesContext facesCtx = FacesContext.getCurrentInstance();
            UIComponent ui = facesCtx.getViewRoot().findComponent("total");
            if (ui != null) {
                // PPR refresh a jsf component
                AdfFacesContext.getCurrentInstance().addPartialTarget(ui);
    Timo

  • Auto populating a column prompt based on another column prompt

    Hi,
    Is it possible to auto-populate a column prompt, using the value of another column prompt?
    My situation is described as below.
    I have created a new dashboard prompt. This contains 2 column prompts, for example say col1 and col2. Both are multi-select prompts.
    col1 values - a,b,c,d.....
    col2 values - 5,2,8,7.....
    col1 and col2 values are picked from different tables. Also we have a mapping table which maps col1 and col2. Say a-5, b-10, c-1, d-3 etc...
    My requirement is, if a user selects values "a,d" for col1 prompt, col2 prompt must be automatically populated by values "5,3".
    Is this possible? If so, please help.
    Thanks,
    kc.

    If the actual filter criteria is only col1 the instead of displaying the values in the second prompt, make a separate report and only choose only the 2nd col in that report and make col1 as prompted and select appropriate title for that report.Place the report above the actual report in dashboard. So it will display only those records which are chosen in col1 from the prompt.

  • Unable to filter LookupSet values based on another Lookup value

    Hey all, I've got a report item where I'm pulling a list of values using a lookupset. The lookupset is working as expected, however I need to filter those results based on a different value which belongs to the same dataset as the lookup value. I'm trying
    to filter on the tablix but nothing I try is working to filter. I just end up with no data when I know I should be getting one value. I tried filtering using a lookup and lookupset expression but that doesn't seem to be what is needed. This is my first time
    really diving into lookups so any help would be appreciated.
    Thanks,
    Bryan
    (using report builder 3.0)

    Do you only want the values where type = "Writing Assignment 1". If that is the case then modify your LookupSet as follows:
    =Join(Lookupset(Fields!identifier.Value+"Writing
    Assignment 1",Fields!Student.Value+Fields!value.Value,
    Fields!value.Value, "Comments"), vbCrLf)
    This will require that identifier matches student and type matches "Writing Assignment 1".
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • How can we make lov as default value based on another lov values

    Hi Experts,
    Example
    we r having 2 lovs asume that lov1 and lov2 based on lovv1 i want to make lov2 as a default .
    We have done the steps as mentioned in this forum. actually its returning null value.
    appreciate your help on this. Pls find the below code.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am= pageContext.getApplicationModule(webBean);
    if(pageContext.isLovEvent())
    if("lovValidate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)) && "lovUpdate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))||"lovPrepare".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    String lovInputSourceId = (String)pageContext.getLovInputSourceId();
    if("lov1id".equals(lovInputSourceId))
    OAMessageLovInputBean lovBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("WorkOrder");
    String lovInput = (String) lovBean.getValue(pageContext);
    OAViewObject vo = (OAViewObject)am.findViewObject("ChargeTimeWorkOrdersLovVO");
    if(vo != null)
    OARow row = (OARow)vo.getCurrentRow();
    if(row!= null)
    OAMessageLovInputBean lovBean1=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("lov21d");
    String value=pageContext.getParameter("lov2id");
    if(lovBean1!=null)
    lovBean.setText("10"); }
    Regards,
    Srinivas

    Hi Gyan,
    We are gettign Null Pointer exception.
    This is the code after modification for the current row:
    OAApplicationModule am= pageContext.getApplicationModule(webBean);
    if (pageContext.isLovEvent()) { String lovInputSourceId = pageContext.getLovInputSourceId(); 
    if("WorkOrder".equalsIgnoreCase(lovInputSourceId))
    OAViewObject vo = (OAViewObject)am.findViewObject("ChargeTimeWorkOrdersLovVO");
    vo.getCurrentRow();
    {  OAMessageLovInputBean compBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("OpSeqNum");  
    if(compBean!=null)
    {   compBean.setValue(pageContext,"10");          } } }
    This is the error stack:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2867)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    ## Detail 0 ##
    java.lang.NullPointerException
         at xbol.oracle.apps.eam.workplan.webui.XXChargeTimeCO.processFormRequest(XXChargeTimeCO.java:97)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    java.lang.NullPointerException
         at xbol.oracle.apps.eam.workplan.webui.XXChargeTimeCO.processFormRequest(XXChargeTimeCO.java:97)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Regards,
    Srinivas
    Edited by: 878523 on Aug 11, 2011 4:03 AM

  • Best way to select distinct values based on another column?

    I have a table with three columns: id (NUMBER), data_dt (DATE), and data_value (NUMBER).
    There is a primary key on id and data_dt.
    I want to select the record with the latest data_dt for each unique id.
    What is the best way to do this?
    I have three different methods, but there may be something I am missing.
    First:
    SELECT *
    FROM
      SELECT id, data_dt, data_value,
             FIRST_VALUE(data_dt)
             OVER (PARTITION BY id ORDER BY data_dt DESC) AS last_data_dt
      FROM the_table
    WHERE data_dt = last_data_dt;(I use ORDER BY...DESC instead of just ORDER BY so I don't need the ROWS BETWEEN clause)
    Second:
    SELECT t1.*
    FROM the_table t1
    JOIN
      SELECT id, MAX(data_dt) AS last_data_dt
      FROM the_table
      GROUP BY id
    ) t2 ON (t2.id = t1.id AND t2.data_dt = t1.data_dt);Third:
    SELECT t1.*
    FROM the_table t1
    WHERE t1.data_dt =
      SELECT MAX(t2.data_dt)
      FROM the_table t2
      WHERE t2.id = t1.id
    );-- Don

    Hi,
    There are more possible scenario's, for example:
    select t1.*
    from   the_table t1
    where not exists ( select null
                       from   the_table t2
                       and    t2.data_dt > t1.data_dt
    What is the best way to do this?Only you can tell:
    Test all scenario's, check the execution plans, set timing on and pick the best/fastest one ;-)
    If it's not clear, please post the execution plans here.

  • Change column value based on another

    Hi, everyone.
    my version 11.1.2.2.0.
    i wanna change 1 column's value based on another column's value that be selected.
    ex: select 2rd column to 'A' , then the 1rd should be 'New Start'.
    i used EL like #{row.bindings.MacdType.inputValue eq 1 ? 'New Start' :  row.bindings.CircuitId.inputValue}.
    But it does not set the inputvalue which should binding with the DataSource.
    what's the best way to do these logic?
    pls help. thx

    Hi,Abhijit;
    ex: the frist column is a LOV, the user select "A" for the first column, so the value of the second column should be changed to 'New Start'.
    And the value should be binding to the DC, when save, the value of the 2rd column should be saved to DB.
    thx

  • How to Fill list in excel based on another columns cell value

    Hello,
    I am facing issue while binding data to list i want to bind list or filter list based on another columns cell value

    If your list is a series of rows with column headers like the following:
    Column A
    Column B
    1
    Apple
    1
    Banana
    1
    Orange
    2
    Pineapple
    2
    Cucumber
    2
    Watermelon
    Then you can do this will Excel's built in filter functions. If you select the entire data table and then go to "DATA" then click the "FILTER" button a drop down will appear next to both headers (Column A and Column B in this case). You
    can then select the data you would like filtered from either column and Excel will hide that entire row.
    If this is not what you are looking for please post some examples of what you are trying to see.

  • Table Control: make a field editable or not based on another field value

    HI All,
    How to make a column field input enabled or disabled based on another field value in a Table Control.
    Here's the scenario:
    I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
    Eg.,  KTOKK = 0001 =>  LIFNR field is not editable.
            KTOKK = ZKTO => LIFNR field is editable.
    But these fields are in a table control.
    Please advice.
    Thanks in advance,
    RK.

    Hi RK,
    Go through the below link..
    how to make special field editable or diseditable in table control?
    the code mentioned in the link.. just add ur conditions in the module....
    Best Regards,
    Brijesh

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • Print out a column value only if another column has a specific value (CASE Statement)

    Hello all,
    I tried many hours to find a solution for the following request but wasn't successful. Maybe you could help me.
    I've using the already existing SQL Views in Microsoft Service Manager to do some basic reporting about my tickets.There is no closed date in the activity tickets so I decided to print out the lastmodified timestamp when the status is "closed".
    That's my query:
    SELECT DISTINCT
    dbo.DisplayStringView.DisplayName AS Status,
    CASE WHEN dbo.DisplayStringView.DisplayName = 'Closed' THEN dbo.DisplayStringView.LastModified ELSE 'NO CLOSED Date' END AS ClosedDate
    FROM dbo.MTV_System$WorkItem$Activity$ManualActivity LEFT OUTER JOIN
    dbo.DisplayStringView ON dbo.MTV_System$WorkItem$Activity$ManualActivity.Status_8895EC8D_2CBF_0D9D_E8EC_524DEFA00014 = dbo.DisplayStringView.LTStringId
    Unfortunatelly I'm not getting the value from dbo.DisplayStringView.LastModified. SQL outputs that it is not possible to convert the string to date/time.
    I think there is a problem with the CASE statement in combination with a value select.
    Any ideas how to print out a column value only if another column has a specific value?

    I think it is the other way if you want the missing date shown as a string.
    CASE
    WHEN
    dbo.DisplayStringView.DisplayName
    =
    'Closed'
    THEN
    Convert( varchar(10),dbo.DisplayStringView.LastModified
    , 101) ELSE
    'NO CLOSED Date'
    END
    AS
    ClosedDate 

  • URGENT:Making a poplist value freezed based on another poplist value

    Hi,
    I have a requirement to make a poplist value freezed(should get disabled so that no further change can be done) based on another poplist value.
    for ex : poplist 1 : A,B.
    poplist2: yes,no
    if A is selected, yes,no should appear in the poplist2.
    if B is selected, only YEs should appear in the poplist2 and it should get greyed out(disabled for further changing).
    Please help.
    Thanks,
    Veena.
    Edited by: Veena. on Dec 31, 2012 4:00 AM

    Veena,
    there is nothing urgent on this forum!
    You know that you should provide your jdev version so that we can help you solve your problem.
    Next it would help if you provide the code (of the page) so that we see how you setup the 'poplist' (whatever that exactly is).
    If you mean a selectOnceChioce you can implement a valuechangeListener on poplist A and depending on the new value set the value of poplist B to yes and disable it.
    Timo

  • How to find the average of table row values it should display in next row in libwindow/​CVI

    Hi,
    How to find the average of table row values it should display in next row in libwindow/CVI
    Please let me know the solution.

    There isn't a built-in function to perform calculations on thable cells. What you can do is to retrieve thable cells values and calculate the average by yourself.
    To retrieve a bunch of cells in a single instruction you can use GetTableCellRangeVals: prerequisite for this function to work correctly is that cells are all included in a Rect structure (shortly, a rectangle) and are all of the same data type. See the help for the function for some explanations and the link to an example of its usage. In Cell range parameter you can pass VAL_TABLE_ROW_RANGE (row) macro to retrieve an entire row. See here for details.
    Once you have retrieved cell values in an array, you can pass it to Mean function to calculate the average.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Count Distinct based on another column in the same table

    Hello,
    My question in short: is is it possible to add a new column to a view which holds the DISTINCT COUNTS of values/domains of another column in the same view?
    For example, in the below table the column "Distinct Count of Occurence" shows how many distinct values a person has in the Occurence column. So AAA has 1 and 2 therefore it is 2 distinct values etc.
    My issues is that I can retrieve unique values bu Count (Select Occurence)but I can not add the new column that would add the records to the corresponding Persons in the above table.
    Is there an easy way to achieve this on the DWH level or should it be done with MDX in the cube?
    Thanks

    Hi,
    Below a solution to use the view by adding a column with window functioning, maybe this will help.
    CREATE TABLE #TMP
    PERSON VARCHAR(10),
    OCCURENCE SMALLINT
    --DROP TABLE #TMP
    INSERT INTO #TMP(PERSON,OCCURENCE)
    VALUES
    ('AAA','1'),
    ('AAA','2'),
    ('BBB','1'),
    ('BBB','1'),
    ('BBB','1'),
    ('CCC','1'),
    ('CCC','2'),
    ('CCC','3');
    --TRUNCATE TABLE #TMP
    WITH CTE
    AS
    SELECT PERSON
    ,OCCURENCE
    ,ROW_NUMBER() OVER(PARTITION BY PERSON ORDER BY OCCURENCE) AS RN
    FROM #TMP
    SELECT PERSON, MAX(RN) AS RN
    FROM CTE
    GROUP BY PERSON
    Regards,
    Reshma
    Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

Maybe you are looking for

  • More than one Quant in a Storage bin section (Strategy P)

    Dear all, We have a Storage type with Putaway strategy P, the SUT check active but no SU Management active, Mixed storage = X and Addition to stock = X. For this Storage type, our Storage bin type and SUT we have set up in customizing a Bin sectionin

  • Mistake in the creation of report painter

    Good, I have created a report and on having executed it it(he,she) gives me the following mistake: The line of formula 068 does not possess operandos of lines N º message: GR370 Diagnosis The lines of formula link between(among) yes the lines of repo

  • Export Keynote files as pdf

    I've just updated Keynote 5 1 1. When I export a keynote file as PDF I get the PDF slides in wich the date of creation showed. how can I avoid this feature?

  • Larger picture on click in iWeb

    Wondered if any of your iWeb genius's know a way of creating an on click larger image when clicking a thumbnail. I am trying to create a gallery and want a larger image to appear and then disappear when the thumbnail is clicked. Many thanks.

  • Certification expired? @ HelloWorld-app.xml in tutorial pdf

    Hi, everyone. Im just a student passed by and interesting in Flex app (however i dont have a good fundamental about web ^^") I tries to follow the pdf file, devappsflex. Using Notepad++ as texteditor and FlexSDK in Vista sp1 64bit. HelloWorld.mxml is