Executing window.opener.FunName from Web IC pop-up = Permission Denied

Hello,
I have modified a copy of the BuPaCreate view and controller.  When the user hits save, I open a child window to perform some validation using an external system.  I want to write the corrected values back to the form on the BuPaCreate view and then submit the form.  I created a JavaScript function within BuPaCreate to do this.  I'm running into problems when I try to execute this function from the pop-up window.   It is giving a permission denied error.  I made certain my domain and server names are the same. 
Has anyone else been able to execute a function within a Web IC view in this manner before?  Is there an alternate method for returning the corrected values.
Thank you for any help you may be able to provide.  I promise to reward all usefull answers.
Thank you,
John

<i>If I leave the method setting out completely, it defaults to POST.</i>
-->Yes if you dont use anything, then default value will be "Post". But it will give error when you mention explicitly in case of child window usage.
-->In your code instead of using "element.innerText = val;", you can use
"element.innerHTML = val;
--> You need to use the below code get the value from child to main window:
            <script language="javascript" event="onLoad()">
                   opener.document.htmlb_form_1.fieldID.value = <%= your_value %>;
                   window.self.close();
      </script>
Here is the sample code which handles the child & parent window..Have a look..
Here is the similar example. I used MVC concept:
<b>Note:</b> But instead of Model class i used APplication class. You can change ito MODEL Class where ever applicaable.
Let me know if you have any issue:
<b>Main.htm:</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2002+design2003" >
  <htmlb:page title="Add Employee Details " >
    <htmlb:form action="POST" >
      Account Number:
      <htmlb:inputField id          = "Account"
                        showHelp    = "true"
                        value       = "<%= Account %>"
                        onValueHelp = "javascript:window.open('acctpop.do?showppopup=true', '_blank', 'Account Details','width=100,height=300');" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
<b>Page attribute:</b>
account TYPE string
<b>Acctpop.htm</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
  <htmlb:page title="Test" >
    <htmlb:form id="my_window" >
      <%
  data TV_ITERATOR Type Ref To zcl_itr." - Iterator Function
  data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
  create object tv_iterator exporting appl_cons = application.
  iterator = tv_iterator.
      %>
      <htmlb:tableView id               = "pop"
                       width            = "200"
                       headerVisible    = "true"
                       design           = "alternating"
                       visibleRowCount  = "10"
                       fillUpEmptyRows  = "true"
                       selectionMode    = "SINGLESELECT"
                       selectedRowIndex = "<%= row_index %>"
                       onRowSelection   = "MyEventRowSelection"
                       showNoMatchText  = "true"
                       filter           = "server"
                       sort             = "server"
                       onHeaderClick    = "MyEventHeaderClick"
                       table            = "<%= it_account %>"
                       iterator         = "<%= iterator %>" >
      </htmlb:tableView>
      <%
  if account is not initial.
      %>
      <htmlb:inputField id      = "checked"
                        visible = "FALSE"
                        value   = "<%= lv_checked %>" />
            <script for="checked" language="javascript" even="onLoad()">
                   opener.document.htmlb_form_1.account.value = <%= account %>;
                   window.self.close();
      </script>
      <%
  endif.
      %>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
<b>Controller Class:</b>
METHOD DO_INIT.
  CREATE OBJECT APPL.
  SELECT * FROM SFLIGHT INTO TABLE APPL->ITAB.
ENDMETHOD
METHOD DO_REQUEST.
  DATA: POPVIEW TYPE REF TO IF_BSP_PAGE.
  DISPATCH_INPUT( ).
  DATA: LV_FIELD TYPE STRING.
* Get the value of Page level variables.
  LV_FIELD = REQUEST->GET_FORM_FIELD( 'showppopup' ).
  IF LV_FIELD IS NOT INITIAL .
    APPL->VIEW_NAME = 'acctpop.htm'.
  ENDIF.
  IF APPL->VIEW_NAME IS INITIAL.
    APPL->VIEW_NAME = 'main.htm'.
  ENDIF.
  POPVIEW = CREATE_VIEW( VIEW_NAME = APPL->VIEW_NAME ).
  IF APPL->VIEW_NAME = 'acctpop.htm'.
    POPVIEW->SET_ATTRIBUTE( NAME = 'it_account' VALUE = APPL->ITAB ).
    POPVIEW->SET_ATTRIBUTE( NAME = ' accout' VALUE = APPL->account ).
  ENDIF.
  CALL_VIEW( POPVIEW ).
