How to set a value wo resending the page?

hello,
I have a simple question.
Here is the scenario i need to implement:
Two items on the page:
1. "select list" returns list of values ( distinct )
2. "popup" item.
It should work in this manner:
a. initial value is derived ( sql stmnt to the DB ) from the value of the "select list" ( which is a dynamic lov );
b. if user decided to change this value -> click on the popup icon and the list of values will be presented based on the dynamic LOV. Selecting one of those will override the initial value of the item.
What i do NOT want to do is to submit the page to get this initial value ( from select ).
Hope it's clear.
thank you
Andrew

I've implemented a solution recently which I think will help you. Put the following Javascript into the HTML Header section.
* setPageItemSessionData()
* This function is called to set a page item's html + session
* data to a specific value.
* Arguments:
* pageItemName - the page item to change
* val - the value to set it to
function setPageItemSessionData(pageItemName, val)
try
/* need to take data passed into this function
and store in session variable as named in pageItemName */
/* store in HTML field only here */
document.getElementById(pageItemName).value = val;
/* store in session variable - don't really know how this works
but it does !*/
var l_Return = null;
/* get new http post request */
var get = new htmldb_Get(null,html_GetElement('pFlowId').value);
/* add http post variable/data */
get.add(pageItemName, val);
/* submit post over http - receving end will take data and store
in session variable */
gReturn = get.get();
catch(e)
alert("setPageItemSessionData: Exception - " + e);
Create a hidden text item which will be used to contain the selected Select List value (not display value). In my example this is called P162_OUTGRPIDD but it can be called anything you want.
Now put the following javascript into the Select List's HTML Form Element Attributes cell:
onchange="javascript:setPageItemSessionData('P162_OUTGRPIDD',this.value);"
The hidden text element will be changed whenever the Select List is changed. It will be set to the value (not the display value) of the Select List.
The value of the hidden item is saved in session state (as well as HTML) so that it can be used by the POPUP LOV
Now in the POPUP LOV item you can reference P162_OUTGRPIDD in the where clause, as the example below shows:
select sklpin d, sklpin v
from pdrskl, pdrgrp
where grpidd1 = grpidd and
grptyp = 'R' and
pdrskl.itpidd1 = :P162_ITPIDD and
grpidd = :P162_OUTGRPIDD and
bldagtidd1 is null
order by sklpin asc

