Problems with F4 Value Help in NW2004s Portal

Hello,
we are having some troubles with the F4 ValueHelp Extension from the Advanced BSP Programming book (and the blogs of course).
We've implemented the solution on a 4.7 backend and portal 6.0. No problems there, everything was working fine.
We now moved to erp2005 (WebAS 700) and NW2004s Portal (7.0).
The popup shows and I can select entries from the list. But when clicking the ok icon a javascript error is thrown stating that 'parent.document.getElementById(...)' is null or no object.
I think the problem is, that by making a call to 'parent' we are searching in the portal frame and not the BSP. There (in the portal frame) the element is not known so the error is thrown.
I allready changed from the dialog_ie6.js provided on the BookCD to the one delivered by SAP. Did nothing regarding the error.
I also tried changing ZCL_BSP_M_INPUT_HELP->BUILD_ACCEPT_SELECTION_SCRIPT. I changed all the "parent.document.get..." "to document.get...". The error message was still the same, 'parent.document.getElementById(...)' is null or no object.
So now I'm kind of stuck. If I try the example outside the portal everything works as expected. So this clearly seems to be a problem with the portal integration. All involved BSP-Apps are marked as "supports portal integration".
Any ideas on this topic?
Thanks and kind regards,
Alexander Sperling

I have a working solution to the problem.  It isn't the nicest solution because it will probably require some modifications to the application that hosts the value help, but we will get to that in a second.
I tried many different ways to come up with a solution that would still work via JavaScript. The portal is now loading the popup javascript in the master frame.  It registers event handlers so that if any application triggers a popup internally it "hi-jacks" the event.  So regardless of what I change in the BSP javascript library, it gets overriden by the portal one. The portal also now even enforeces its theme on the inner page in the popup.  Truly the portal takes complete control over the inner html of the popup.
To make things worse the popop has not path to reach the source that triggered it.  The source objects are tracked in the javascript, but because the master frame takes over; the popup window only has access and visibility to the master frame and the navigation frame.  In essence in the DOM it is now higher in the stack than the object that actually triggered it. 
Web Dynpro gets around this because it doesn't use any client side mechanisms to communicate it results back to the source frame. Web Dynpro has the luxury of always being stateful and therefore can make certain assumptions that would never work in BSP.  The hi-jacking is an excellent solution for Web Dynpro.  The portal can then override the functionality of Web Dynpro - providing the new functionality of floating the dialog box over the entire portal - without having to make any changes to the Web Dynpro Framework.  However they never had our little BSP solution in bind obviously.
It might be possible to completely rewrite the popup_ie.js and popup_ns.js to use all different event, method and variable names.  This separate version could then provide complete separation from the portal script. However this is just a theory. I'm afraid that I wouldn't have the bandwidth to rewrite the entire script right now so I focused on a quicker solution.
The only approach that I could come up was to follow the Web Dynpro approach and return to the server with the value. To do that I used Portal Eventing.  Portal Eventing allows us to pass a value to the source frame regaurdless of our relative positions in the DOM. 
In my inner BSP application for the value help (ZES_VALUEHELP), I made the following change in the model method BUILD_ACCEPT_SEL_SCRIPT_V2.  At line 141 I changed the logic.  Instead of using JavaScript to write the selected value back into the source element, we will just trigger a Portal Event:
****With an InputField we write the contents directly back into the element
      ELSE.
        CONCATENATE me->js_close1
        `portalFireEvent('com.sap','`
        me->element_id
        `',"`
        key
        `");`
         INTO me->js_close1.
        EXIT.