ENDMETHOD.
METHOD DO_HANDLE_DATA.
data: FIELD TYPE IHTTPNVP.
  READ TABLE FORM_FIELDS WITH TABLE KEY
  NAME = ' Account ' INTO FIELD.
  ME-> Account = FIELD-VALUE.
ENDMETHOD.
METHOD DO_HANDLE_EVENT.
  DATA: IND TYPE I.
  DATA: TV TYPE REF TO CL_HTMLB_TABLEVIEW.
  DATA: EVENT1 TYPE REF TO CL_HTMLB_EVENT.
  EVENT1 = CL_HTMLB_MANAGER=>GET_EVENT( RUNTIME->SERVER->REQUEST ).
  TV ?= CL_HTMLB_MANAGER=>GET_DATA(
  REQUEST = RUNTIME->SERVER->REQUEST
  NAME = 'tableView'
  ID = 'pop' ).
  IF TV IS NOT INITIAL.
    DATA: TV_DATA TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
    TV_DATA = TV->DATA.
    IF TV_DATA->SELECTEDROWINDEX IS NOT INITIAL.
      DATA: ROW LIKE LINE OF APPL->ITAB.
      READ TABLE APPL->ITAB INDEX TV_DATA->SELECTEDROWINDEX INTO ROW.
      DATA VALUE TYPE STRING.
      APPL-> Account = ROW- Account.
    ENDIF.
  ENDIF.
ENDMETHOD.
Hope this will help you.
Let me know if you have any queries.
Raja T