Similar Messages

  • How to set a bind variable across the pages in a report

    I want to create a portal report where data will come from a table for a date range for a week.
    For e.g select event_date,last_name, event_name
    from RESOURCES
    where event_date between trunc(to_date(:curr_date,'DD-MON-RRRR'))
    and trunc(to_date(:curr_date,'DD-MON-RRRR')+ 7)
    The :curr_date is defined as a bind variable whose default value is sysdate.
    Now, when we run the report for the first time, it takes the :curr_date as
    sysdate and prints the report.
    I have two buttons in the report output like "previous week" and "next week".
    If someone presses previous week, the same report should run with curr_date
    as sysdate-7 and if someone presses next week, the report should run with
    curr_date as sysdate +7 and also the :curr_date sets to sysdate - 7 or sysdate + 7
    depending on the button pressed.
    Problem:
    How do I set the value of curr_date if someone presses any of
    previous week/next week.
    null

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • In flex, How to set a value to one parameter, the parameter defined in a cffunction in a cfc file

    In flex, How to set a value to one parameter, the parameter
    defined in a cffunction in a cfc file, In the cffunction there are
    much cfargument, I want set a value to one of them, such as the
    cfc:
    <cffunction access="remote" name="myShow" output="false"
    returntype="struct">
    <cfargument name="ID" type="numeric" default=0>
    <cfargument name="GoodsID" type="string" default="">
    <cfargument name="DestTime" type="string" default="">
    <cfargument name="DestCount" type="numeric" default=1>
    How I set a value to only parameter one of them , such as set
    GoodsID when use mx:remoteObject.
    Thanks for your help

    Got maybe a solution for you, I have just tested it.
    So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
    select #Var1+#Var2 from dual
    This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
    Hope it helps.
    Shamil

  • How to set default values on the screen painter parameters?

    Hello ABAP Gurus,
    I would just want to ask how to set default values on the screen painter parameters.
    Thank you for your replies.

    Hi,
    To set default values for screen painter parameters initialize the field names with default values in the PBO module....
    say u have the field name as f_field1....
    in the PBO of that screen initialize it....
    f_field1 = '100'  "here 100 is the default value.
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • How to set variables values via VBA.

    Anybody please help.
    How to set variables values via VBA in workbook. SAP Netweaver 2004s.

    Pass variable values with VBA and BI 7.0 funtions to Query
    At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
    How to start:
    Switch to design mode in BEX Analyzer:
    Implement a BEX 7.0 design item u201Cbuttonu201D
    Click on the button to implement the properties
    Make the input for the commands
    data_provider = dataprovider_1
    cmd = process_variables
    subcmd = var_submit
    No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
    Make a range somewhere in the excel with the following structure:
    Name    Index   Value
    VAR_NAME_1      1       Variablename
    VAR_VALUE_EXT_1 1       variablevalue
    Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
    Set a name for this range with EXCEL functionality but without the header:
    Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
    If you have more variables to process you can of course enhance your Filterrange!
    In the left upper Corner you have a name for your button:
    Now you can raise the button-click in vba like this:
    Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
    regards, Lars

  • How to set default values in initialization event for select option

    Abapers,
    I have 3 GL account like 0024831231,0024831238,0024831245.
    Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
    Thanks

    Select option is table <Structure> with fields, low, high, sign & option
    you need to append the value into the select option, with appropriate value in low or
    example:
    S_HKONT-low  = <value>
    S_HKONT-SIGN = 'I'
    S_hkont-OPTION = 'EQ'
    append s_hkont.
    Default value for select-option also can be added directly in select-option statement.
    Regards,
    Mahesh

  • How to set default values in dialog programming

    hi gurus
    can anyone suggest me
    how to set default values in dialog programming
    thanks&regards
    kals.

    it's a bit dirty but I usually just place it in the PBO with a flag for control. It's simple and not too costly i think.
    MODULE preRender OUTPUT.
      DATA first_time TYPE flag VALUE 'X'.
      IF first_time EQ 'X'.
    *   put your initialization code here
        CLEAR first_time.
      ENDIF.
    ENDMODULE.
    -MiR

  • How to set default value in OAMessageLovInputBean?

    Hi,
    How to set default value in OAMessageLovInputBean while loading the page?
    I have tried the following code but its not working.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String delToLoc = (String)pageContext.getSessionValue("deliverTOLoc");
    Number delToLocId = (Number)pageContext.getSessionValue("deliverToLocId");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject poHeadervo =
    (OAViewObject)am.findViewObject("PoHeaderMergeVO");
    PoHeaderMergeVORowImpl poHeaderVoRow =
    (PoHeaderMergeVORowImpl)poHeadervo.getCurrentRow();
    if (delToLoc != null && !"".equals(delToLoc)) {   
    // poHeaderVoRow.setShipToLocation(delToLoc);
    OAMessageLovInputBean msb = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("DefaultShipToLocation");
    msb.setValue(pageContext,delToLoc );
    Please suggest me how to resolve this issue.
    Thanks & Regards,
    Sunita

    Hi Cristoph,
                      We tried all the way but could not able assign characteristics value before saving the document. it means we can only see the assigned value using transaction CV02N. but our requirement is to check if the user fills any value into characteristics it should check with default value which we would like to assign whenever we create a new part of the document which we are not able to achieve.we tried a lot but could not succeed.
    Nay idea if we can achieve this....
    Regards
    Bhuwan Tiwari

  • How to set a value to a disabled field in an B1 screen ?

    Hi,
    Can anyone tell me how to set a value to a disabled field in an existing screen.
    For example , I want to set a value to the Paid/Credited field in the Sales - A/R Invoice screen, which is a disabled field.
    I tried setting the field as enabled but it throws an error.
    Thanks in advance
    Mina

    It depends on the business process required for generating the invoice.  (What is this process just now?)
    I can think on quite a few ideas, but can't be sure if any of them will match your specific requirements.  I'll list a few here and see if any of them might work, or at least generate some new ideas for you. (Unfortunately you can't change an existing payment object to add an invoice to it at a later date, nor is the reconciliation process exposed through the SDK.  This limits your options a bit.)
    1) Is there a need for a separate delivery and invoice?  Would skipping the delivery process and using the standard Invoice + Payment screen work for you?  Stock would be issued, invoice created and payment matched directly to invoice without any work.
    2) This might apply if the invoice is simply a one for one match with the delivery.  Rather than just generate a payment in the delivery screen, generate the invoice and a payment at the same time.  The standard invoice screen will then show it as paid.  You can control the dates on the invoice raised through DI code.
    3) Where do you write the Paid Amount to?  How is it not available in the invoice screen?  Put it somewhere accessible and write it to the user field.
    John.

  • How to set a value when right click on af:commandlink ?

    Hi All,
    JDev Ver : 11.1.1.4.0
    How to set a value to property listener on right click of a commandLink ?
    I am having values that are hyper linked using af:commandlink, when i right click on hyperlink, that value i need to get in the managed bean ?
    (While right click i am populating on menu item)
    how to get the value ?
    Give some solutions ?
    thanks
    Gopinath

    Hi,
    Try this code:
    <af:clientListener method="rightClick"
    type="contextMenu"/>
    <af:serverListener type="setValue"
    method="#{beanName.setValueMethodName}"/>
    <trh:script xmlns:trh="http://myfaces.apache.org/trinidad/html"
    id="s13">rightClick = function(event) {
    var source = event.getSource();
    AdfCustomEvent.queue( source, "setValue"
    , {}, false); }
    </trh:script>

  • How to set default value to date type attribute.

    Hi,
    How to set default value to date type attribute.
    E.g I want to set u201C01/01/1999u201D to date attributes.
    First i want to set value and then i want to fetch the same & want to check equals.
    please suggest solution.
    Regards,
    Smita

    Hi,
    In wdinit() method u can set the date
    DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
    Date today = Calendar.getInstance().getTime();
    String reportDate = df.format(today);
    wdContext.currentContextElement().setFromDate(reportDate);
    Another way you have set the this formate like that
    1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
    2. Select the type as "date"
    3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
    4.Bind the context attribute to the type created now.
    Hope this helps u.
    Best Regards
    Vijay K

  • How to set fixed value in doDML

    Hi,
    My application is ADFBC.
    i am getting fixed value in backing_bean.this value is not coming form VO.how to set this value in doDML.because i want to save this fixed value(this value changing in backing_bean from UIpage) into database.
    actually i am using fixed list box values(these are not from VO) in UIPage and after submitting i am getting this vaue in backing_bean and some updatable table is displaying in UIpage.after filling some values in the updatable table and i am pressing commit button then i have to set this value into one table in databse.
    all updated values are saving because i am using ADF table.now i have to save this list value also in one of the column in this table.
    How to set this value into doDML?
    please help me.
    Thanks,

    Have you thought of creating a "transient" attribute in your EO or VO, that stores the fixed list box value? Then in the doDML method you could grab this attribute's value and update the other EO attribute you're interested in.
    Alternatively in the transient attributes setter in the EO, you could write the code to update the other EO attribute.
    Hope this helps.
    Regards,
    CM.