The other change is within the Element handler class for inputHelpV2 - ZCL_ES_BSP_ELMNT_INPUT_HELP_V2.  We need to register the listener for the Portal Event. Therefore in DO_AT_BEGINNING we will add the follwing at line 23 (right after we place the Element Id into the URL Parameters Table.
  data: portal_event type ref to cl_portal_event.
  portal_event = cl_portal_event=>factory(
    name = <wa_params>-value
    namespace = 'com.sap' ).
  while m_page_context->element_process( element = portal_event ) = co_element_continue.
  endwhile. "End portalEvent Render
Overally using the portal eventing actually is an intersting approach.  There is only one drawback, now we have a server side event.  That being the case, our application now needs some event logic to process this event and populate the value. Depending upon if you are using MVC, Data Binding, or Flow Logic this could vary - and would have to handled by each application. The nice thing about the old approach was that it all happened via JavaScript on the Frontend and didn't require the application programmer to do anything - that was obviously its weakness as well.

Similar Messages

  • Problem with offset values

    Hi Experts,
    I have a problem with offset values. I have create a variable on OFISCPER, it's characteristic value, indivdual value, mandatory and ready for the input. I need to show the varibel period and the l previous period and so on till 12 periods. I used the offset values (-1, -2, etc.) but when I execute the query I can show just the variable period and the period previous I don`t see. The query is based on multiprovider and don´t has filters. Can anyone help me?

    Leonel,
    You may nt need to have 12 columns in the query designer.
    You could include the keyfigure and restrict it to the variable and create the offset for the 12 periods
    Check this http://help.sap.com/saphelp_nw04/helpdata/en/00/e8d13f7fb44c21e10000000a1550b0/frameset.htm
    -Doodle

  • Problem with ALV search help Dictionary Search Help

    Hello experts
    I have a problem with ALV search help.
    I use DDIC table ZXXX with text table ZXXX_T. I created DDIC search help form table ZXXX. In my WD application, in context on COMPONENTCONTROLLER i set on attribute: 'Input help mode' as 'Dictionary Search Help' and in 'Dictionary Search Help' I pass name of new created DDIC search help.
    I create a input field from that atrribute and search help works fine (there was a value and description for value from text table). So I created ALV witch contains that attribute too.
    Next I set column for this attribute in ALV as editable but on Serch help for this collumn I have only value. I DON'T HAVE TEXT DESCRIPTION FOR VALUE.
    Please help me and tell me what I do wrong?
    Miko

    Hello,
    Thank's for your help. I create DDic Search help for all fields from my ALV. Next I changed 'TYPE' for all ALV fields in COMPONENTCONTROLLER from ZXXX-Zfield to Zfield, and I changed 'Input help mode' from 'Automatic' to 'Dictionary Search Help'. Now I see Value and Description for value in Search Help in my ALV.
    Regards
    Miko

  • SB Xtreme Audio Notebook optical out problem with Home TheaterSystem-HELP!

    JSB Xtreme Audio Notebook optical out problem with Home TheaterSystem-HELP!, I have this sound card connected?(optical OUT) ?to my home?theater system's digital IN ?through the recommended /8in. optical miniplug-to-optical SPDIF cable. Theater system is set correctly to Digital-In mode. I have no sound!
    The cable is a Velocity Toslink-to-Optical Mini Plug digital cable. I don't see any settings in the Creative Console Launcher. The notebook is a Dell XPS M730 (Vista 32).
    I have a PS3, DirecTV, and the SB Xtreme Audio Notebook cable on a hub switch that connects to the system's?one Optical IN. The PS3 and DirecTV sound perfect!
    The sound card works fine with standard PC speakers. I'm at a loss as?to what to try next. I set this whole system up myself, so I'm pretty good at working out the kinks, except this one!
    Karen

    OK. I just went to Control Panel - Sound - Playback - Digital Output Device (SB Xtreme Audio Notebook) - Properties - Advanced. I experimented with different sample rates and bit depths. Clicked the test button and lo and behold - sound from the HTS! I've tried iTunes, PowerDVD (configured to digital output) and YouTube - no sound! Am I missing something really obvious?
    HA! Just backed out to Playback and selected Digital Output Device (SPDIF) and set as Default. Sound is emunating from HTS! Well, that mystery is solved! Who knew.
    Thanks anyway! Any comments or advice will still be appreciated.

  • I restore my iphone 3gs but after that iTunes show a message there is a problem with your iPhone, help me please

    i restore my iphone 3gs but after that iTunes show a message there is a problem with your iPhone, help me please

    Yes. Talk to whoever replaced the battery. Sounds like they broke something.

  • LOV Problem with multiple values

    HI All,
    I have a problem with LOV .When ever i click LOV after search button all values are displaying fine.
    But when i get so many values i want to select only one vlaue that is not cmng to the main page ....Cursor is in running state always after that time out error is coming in my application .
    This problem is coming with with only single value selection in lOV only problem with Multiple values retrival that time only...
    (Iam using 11.1.1.3 Jdeveloper.)
    Thanx in advance...

    duplicate of {thread:id=2286814}

  • Facing Problem with passing Values from One report to another

    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

    sorry for the late updation.
    My First Report, Summary level is a Pivot Table.
    I tried the same report with Table option, the value is passing correctly.
    Is there a way to get rid of this situation using Pivot table.
    Thanks for your help.
    below is the original request.
    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

  • Problem with who's who service in portal

    Hi Experts,
    I have  created the SAP_R3_HumanResources and  SAP_R3_HumanResources_Metadata Jco destinationations and the Test connection was successful.
    I have created the system alias  SAP_R3_HumanResources in the portal and connection for this also successful.
    When i click on the who's who iview in portal i.e Content Admin--> Content provided by SAP -->End user content--> Employee Self Services -->iviews-->Employee Search -->Who's who i am getting the same exception like before
    Can you please help me what else i need to check??
    Regards,
    Mahesh

    Hi Mahesh!
    Thanks a lot for your help...
    >Check this link which helped me to fix the same issue.
    I checked this link already but honestly I have to say that I didn´t understand the solution:
    >Metadata you have to mention the user name and password.
    >Model data it should be logon ticket, you should not maintain user ID and password. If you maintain , it will >always try to fetch this user id data. In you case this is the problem
    >And i want to confirm wheather you created all the required Jco's in the webdynpro content admin in >portal??
    I have the problem with the service "absence management".
    This service needs the following JCos:
    SAP_R3_HumanResources and
    SAP_R3_HumanResources_MetaData.
    This JCos were already there but I had to change them. The HR backend was moved to an external provider and therefore we could´nt use SSO anymore. So I have put a technical user like your EP_ADMIN in both JCos and both are working in test mode.
    But the problem is then that the service runs with the technical user and not with the portal user!!!
    And yes, all our portal users are mapped to the personal number in transaction PA30.
    Thanks everybody for any help...
    Peter

  • Serious problem with database need help

    hello experts
    i am working with MS-ACCESS and connecting it with java programing
    now the problem with me are
    according to my need i have to create a table that contain Autonumber field
    but when i insert element in this table by query
    String query1 = "insert into Forum (Subject,Author,Date,Reply) values('"+param1+"','"+username+"','"+dateformat+"',"+reply+")";
    st1 = con1.createStatement(); it gives sql exception but when i remove
    autonumber field and make it simple field it works ok but i want to keep autonumber field and thn want to insert it
    is it possible to create a dynamic table in ms-access through java query like
    String query3 = "create table"+"topicId"+"( message varchar(1000) NOT NULL,author varchar(50) NOT NULL, date varchar(30) NOT NULL)";
    here topic id some variable that contain table name
    i think problem is that MS-ACCESS has no varchar data type plz help me
    The complete code i written is as follow
    <html>
    <%@ page language="java" import="java.sql.*,java.text.*"  %>
    <head>
    <title> Processing the post request </title>
    </head>
    <body background ="images/modbkgnd.jpg" bgproperties="fixed" >
    <%
       String param1="",param2="",topicId="";
       Connection con1=null;
       Statement  st1=null;
       ResultSet rs1=null;
       int a=2,reply=0;
       java.util.Date date = new java.util.Date();
       DateFormat df ;
       df = DateFormat.getDateInstance(DateFormat.FULL ,java.util.Locale.UK);
       String dateformat = df.format(date);
       String username = (String)session.getAttribute("forumlogin");
       param1=request.getParameter("Subject");
       param2 =request.getParameter("message");
    try
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       con1 = DriverManager.getConnection("jdbc:odbc:lingua");
       String query1 = "insert into Forum (Subject,Author,Date,Reply) values('"+param1+"','"+username+"','"+dateformat+"',"+reply+")";
       st1 = con1.createStatement();
       out.print("hello i am here");
       boolean posubject = st1.execute(query1);
       out.print("hello i am here");
       String query2 = "select *from Forum";
       rs1 = st1.executeQuery(query2); //retriving table id for creating
        out.print("hello i am here");  //  message table
       while(rs1.next())
           topicId = rs1.getString(1);
       String query3 = "create table"+"topicId"+"( message varchar(1000) NOT NULL,author varchar(50) NOT NULL, date varchar(30) NOT NULL)";
       boolean createtable = st1.execute(query3);
       out.print("hello i am here");
       if(createtable)
          String query4 = "insert into"+"topicId"+"values('"+param2+"','"+username+"','"+dateformat+"')";
          boolean insertmess = st1.execute(query4);
    }catch(SQLException ex){
        out.print("sql exception");
    finally
       st1.close();
       con1.close();
    %>
    </body>
    </html>

    hello experts
    first i change my Date to date and thn try but it was not working.
    and thn i try as dinesh_tcs said
    i change my query as
    String query3 = "create table"+"topicId"+"( message string NOT NULL,author string NOT NULL, date string NOT NULL)";
    but nothing help me
    one more thing actually i don,t want to insert manually the field of autonumber what i want that my query work when i leave the autonumber field to insert values in the table ( or whatever way i want to insert values in that table by keeping autonuber given by MS_ACCESS)
    plz do the change in code i have maintained above or if not possible thn write the query that u have tested

  • Problem with RGB Values for Canvas Type ‚Horizontal Toolbar' in Webforms 10

    Hello,
    I have a problem with the canvas type ‘Horizontal Toolbar’ in Webforms 10g.
    When I try to set or change the RGB value of a ‘Horizontal Toolbar’ with the forms function
    Set_Canvas_Property(‘my_horizontal_toolbar’, BACKGROUND_COLOR, rgb-value)
    (at runtime) it has no effect in Webforms 10g for the canvas type ‘Horizontal Toolbar’ (the background color of the horizontal toolbar doesn’t change).
    But it works fine for other canvas types like ‘Stacked’ or ‘Content’.
    In Oracle 6i (Client / Server) this function works quiet well (even for the ‘Horizontal Toolbar’ canvas type).
    The reason why we are using rgb values instead of visual attributes in this case is, that the color of the ‘Horizontal Toolbar’ should be customizeable (via a RGB Field) for our customers (at runtime).
    Further more we are using the same technique for Text-Field-Items, Content- and Stacked-Canvases (and all works fine).
    Maybe it has something to do with the pre-configured IAS color-schema (blaf).
    But changing the color schema (e.g.: from 'blaf' to 'red') has no effect also.
    Thanks for your help.

    This is probably bug 777312. Call Support for the latest info on this bug and for help getting it fixed.

  • Strange problem with Domain Values

    Dear All,
      I encounter one strange problem with Domain Fixed Values.
    Background:
       We have a custom domain ( ZXREF2) created for custom data element(ZXREF2) which has replaced standard dataelement in BSEG for field XREF2. This domain has 12 Fixed values. The idea was to have F4 help for field "Reference Key2" in FBL5N/FBL01 tcodes. It is working fine with these 12 Fixed value, means, on F4 we could see all these 12 values and when selecting a line from F4 the entry got thru the screen validation ( plz note hat this validation is like checking the mandatory value so this is done even before PAI).
    Problem:
      The requirement was to add a new line to F4 values( tecnically, 13th record in domain ZXREF2). We added this line to domain and moved to Quality system. Its working fine in both Dev and Qality, but the strange problem occured after moving and testing in Production.
      In production, we could see all 13 lines in F4 help. <b>BUT</b>, after selecting the new one( 13th one), and after the value appears on screen field, when Enter is pressed, it gives error message "Enter Valid value".
       This error message also comes when we enter any value which is not there in F4. That means, system is able to recognize the new value in F4, but falied to validate that.
      We thought that, this might be the problem with Buffer, and request Client to re-start the system. Even after system restart, it still gives the same error message.
    Please note that, the error message is triggered even before PAI of the screen called. So noway( I already tried system debugging) we can debug this error message to findout the rootcause.
    Any quick help would be highly appriciated.
    Thanks and Regards,
    Prasad.

    Hello Max,
      I guess DB Utility ( SE14 ) is to be run only when there is a change at structure level, to make Runtime and Database objects in sync. Here, we just added a new line to existing domain, and this added a new row to the Database table DD07T/DD07L.
      Could you please expalin it more clearly if your view is different that what I just described. 
    Prasad.

  • Problems with Audigy2 Value and CMS

    I have an Audigy2 value sound card running on windows xp with sp2. My speakers are 4. Creative 4400. I installed the drivers that came along with the card and they work fine. The trouble is that unless I turn on CMSS 3D, I get sound only from the front left and front right speakers. Only if CMSS 3D is on does the rear channel activate.
    This is very odd considering that I had a SBLi've! before this and I had no such problems with my speakers. I've tried tweaking the software but to no avail. Also tried reinstalling - but no change.
    Please help.Message Edited by shadowfall on 0-06-2005 05:59 PM

    You are a victim of the align to pixel grid option.
    Starting in CS5 if when you chose a new document profile of web, that feature gets turned on. Select All and remove uncheck "Align to pixel grid".
    Adiitonally uncheck Align New Object To Pixel Grid, so this does not come back when you draw new objects.
    Now if you are working on a web image, then that option is good to have on, but work in units of pixels, and all should be better as long as you work in whol pixel numbers.

  • I am having a problem with ICLOUD. Help!

    I am having a problem with my icloud. So here is the story. I had iphone 4. My contacts were backed. Someone stole my iphone. I got a new iphone 4s. My contacts did not sync from my previous iphone 4. so someone told me to restore to iphone 4 backup. I did. And wow! i got all my contacts back. I want all my contacts to be saved. And i don't want to lose them, it took me a while to build this list properly. With email and number and address.
    Here is what i tried so far, i backed up from itunes to computer, then backup to icloud, then I did from my phone, i turned the contact switch on also, and the swtich on to back up to icloud. When I go to icloud.com. it's not there. If anyone can help me with this issue I would appreciate it. because i have a lot of contacts, and I need to save them in a way, I won't ever lose them.

    You would need to backup into icloud again also if you have enough room to backup. If not purchase more icloud backup or backup to itunes. Sync your contacts back to your email where they will always be.

  • Problem with checkbox value and app.settings.getSetting()

    Hello everyone.
    I`ve got a problem with getting saved settings for checkbox.
    Saved settings doesn`t apply on checkbox value.
    It`s strange, but it always "true".
    So here piece of code:
    checkMe = 11;    //any value for the first time running
    if (app.settings.haveSetting("savea", "chck")) {                           
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
         alert("Yes, checkMe will = "+checkMe)       
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    var fff = win.checkPanel.chkOne.value;  // string for alert
    alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
    win.checkPanel.chkOne.value is always true.
    Can someone exmplain why and how to get rid of this static value?
    P.S. just in case, here is full code:
    function mainFun()
        this.windowRef = null;
    mainFun.prototype.run = function()
        /*----- UI -----*/
              var retval = true;
              var win = new Window("palette", "Check option", [150, 150, 460, 455]);
              this.windowRef = win;
              win.checkPanel = win.add("panel", [25, 150, 285, 265], "Checkbox");
              win.checkPanel.chkOne = win.checkPanel.add("checkbox", [10, 15, 125, 35], "Checkbox One");
              //win.checkPanel.chkTxtOne = win.checkPanel.add('edittext', [140, 15, 230, 35], '');
         win.quitBtn = win.add("button", [110,275,200,295], "Close");
    checkMe = 11;    //any value for the first time running
    if (app.settings.haveSetting("savea", "chck")) {                           
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
         alert("Yes, checkMe will = "+checkMe)       
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    var fff = win.checkPanel.chkOne.value;  // string for alert
    alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
              win.quitBtn.onClick = function() {
                  win.close();
        win.center();
              win.show();
              return retval;
    if(typeof(mainFun_unitTest) == "undefined") {
        new mainFun().run();

    Played around with different values, combinations...
    Doesn`t work too:
    checkMe = 111;    //any value for the first time running
    if (app.settings.haveSetting("333", "check")) {                           
                          checkMe = app.settings.getSetting("333", "check");
    alert(checkMe);
                    if(checkMe == 111){
                             win.checkPanel.chkOne.value= false;
                            }else{
                                if (checkMe != false){
                                win.checkPanel.chkOne.value= true;
                                }else{
                                win.checkPanel.chkOne.value= false;
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;
        var path12 = path11.toString();
        app.settings.saveSetting("333", "check", path12);
        alert("Saved value - " + app.settings.getSetting("333", "check"))

  • Problem with nokia 6151:help me!!!

    hello,
    i have a nokia 6151 and i have any problem....
    -when the mobilephone is starting is very slow and the screen si light on only for five seconds and after is light off. this phone haven't OS and i don't know because it have need more time for to start;
    -when i use phone in a call suddenly switch off...i don't know why...i buyed this phone only 5 mounths ago, and i don't use it more...
    -when i find files in the gallery,i wait many time for to show this...i haven't many files in my gallery...
    i change old software with new but the problems is the same.
    Please, can someone help me?
    tnx so much,
    Simo

    Please try using the phone without a Memory Card instered. If this solves the problem then you have got a bad memory card. I have had similar problem with a Nokia 6230i with a defective MMC card.
    Experience and persistence are second to none just ask user one.
    1610»2110»8110»5110»3310»6210»7250i»6220»6230»6230i»6233
    Love me or hate me, its still an obsession. Love me or hate me, that is the question...

Maybe you are looking for