Similar Messages

  • CS6: DistributedCOM Error id: 10016 when open pdf from web page in Win8.1

    For example here below I've got the issue: 
    http://modemwifi.it/wp-content/uploads/asus-dsl-n55u.pdf
    Adobe Acrobat X pro V 10.1.8:
    DistributedCOM Error id: 10016 when open pdf from web page.
    Nome registro: System
    Origine:       Microsoft-Windows-DistributedCOM
    Data:          04/11/2013 19:09:19
    ID evento:     10016
    Categoria attività:Nessuna
    Livello:       Errore
    Parole chiave: Classico
    Utente:        PC-PIERO\Piero
    Computer:      Pc-Piero
    Descrizione:
    Le impostazioni delle autorizzazioni impostazioni predefinite del computer non concedono l'autorizzazione di Attivazione in Locale per l'applicazione server COM con CLSID
    {B801CA65-A1FC-11D0-85AD-444553540000}
    e APPID
    {2EAF0840-690A-101B-9CA8-9240CE2738AE}
    all'utente Pc-Piero\SID Piero (S-1-5-21-3453328585-262132574-2759341577-1001) dall'indirizzo LocalHost (tramite LRPC) in esecuzione nel SID del contenitore di applicazioni Non disponibile (S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1277922394). Per modificare tale autorizzazione di sicurezza, è possibile utilizzare lo strumento amministrativo Servizi componenti.
    XML evento:
    < Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
        <EventID Qualifiers="0">10016</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2013-11-04T18:09:19.468877700Z" />
        <EventRecordID>14806</EventRecordID>
        <Correlation />
        <Execution ProcessID="768" ThreadID="776" />
        <Channel>System</Channel>
        <Computer>Pc-Piero</Computer>
        <Security UserID="S-1-5-21-3453328585-262132574-2759341577-1001" />
      </System>
      <EventData>
        <Data Name="param1">impostazioni predefinite del computer</Data>
        <Data Name="param2">Locale</Data>
        <Data Name="param3">Attivazione</Data>
        <Data Name="param4">{B801CA65-A1FC-11D0-85AD-444553540000}</Data>
        <Data Name="param5">{2EAF0840-690A-101B-9CA8-9240CE2738AE}</Data>
        <Data Name="param6">Pc-Piero</Data>
        <Data Name="param7">Piero</Data>
        <Data Name="param8">S-1-5-21-3453328585-262132574-2759341577-1001</Data>
        <Data Name="param9">LocalHost (tramite LRPC)</Data>
        <Data Name="param10">Non disponibile</Data>
        <Data Name="param11">S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1 277922394</Data>
      </EventData>
    < /Event>
    How can I solve this problem?
    Thanks

    // I got this from an Action (I�m using Struts)
    java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
    String filename=(String)request.getAttribute("filename");
    try{
      int iLength = (int)(file.length());
      response.setHeader("Content-type", "application/pdf");   
      response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"");
      response.setHeader("Expires","0");
      response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
      response.setHeader("Pragma","public");
      response.setContentLength(iLength);
      ServletOutputStream os = response.getOutputStream();
      InputStream in = null;
      in = file.getBinaryStream();
      byte buff[] = new byte[1024];
      while (true) {
          int i = in.read(buff);
          if (i<0) break;      
          os.write(buff,0,i); 
      os.flush();
      os.close();
    } catch(Exception ex){
       out.println("Error while reading file : " + ex.getMessage());
    }and now it�s running !!! I�m not using response.setContentType(...) and I do this in response.setHeader("Content-type", "application/pdf"). And I use response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"") instead of response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\"");

  • Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9alredy

    Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9 is alredy installed on computer. Is this a 64 bit ossue although I am sure I did not have this problem prior to a replacement hard drive being installed.

    What is your operating system, browser?
    What is the exact message you are getting?

  • Opening file from web site in JavaScript

    I have some JavaScript I've written (Windows PC platform with PS CS3) that opens a legal notice (jpg file) which runs from the File | Scripts menu and places the legal notice jpg on the bottom of the currently open Photoshop document. It opens and works well when the jpg file is on the local drive (c:) or network (//MachineName) but won't open if I try to open it from a web site (see example below). I'm getting "Error 12233: Expected a reference to an existing File/Folder". Is there any work around for this?
    This works...
    // Open legal notice document
    var legalDoc = open(File("C:/Droke/EpLegalNotice/EpLegalNotice_US_Black.jpg"))
    This doesn't work (and I know the file is there because I can paste the following URL into the browser and it displays the image)...
    // Open legal notice document
    var legalDoc = open(File("http://www.somesite.com/EpLegalNotice/EpLegalNotice_US_Black.jpg"))

    tobycraftse wrote:
    > Is there some site I cannot rip the swf file?
    >
    > most of the commercial site with flash, when I look into
    HTML source code,
    > they don't include link to swf file directly.
    >
    > some site include javascript like -
    AC_RunActiveContent.js
    >
    > any way to rip those flash swf files?
    >
    There must be something else in these sites, and yet, you can
    get SWF from any site,
    even the most tricky one but it require skills which
    obviously you don't have because
    if you did you would know that AC_RunActiveContent.js does
    not hide SWF files.
    It's purposes is for something totally different.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Open in new tab on right click fails to open in the current window when used in a dependent window called with window.open command from original window this worked fine until ver 4.0

    i have been using this page in all versions of firefox until ver 4.0 and it has worked fine
    https://npwas.com/dummy/charts/charts.html
    when this page is loaded enter a stock symbol in the text field "AAPL"
    then click one of the lower links --"Yahoo Headlines"-- and another window is opened with this code
    - function yahoolink(sqlstring, winnum) {
    - var myurl = "http://finance.yahoo.com/";
    - var mysymbol = document.SymbolForm.symbol.value;
    - var mysrc = myurl + sqlstring + mysymbol;
    - var mywindow = "mywindow" + winnum;
    - //alert("mywindow- " + mywindow);
    - if (sqlstring == "mb/")
    - mysrc = "http://messages.finance.yahoo.com/" + -sqlstring + mysymbol;
    window.open(mysrc,mywindow,'resizable=yes,titlebar1=1,toolbar=1,scrollbars=1');
    all this works but when i right click on a message or news item and select "OPEN IN NEW TAB" - it fails to open the tab in this current window it opens it in the parent window --
    the way i have always used this is to able to select news and right click all news items to read as new tabs and have all news items or messages to be grouped in the child window
    this is now broken or do i need to recode something??
    https:\\npwas.com come is my secure server and you may load the page and see the code
    so far i really love ver 4.0 especially the sppppppeeeeeeeeed!!!!
    keep up the great work
    thanx in advance
    tojo

    2 Solutions found in [http://support.mozilla.com/en-US/questions/791244]
    the user cor-el has a method that does not require any add-ons. He States
    This code in userChrome.css will move "Open Link in New Window" to the top of the context menu.
    <pre>@namespace url("<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"); /* only needed once */
    #contentAreaContextMenu &gt; * { -moz-box-ordinal-group: 2; }
    #context-openlink { -moz-box-ordinal-group: 1 !important; }</pre>
    the user jay_ff shows how to do it using the Menu Editor Add-on
    1. Install the Menu Editor add-on from https://addons.mozilla.org/en-US/firefox/addon/menu-editor/ .
    2. After the installation, go to Firefox> add-ons (or simply use Ctrl+Shift+A)
    3. Go to the Menu Editor "Options"
    4. In the "Main context menu," simply grab the "Open link in New Tab" and place it below the "Open Link in New Window"
    5. and Voila! You may also change other menu options if you want to!
    I tried jay_ff method first and found that indeed changing the Main Context Menu did cause the hotlink context menu to change as well.

  • Installed Pro 9 and Reader 9 now cannot open pdf from web, but can from an email?

    Installed Both Adobe Acrobat 9 professional and reader 9 yesterday on co worker machine. Went to open a pdf attachement in email no problem. Went to web to download and open a pdf and will not let her, giving co worker the error message need reader 8 or 9 to open this document!
    have unistalled 9 reader and reinstalled same problem.
    So then uninstalled reader 9 and can now open pdf from the web
    My machine has both on and no problems.
    Thank YOU for your help!!

    It may be that you will need to uninstall Reader and Repair Acrobat after the uninstall. Adobe does not recommend the installation of both products. Since you have already done the uninstall and things work fine with just Acrobat, leave things alone as that is the recommended installation.

  • CALL_FUNCTION_SEND_ERROR when executing MDX in BW from WebI

    Hi,
    we have a CALL_FUNCTION_SEND_ERROR with error code
    "CPIC-CALL: 'ThCMSEND' : cmRc=18 thRc=0#Statistics not active "
    in programm SAPLRSOB and FM BAPI_MDDATASET_GET_AXIS_DATA.
    Can this be a timeout in the connection from BOBJ to BW? Or is it another error. Any help is appreciated!
    Just for Info, on BW we are still on 3.5 - waiting for an upgrade.
    Thanks your answers!

    Hi
    I would recommend to trace the MDX statement created from WebI and check if your restrictions are indeed porpagated through the MDX statement.
    Have a look at the following SAP notes (http://service.sap.com/notes):
    Unix : Note 1235111
    Windows : Note 1260004
    Which version of BOBJ are you using? Which is the patch level of your SAP BW server?
    Regards,
    Stratos

  • Window.opener  property from child window to parent window

    Hi
    When communicating between the child (popup) window to the parent window works fine as long as we pass the static reference to the window.opener
    Example :
    Main Page
    form name = staticform
    input name = col1
    Popup Page
    javascript :
    window.opener.staticform.col1.value = some value
    How can I use a dynamic reference for the staticform.col1 in the window.opener property to post the value back to the parent window ?
    thanks for the help
    sarma

    Actually, I think tolmank's would work... I've done basically the same thing before, but more like this (if it's generic, it's a good idea to have checks for the things being in existance). This is something I used in a generic color chooser I wrote in Javascript. Had multiple fields in one form using it for selecting different foreground/background colors.
    <%
    String form = request.getParameter("form");
    String fgfield = request.getParameter("fgfield");
    String bgfield = request.getParameter("bgfield");
    %>
    vfnSet = function() {
       if(typeof(window.opener) == 'undefined' || window.opener == null) {
          return;
       if(typeof(window.opener.document.forms['<%= form %>']) == 'undefined') {
          return;
       var oForm = window.opener.document.forms['<%= form %>'];
       if(typeof(oForm.<%= fgfield %>) == 'undefined') {
          return;
       if(typeof(oForm.<%= bgfield %>) == 'undefined') {
          return;
       oForm.<%= fgfield %>.value = document.forms['colorform'].foreground.value;
       oForm.<%= bgfield %>.value = document.forms['colorform'].background.value;
    }

  • Unable to open or create file ... Permission denied

    I'm a new user of LC Designer ES.  After creating and saving a form, I made changes and now cannot save.  Error message in Log tab of Report palette says "PDF generated successfully.  Unable to open or create file [file name] Permission denied."  Any ideas why this would happen, and how to fix?
    Thanks for any help.

    If the file is already opened in another application (like Acrobat or Reader) then you wodul not be able to save it as those apps put a lock on the form.
    Paul

  • How to open files from web links in safari

    II can't figure out to get a file downloaded from a web link into numbers, pages, etc.

    Matt-
    I think the App that uses the files must have its own web access to be able to download.  Perhaps another App that has web download capability can act as an intermediary using the "Open In" option.
    One candidate might be GoodReader.  It has some web download and file transfer capability, and does have the Open In option.  However, it apparently must be able to read a file before you can get to the Open In option.
    Another approach is to use iTunes on your computer.  With the iPad connected to the computer, run iTunes and select the iPad under DEVICES.  Click on Apps at the top of the window and scroll down to File Transfer.  If an App appears there, data files can be synced to it by selecting it and dropping the files in a folder in the right hand window.
    Fred

  • Executing an OS command from web PL/SQL

    Hi,
    I'm developing a web application with the PL/SQL web toolkit. A link on one of the screens needs to be able to start a batch file on the server (Win2000). Two questions:
    - How an executable or batch file on the operating system be started from a PL/SQL procedure?
    - Once the file is running, I want the browser to go to a new window immediately with the process running in the background. The process could take up to 30 minutes so I don't want the web browser to hang there and time out. Is there some functionality in the PL/SQL web tool kit to allow the next screen to be displayed before the process has finished? (such as the 'Unzip in background' functionality in Portal, for those that have used it).
    Thanks,
    Michael
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Michael Conrick,
    Igatech Consulting.

    (1) You can write a PL/SQL proceudre that wraps a Java Runtime object. That will allow you to execute OS routines. But you have to have Java enabled in the database. That is a big topic but it's covered in several places. The AskTom web site is probably the best place to look, as it gives a good working example. I'm afraid I don't have the exact URL but it has a v.good search engine.
    (2) don't know.
    APC

  • Mac won't open pdfs from web links.

    I am running Mac OS  v 10.5.8 and it suddenly stopped displaying PDFs that are opened via web links.  All I see is a grey screen with the file title.pdf at the top, no error message.  Has anyone experienced this or aware of a fix?  Soooooo frustrating.
    Thanks!

    Alternatively, you can select any PDF file from Finder, hit Command-i, or right click on the file and select Get Info.
    From there, change Open With to Safari.
    Then hit the button Change All.
    And done.

  • Unable to open files from web on Sharepoint 2013

    I have a user who is having an issue opening any files on sharepoint site. I have checked technet for possible solutions and this is what has been done so far:
    Environment: VDI using Xendesktop with Windows 7 Enterprise, Office 2013. 
    1. Ran repair on Office 2013 professional plus (32-bit)
    2. Uninstalled and re-installed office.
    3. Cleared the cache from Skydrive/ Office document upload center.
    4. Tried to reproduce issue on another thin client with a different user logging in and accessing the same file...no issue. 
    User can download the file and upload the file with no issue just cannot open it online in webapps using IE9. 
    The OS is a 64-bit Windows 7 Enterprise and he has used IE9 32 bit and 64 bit with same issue. 
    Permissions were verified to the file as well. 

    what error user getting? did you try to different user on the same machine or same user on different machine?
    did you see any error in ULS logs?
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Installed Adobe 9 reader, now no pdf's will open automatically from web based sites.

    When I go to web based sites such as Renaissance learning I have been able to download the pdf reports and have them open right away on my desktop. It no longer happens I get an adobe window that says it can't open them and I should download them. But you can't download them.

    This is a common problem with the Mac version of the Adobe Acrobat plugin. Could you '''disable''' it here:
    Tools > Add-ons > Plugins category
    Then the PDF should load either in the stand-alone Adobe Reader or in Preview. (Not sure how to influence that.)

  • Executing windows batch commands from linux

    Hi,
    Kindly shed some light on executing the MSwindows batch commands from linux machine.
    Thanks
    RKA

    hi RKA
    What about using a virtual windows machine ? Or use a DOSemu (DOS Emulator) is a program that lets you run many of your favorite DOS applications under Linux.
    Why do you need to execute MSwindows batch commands ?
    Please explain.
    Edited by: Hub on Nov 12, 2008 1:56 PM

Maybe you are looking for

  • Remote not working on iPhone 4S

    I just got the message "Turn on Home Sharing in iTunes on your computer or on Apple TV using the account *************@****.com." The problem is home sharing is turned on on both the Apple TV and in iTunes in my computer.  Before I got this message,

  • Error when sending data from Cube to ODS

    HI, I am extracting data from 2lis_02_itm & I stored the data in 0pur_o01(ODS) tha data is fine in ODS but when I am trying to send data from ODS to Cube 0pur_c07 it is giving the above error InfoSource 80PUR_O01 is not defined in the source system E

  • Spawning Enemies to Stage in Flash AS3

    I have the enemies appearing on my stage  and spawning accordingly.  I have the location on where I want them to  spawn. The problem is that they are spawning on the first frame of my  game which is the main menu before entering the actual playing fi

  • Regarding BI Graph Installation in Forms

    Hi All, I am new to BI Graph. I have a requirement to embed BI graph in oracle forms 10 g. I am working on Forms 10g in Linux platform. Can you please mention the steps that i should do to embed the graph. I got the demos but only the windows version

  • Disabling Auto Restore with TextEdit

    I have a brand new MacBook Pro with Lion 10.7.2 on it.  I don't like the "restore windows when quitting and reopening apps" option in the General preferences, so I've unchecked that.  This works for most apps, but not TextEdit. For some reason, TextE