Availability of application items in initial VPD call

Hi There,
In my current project, an apex application is called from a j2ee application, which
provides apex with a sessionid( by means of an application item passed in the URL).
This sessionid is needed by apex to restore the
security context. This process is implemented in the 'Shared Components>Security Attributes>VPD'.
The first time the apex page is processed, the application item isn't set, and therefor stays null when calling the VPD pl/sql procedure.
In other words : The application item values passed in the apex url aren't processed until after the VPD call.
My question therefor :
Is there anyway to use an item that is passed through an url, in the VPD call ?
Regards,
Art

I tried this with an SSO-authenticated application, passing in the value of an application item in the URL. I used the VPD code block to access this item in two scenarios: 1) referencing it with the v() function and 2) referencing it as a bind variable. In each test case, I inserted the value into a table and also used htp.p on v('the item') on the after-login page to display the item value. Everything worked fine, i.e, the "deep link" was properly preserved from the initial request (URL) and reinstated after authentication, session state input values included.
What is your apex version?
BTW, when you say you are calling the apex app from a j2ee appplication, I assume you mean that you have situated a link somewhere for a user to click on -- there is really no call or calling context involved here.
Scott

Similar Messages

  • Referencing application item in report query

    I can't seem to find documentation on how to do this. I have defined an application item in shared components called APP_LOCATION. I need to reference this item in a report query where clause. This is an sql report, not an interactive report. I have tried:
    select .....
    from ..
    where x.column=:APP_LOCATION
    but this does not work. Can someone help or point me to some documentation on this?

    I found the answer to my own question. The query syntax was correct, but I was not setting the value of the application item.

  • Enqueue for work item n deleted by called application

    Hi All
    We upgraded from 4.6C till ECC6.0 and from then we receive occasionaly messages in SM21: Enqueue for work item 000001198539 deleted by called application.
    This results in problems when 2 dialog task are executes after each other. Somethimes the second taks is not executed. I find in the log the following errors:
    - Temporary error in result processing of work item 000001199739
    - Error when loading component: Work item 000001198388 locked
    - Work item 000001198388 locked by user WF-BATCH (enqueue error)
    This is the head of the WF that's locked..
    We implemented all relevant OSS notes regarding the message, but still we receive those messages (notes 1040693 - 1050793 etc) We are on support package SAPKB70012.
    I have checked the code in our custom WF and in some background task we use a DEQUEUE_ALL. Can this be the problem? The WF worked perfectly in 4.6C.
      CALL FUNCTION 'ENQUEUE_EFBKPF'
       EXPORTING
    *   MODE_BKPF            = 'E'
    *   MANDT                = SY-MANDT
         bukrs                = i_bukrs
         belnr                = i_belnr
         gjahr                = i_gjahr
    *   X_BUKRS              = ' '
    *   X_BELNR              = ' '
    *   X_GJAHR              = ' '
    *   _SCOPE               = '2'
         _wait                = 'X'
    *   _COLLECT             = ' '
       EXCEPTIONS
         foreign_lock         = 1
         system_failure       = 2
         OTHERS               = 3
      IF sy-subrc <> 0.
        RAISE locked.
      ENDIF.
      UPDATE vbsegk SET zlspr = i_zlspr
                    WHERE ausbk = i_bukrs
                      AND belnr = i_belnr
                      AND gjahr = i_gjahr.
    *                and ( zlspr = 'A' or zlspr = 'Y' ) .
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'
           EXPORTING
                _synchron = 'X'.
    Any help appriciated
    Kristof

    The entries we have solved by removing the DEQUEUE_ALL function in a method.
    Still we receive somethimes errors in the workflow log
    Temporary error in result processing of work item <n>
    Message no. SWP030
    Error when loading component: Work item <n> locked
    Message no. SWP034
    Work item <n> locked by user WF-BATCH (enqueue error)
    Message no. WL605

  • Call Application Item in CSS

    Hello,
    Does anyone know if it is possible to call an application item in a css file, and if so is the proper format &F_ITEM. ?
    Let me give you an example. Lets say I want the user to be able to change the text color, and so I set the application item, through some application means, and in the css I have something like:
    body { text-color:&F_COLOR. ; }
    is there a way to do this?
    Thanks,
    ~Chris

    Hi Chris,
    I don't think you could do it from a css file as this is a static file. You could, however, have a page process that runs in the After Header process point and does something like:
    BEGIN
    htp.p ('&lt;style type="text/css"&gt;');
    htp.p ('body {color:' || v('F_COLOR') || ';}');
    htp.p ('&lt;/style&gt;');
    END;This would add a style tag to the page but will allow your user to pick their colours.
    Andy

  • Problem with application item and session state

    Okay, let's see if I can explain this problem coherently.
    I have a small app (one page), with an application item, F_WHERE_CLAUSE.
    This page has three regions in which there are items that the users can populate for search conditions. A couple of these items are "select list with submit" (I still need to upgrade to the AJAX method, I know). There is another region which has one hidden field, called P1_WHERE_CLAUSE. This field is defined to "Always, replacing any value in session state..." with source type of "Item (application or page.....", and a source value of F_WHERE_CLAUSE with no default value.
    I have a button called "Search" which submits the page and fires a PL/SQL process which builds a where condition based upon the other page items and stores the value to the application item F_WHERE_CLAUSE (correctly).
    For testing, I've made the P1_WHERE_CLAUSE field visible so that I can see what's going on. I've also clicked the debug and session buttons to help trace this. After I click the "Search" button and the page submits, debug shows:
    0.02: ...Session State: Save "P1_WHERE_CLAUSE" - saving same value: "1=1"
    followed later by:
    0.05: ...Session State: Saved Item "F_WHERE_CLAUSE" New Value="lower(primary_class) = 'rock' and country = 'Spain'"
    The field P1_WHERE_CLAUSE displays with the correct search criteria as signified by F_WHERE_CLAUSE above. However, If I click the "session" button to view the session state values, P1_WHERE_CLAUSE shows up as:
    P1_WHERE_CLAUSE Textarea    1=1    U while F_WHERE_CLAUSE displays the correct value still.
    The reason this "problem" came up, is that this page also has three SQL report regions which use &P1_WHERE_CLAUSE. for the where condition. While they display the correct results on-screen, each report region also has the "Export to csv" enabled, and the export seems to be using the "1=1" condition (from the "session" window) instead of the search criteria that the on-screen region is using (F_WHERE_CLAUSE and the displayed P1_WHERE_CLAUSE), resulting in a retreival of all records.
    Anybody have any idea what's going on and why, and how to get the csv export to use the correct value for the where condition?
    Thanks,
    Bill Ferguson

    It appears the "Export to CSV" functionality requires the item value to be set in session state. The P1_WHERE_CLAUSE item value never gets saved to session state. The page is rendered and the value is put in the item on the page but until you submit the page session state doesn't know what P1_WHERE_CLAUSE is.
    Create a before header computation or process to set the value of P1_WHERE_CLAUSE (which will save it to session state). It is interesting that the report regions didn't need to look at the value in session state but the "export to csv" does.
    --Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding multiple items against one service call

    deal all,
    i need to know , how can we add more then one item to one service call. is there any solution or add-on for this purpose.

    You can add only one item (to be specific only one Serial Number ) in one Service Contract.
    I don't think there is any add-on available for that.

  • Assigning Value To An Application Item via JS

    Hi guys,
    I am trying to assign a value to an application item by using javascript. But I can't do this when I try to display with alert the result is empty. Do you have any idea how can I assign value to an application item by using javascript?
    else if(action=="ASSIGN")
    var moname = $(el).children("td[headers='SOURCE']").text();
    $s('F10_SELECTED_OBJ',moname);
    alert($v('F10_SELECTED_OBJ'));
    Thanks

    Hi
    >
    I am trying to assign a value to an application item by using javascript. But I can't do this when I try to display with alert the result is empty. Do you have any idea how can I assign value to an application item by using javascript?
    >
    Scope of JavaScript is the HTML DOM in the browser. The Application Items do not exist in the HTML DOM, only in the session state.
    This explains what you observer. To set the App Items using JS you have to use an AJAX call to an OnDemand Application Process that sets the Application Item using PL/SQL. Or, call a procedure over http and set the App Item in that procedure after setting the Workspace / Security Group Id.
    Regards,

  • I have bought an Item from apple store Called "Scarry Tribes , 19,999 sale ! . from develober Called "XYRALITY GmbH" Type: In App Purchase , and no thing added to my Account in the Game !!?

    I have bought an Item from apple store Called "Scarry Tribes , 19,999 sale !" . from develober Called "XYRALITY GmbH" Type: In App Purchase , and no thing added to my Account in the Game !!?
    and if you cam Help Me I'll Copy the Invoice or Order number .. !

    While I am no fan of Best Buy and would not buy a lightbulb from them I doubt you issues have anything to do with your iMac and more to do with your lack of experience and simply getting bad advice. Judging by you post I suspect you have loaded your computer down with a lot of crapware and that  has caused it's problems. For example running antivirus apps on a Mac not only is a waste of time, it's a waste of money, system resources and will eventually create more problems that it solves. Please begin educating yourself on the subject by reading Thomas Reeds articles on the subject, Thomas is a frequent and knowledgeable contributor to these forums. You can find his webpage at http://www.reedcorner.net/tech-guides/
    The good news is here are absolutely no, zero, zippo viruses for OS X. There are other types of malware available (for example trojans) however they differ greatly from viruses in that the use has to download and install them, whereas viruses do not work that way. OS X is not like MS Windows and is extremely secure.
    My suggestion at this point would be to clean your computer of the crapware (including antivirus apps) however before doing so please download and install EtreCheck and post its report. Then we can see how your computer has been configured and begin to give you some advice on the next steps.

  • Setting the value of an Application Item (setting a global variable);

    In APEX 3.2.0.00.27, I need to initialize a global variable to 0 to implement a variable for testing to see if anything on the page has changed. Will update to 1 when certain select lists on the page are changed. Have read through some similar questions and replies within the forum as well as other blogs and sites. So, I believe what I am doing is the way to go about this. Unfortunately, my initialization of an application item/global isn't happening yet. here's a rundown of what has been implemented:
    1) created an application item, G_CLASSIFICATION_ID_NEW in the shared components;
    2) created Javascript (JS) function called by addLoadEvent in the page html header region so when the page loads, the G_CLASSIFICATION_ID_NEW global/application item should get set to 0 with the following JS and using AJAX and htmldb_GET:
    <script type="text/javascript">
    function initVars()
    alert("before get initvars");
    var get = new htmldb_Get(null,$x('pFlowId').value,null,22);
    get.add('G_CLASSIFICATION_ID_NEW', 0);
    gReturn = get.get();
    if(gReturn){
    alert(gReturn.value);
    get = null;
    alert("after get initvars");
    alert("before call to initpage");
    addLoadEvent(initVars());
    </script>
    I've used the htmldb_Get with success for populating other global variables and running On Demand Processes with onchange JS calls in the html form element attributes within select lists on the page. Afterwards, I can check the globals via the Session window and searching on Application Items. Unfortunately, I'm missing something because my G_CLASSIFICATION_ID_NEW never gets populated when I load the page. The alerts all popup when the page is loaded, so I know the script is being executed when the page loads. the alert(gReturn.value) comes back undefined. And, needless to say, the G_CLASSIFICATION_ID_NEW to 0 is not occurring.
    I've tried the htmldb_Get with it calling an application process and without (set to null). From what I've read, you shouldn't need to call an on demand process to have the get.add set the global variable. Then again, this could be where I'm going wrong. however, as I've mentioned, this works for other functions called from an onchange to populate an application item, but the page has already loaded when the onchange(s) get executed. They may work because the page is already loaded when the onchange is called. My point here is that my other On demand processes are NOT setting or changing the global variables at all. The globals are getting set with the get.add(<app item>, <value>) portion of my other JS functions within the HTML Header region. So, I'm inclined to believe that I don't need the 'application_process=<some_odp>' parameter set, but if that's not true, please let me know. if so, what would need to be in the on demand process--ie, what would be the purpose of the get.add(<application item>, <value>) if I set the global variable in the on demand process because that's the only thing I could think of doing within an on demand process for this?
    If somebody can point out what I'm not understanding or failing to do here, that would be great. I'm doing fine with APEX, but wouldn't consider myself a guru with it just yet. I'm definitely not a JS/AJAX guru, and when things like this go astray, I get bogged down because I'm not sure of the problem. So, I'm hoping you gurus who monitor this forum can get me going in the right direction.
    thanks,
    bob

    Hi Jari,
    Does that javascript work if you place it some of region footer on page 22 ?Yes. I cut it out of the html header of the page, and put it in the footer of the first region on the page. It initializes the variable. Putting it into the footer of the first region on the page should work for me instead of having an extra region on the page that's being picked up from page 0.
    Is your page 22 authentication public ?No. This particular page is set for an ADMINISTRATOR only. That said, I am logged in as an administrator. So, I cannot see why setting authentication should make a difference as long as I have that authentication/authorization. Also, there will be other pages where I want to use this script or a similar script, but again, those pages will not be open to the public. the authentication will be "role" based where a user will not necessarily have to be an administrator, but they will have to have a certain role to access the page. Is there a known problem or something that precludes a html header JS script from doing an addloadevent when authentication is NOT public?
    thank you,
    bob

  • How to set an Application Item from PL/SQL

    I am attempting to set an Application Item
    After login to my app, I want to retrieve a row from my SETTINGS table and populate some Application Items with the settings information so that I can
    display some of that settings information on every page.
    Just to start, I created one Application Item named F106_YEAR
    I then created a Shared Components Application Process which executes on New Session: After Authentication
    I created this process as an Anynomous PL/SQL block.
    declare
    aucyr varchar(4);
    begin
    select year into auctyr
    from settings;
    :F106_YEAR := aucyr;
    end;
    I've tried a couple of other Syntax tricks attempting to reference the Application Item F106_YEAR from within PL/SQL (like V('F106_YEAR') but nothing seems to be working.
    I'm sure that I am missing something simple. Can someone tell me how to set an Application Item from PL/SQL?
    Thanks in advance.

    I'm still doing something wrong because this is not working for me.
    I've tried both of the following versions as an Application Process set to run on New Session after Authentication:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    :F106_AUCTION_YEAR:=auction_year;
    end;
    and I also tried:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    APEX_UTIL.SET_SESSION_STATE (p_name, p_value);
    end;
    F106_YEAR is a global Item (shared components).
    The select statement works just fine in SQL*PLUS so I know that it is correct.
    If I run the debugger and log into the application, here is the output. Shouldn't I see my Application Process get called if it is set to run on New Session after Validation?
    My Application process is named RETRIEVE_AUCTION_SETTINGS
    0.01: A C C E P T: Request="P101_PASSWORD"
    0.01: Metadata: Fetch application definition and shortcuts
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Fetch session state from database
    0.02: ...Check session 695371898690095 owner
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 106, page 101
    0.03: ...Validate item page affinity.
    0.03: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: ...Session State: Save "P101_USERNAME" - saving same value: "jps"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: Branch point: BEFORE_PROCESSING
    0.03: Processing point: AFTER_SUBMIT
    0.03: ...Process "Set Username Cookie": PLSQL (AFTER_SUBMIT) begin owa_util.mime_header('text/html', FALSE); owa_cookie.send( name=>'LOGIN_USERNAME_COOKIE', value=>lower(:P101_USERNAME)); exception when others then null; end;
    0.04: ...Process "Login": PLSQL (AFTER_SUBMIT) wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => v('APP_SESSION'), P_FLOW_PAGE => :APP_ID||':1' );
    0.06: ...Process "Clear Page(s) Cache": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 101
    0.06: Nulling cache for application "106" page: 101
    0.00:
    0.00: S H O W: application="106" page="1" workspace="" request="" session="695371898690095"
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Application 106, Authentication: CUSTOM2, Page Template: 2904114531488186
    0.01: ...Session ID 695371898690095 can be used
    0.01: ...Application session: 695371898690095, user=JPS
    0.01: ...Determine if user "JPS" workspace "1040027630222986" can develop application "106" in workspace "1040027630222986"
    0.01: ...Check for session expiration:
    0.01: Session: Fetch session header information
    0.01: ...Metadata: Fetch page attributes for application 106, page 1
    0.01: Fetch session state from database
    0.02: Branch point: BEFORE_HEADER
    0.02: Fetch application meta data
    0.02: Computation point: BEFORE_HEADER
    0.02: Processing point: BEFORE_HEADER
    0.03: Show page template header
    0.03: Computation point: AFTER_HEADER
    0.03: Processing point: AFTER_HEADER     
    0.04: Computation point: BEFORE_BOX_BODY
    0.04: Processing point: BEFORE_BOX_BODY
    0.04: Region: Auction_Title F106_AUCTION_YEAR

  • Trying to set application item value through javascript

    Hi,
    I am not sure what I am doing wrong here can someone possibly shed some light? I have the following in my
    HTML Header of my login page
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val){
      var req = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=dummy', 
      &APP_PAGE_ID.);
      req.add('F_LOGIN_MESSAGE', val);
      var gReturn = req.get();
      req = null;
    </script>
    <script language="JavaScript1.1" type="text/javascript">
    function doLogin()
      var err = false;
      alert(document.getElementById('P101_USERNAME').value);
      if((document.getElementById('P101_USERNAME').value == '') ||
        (document.getElementById('P101_PASSWORD').value == '')) {
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err) {
        doSubmit('Login');
    </script>The setAppItem function does get called but it is not setting the application items text?
    Thanks in advance for any help!

    Thanks for all of your help Jari it is appreciated!
    For others the solution was to add the following to my HTML Source
    <div id="LOGIN_MESSAGE"></div>and then created the javascript routine
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val)
      $x('LOGIN_MESSAGE').innerHTML=val;
    function doLogin()
      var err = false;
      if($v('P101_USERNAME') == '' || $v('P101_PASSWORD') == '')
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err)
        doSubmit('Login');
    </script>
    Thanks

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

  • Application Computation to populate Application Item

    Hi all
    (Version 4.0.2).
    I'm trying to populate an application item using an application computation (On new instance / SQL Query returning Single Value). In principal this works - only at a later point than I would expect:
    I've got a page with charts which use the application item (userid) in the where clause. However, when I enter the page, the charts claim 'no data' - only after submitting the page (via a button) the item population seem to happen, because after this, I get the expected data.
    Do I have a wrong concept expecting the app-items to be populated when the user creates a new session and be readily available when entering any page?
    If so, what is best practice to achieve the desired behavior?
    Many thanks
    Tino

    Hi Tino,
    As the following book excerpt from "Easy HTML-DB Oracle Application Express: Create Dynamic Web Pages with OAE" by Michael Cunningham & Kent Crotty says:
    "On New Instance is an application level computation and should be created as such. It can be a little confusing since this computation point is available when creating a computation at the page level. However, do not use the On New Instance display point on application pages. These should be defined as an Application Computation in Shared Components. When an On New Instance computation is created at the application level, it will be executed during login when the session is created in HTML DB. A good use of this type of computation would be to read a cookie from the user’s browser to set some application level items."
    You can populate the item on page load by configuring the source section in the item attributes or by means of a dynamic action on the event "Page Load.", for example.
    Regards,
    Sergio

  • BDC recording(updating two line items in a single call)

    Hi,
    I have a problem with the transaction PK31,while recording we enterd material number,plant,supply area in the first screen,after that it display line items for that control cycle,I want to update some fields in that line items,when i updated quantity and status fields in the first line item after that i cliked the change "qty/status button" and it saves that field values and it comes out from the transaction.
    can you please suggest what is the solution for updating two line items in a single call(PK31 transaction).

    Hi,
    In one screen . Put 2 containers with different names.
    cont1,cont2
    on each of the container call grid,grid1 like below .
    1. this is for item line display
    IF g_r_grid IS INITIAL.
          CREATE  OBJECT  g_r_cont
                      EXPORTING  container_name  =  'CONT1'.
        g_r_variant  =  sy-repid.
    *--Build  field  catalog
        PERFORM build_field_catalog.
    *--Layout selection
        g_r_layo-cwidth_opt  = g_c_set.
        g_r_layo-no_rowmark  = g_c_set.
        g_r_layo-sel_mode    = space.
        CALL METHOD g_r_grid->set_table_for_first_display
          EXPORTING
            i_buffer_active = g_c_set
            is_variant      = g_r_variant
            is_layout       = g_r_layo
            i_save          = g_c_set
            i_default       = g_c_set
          CHANGING
            it_outtab       = g_t_alv
            it_fieldcatalog = g_t_fieldcat
            it_sort         = g_t_sort.
      endif
    1. this is for error data display
    IF g_r_grid1 IS INITIAL.
          CREATE  OBJECT  g_r_cont
                      EXPORTING  container_name  =  'CONT2'.
        g_r_variant  =  sy-repid.
    *--Build  field  catalog
        PERFORM build_field_catalog.
    *--Layout selection
        g_r_layo-cwidth_opt  = g_c_set.
        g_r_layo-no_rowmark  = g_c_set.
        g_r_layo-sel_mode    = space.
        CALL METHOD g_r_grid->set_table_for_first_display
          EXPORTING
            i_buffer_active = g_c_set
            is_variant      = g_r_variant
            is_layout       = g_r_layo
            i_save          = g_c_set
            i_default       = g_c_set
          CHANGING
            it_outtab       = g_t_error
            it_fieldcatalog = g_t_fieldcat
            it_sort         = g_t_sort.
      endif

  • Using value of application item in javascript

    Hello All,
    Apex 3.1
    I have a javascript that calls an application process, please see below. In the application process I have logic to set/change the value of an application item. Later in the javascript I need to set a page item to the value of the application item which was set in the application process. Any alerts that I post during the javascript show this value as blank, even though a similar HTP.prn in the application process displays the value!. After the script completes the correct value of the application item is in session state . Can someone explain this timing issue to me? Why can't I get the value of an application item in the javascript when the application process is called from the javascript?
    Is there a simple workaround here for me to get this value?
    <script>
    function f_ValidateLinkLine(pThis) {
       // The row in the table
       var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
       // is Link Line really a number? 
       if ( isNaN(html_GetElement('f20_'+vRow).value)) {
            if (html_GetElement('f20_'+vRow).value.length > 0) {
            alert('Link Line is an invalid number - '+html_GetElement('f20_'+vRow).value);
            html_GetElement('f20_'+vRow).value = '';
       } else { 
           if ( ! isNaN( parseFloat(html_GetElement('f20_'+vRow).value) ) ) {
       var link_line = parseInt(html_GetElement('f20_'+vRow).value);
       if (html_GetElement('f20_'+vRow).value.length > 0) {
          var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateLinkLine',0);
          get.add('F101_LINK_LINE',html_GetElement('f20_'+vRow).value);
          get.add('F101_INVENTORY_ITEM_ID',html_GetElement('inventory_item_id_'+Number(link_line)).value);
          get.add('F101_QUOTE_LINE_LINK_ID',html_GetElement('f01_'+spacer+link_line).value);
          get.add('F101_QUOTE_LINE_ID',html_GetElement('f01_'+vRow).value);
          get.add('F101_QUOTE_NUMBER',html_GetElement('f19_'+vRow).value);
          gReturn = get.get();
       // The application process can sometimes change the value of F101_QUOTE_LINE_ID
      //  and I need to set f37 to this value when this happens
        html_GetElement('f37_'+vRow).value =('&F101_QUOTE_LINE_ID.');  //< -- This does not work, the applicaiton item is blank!
          if (gReturn) {
           alert(gReturn);
          if(gReturn) {
           html_GetElement('f20_'+vRow).value = '';
           html_GetElement('f37_'+vRow).value = '';
       }  //End Check Length
      } else {
      html_GetElement('f37_'+vRow).value = '';
      } // is Link Line a number?   
    } // End If  
    } // End ValidateLinkLine
    </script>Edited by: blue72TA on Aug 16, 2011 11:39 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM

    Hi,
    When you use application item in JavaScript like you do, string &F101_QUOTE_LINE_ID. is substituted by item value from session state.
    Changes to that item value when you call On Demand process do not affect to page.
    Lets take example,
    You app item F101_QUOTE_LINE_ID value is e.g. XX in session state.
    You run page and see page source it looks like this
    html_GetElement('f37_'+vRow).value =('XX');Kind you have hard code value to JavaScript.
    Nothing will change that unless you refresh page.
    You need return value from On Demand process.
    To set value code could look like then
    html_GetElement('f37_'+vRow).value = gReturn;Regards,
    Jari

Maybe you are looking for

  • CUA:  Wrong entries in the table USZBVSYS

    Hi All, While searching a particular user access to the child systems via SUIM - > Users by system, the report given output that the user have access to so and so system. Whereas that user already deleted and there is no user account in CUA and the r

  • How do I change the location of my music in itunes?

    Recently my hard drive had died. Luckily I had a back-up drive with all my music on it. But everytime I want to play a song - itunes asks me where the song is, and I have to manually point to it on the back-up drive. I was wondering if there's a way

  • Error messages in console related to iDVD

    OSX 10.7.2 / iLife11 ( iDVD 7.1.2 installed) This is the kind of message I can see in my console :  (multiple...) Nov 17 09:34:59 MacErwin com.apple.mdworker.i386.0[507]: SQL error: column MovieURL is not unique Nov 17 09:34:59 MacErwin com.apple.mdw

  • Delete row in an internal table

    Hi, with key1 and key2 how do I delete a row in an internal table itab? I want to do something like (but dont succeed) this: DELETE itab WHERE x = key1 AND y = key2 thanks in advance

  • Moving Abroad - transfer from o2 to Vodafone PT etc?

    Hi all, I will be moving to Portugal in the summer. Can my Iphone be changed from o2 to Vodafone PT (the Portuguese Iphone providers) via any official Apple route? Regards, Andy. Message was edited by: Alpouvar