Maybe you are looking for

  • Using sets with Strings

    Hello, I'm in a dilemma here I'm using a Set to store Strings: private Set<String> X; I have a class that receives a String and first check if the string is allready on the set and if not it adds it: public boolean method (V e) { if(X.contains(e.getS

  • Can I have 2 different EP instances in same server.

    Hi Friends.. I have Enterise portal installed on server. It uses UME engine of  SCM4.0 server. Client weants to install  EP for different SCM5.1 system along with the old one. I am new to EP and moreoevr have no idea if tha is feasible. They say they

  • Recurrning instance did not start at specified time

    Hi, All, Version BO XI R2. We have a daily recurrning schedule that starts at 02:30AM every morning (Deski and Crystal Reports). For some reason, today they did not start 02:30AM and were still on RECURRNING status in History tab though time has pass

  • Query Designer - Not able to "Save" the entered data

    Hi Folks, I've created a planning-enabled query in BI 7.0 Query designer. When I execute (in the web), it allows me to make manual entries. However, there's no standard "Save" button to save/update the values.  The cube is Real-Time and the query I b

  • Analysis diagram

    I have a problem which will eventually be solved using ejbs and servlets but have been asked to produce an analysis class diagram without mentioning servlets, ejbs and databases. The application is an online bank, the diagram should not mention any t