Skip to Content
Dec 07, 2008 at 11:04 AM

SAP BI7 POST command to iFrame possible?


Hi All,

I created an iFrame inside a page. The idea is to send POST commands to iFrame page using standard SAP JavaScript commands (like sending filter values, hide/unhide items etc.). Below is the approach I use but it doesnt work. I hope somebody can point out a way to make this work or give suggestions on another approach.

SAP BI has a JavaScript global object derived from sapbi_PageClass called sapbi_page and this is the global object to use for adding and sending commands.

In order to initialize a new object from sapbi_PageClass class that refers to the iFrame, I use the following constructor function which i found in the sapbi_070_pageclass.js. The constructor accept a window object as parameter.

var zsapbi_cmtpage = new sapbi_PageClass( window.frames["commentFrame"].window );

I use the following command to add a new command sequence. The example below is to hide document item. Note that the function zbicmd_changeVisible() is a customized function. This is already proven to work elsewhere.

var zcmdSeq = new sapbi_CommandSequence(); zcmdSeq.addCommand(zbicmd_changeVisible("SINGLE_DOCUMENT_ITEM","SINGLE_DOCUMENT_ITEM_1",0));

I found this method in sapbi_070_pageclass.js to send command over to other frames.


The above script doesnt work as the method formSendParameterList2TargetFrame() failed on line 85 of sapbi_050_commandform.js - this.m_pFormElement.appendChild( paramField );

Any Ideas??

Thanks & Regards,