How to use EPCF eventing in Webdynpro

Hi All,
I have made a Webdynpro application as an iview in portal. Now i need to accomplish client eventing between this iview and any other portal iview. I learned from this link
http://help.sap.com/saphelp_nw04/helpdata/en/d8/6ee03fc2269615e10000000a155106/frameset.htm
that, this can be done through EPCF.
I can very well write use the EPCM objects in EP components with the help of Javascript tags.
But, I learned from my Webdynpro friends and these links
Re: Javascript in webdynpro application.
Re: Javascript
Re: how to make use of javascript functionality in WD application?
that, Webdynpro is strictly NOT the place for Javascript.
So, Where and How to use EPCF APIs in Webdynpro?
Shortly, In an Webdynpro application, where and how can i insert the following line of code.
WDPortalEventing.subscribe("urn:com.sap.tc.webdynpro.test.portal","TestEvent",wdThis.wdGetTestEventAction());
Please help me in this regard..
Vijay.K

Hi,
Check this,
/message/205009#205009 [original link is broken]
Write that subcribe in the doinit method and handle the event in the action handler
Check also this
webdyn iviews and portal eventing:WebDynpro iViews and Portal Eventing
/message/554249#554249 [original link is broken]
Communication between 2 IViews on 2 different Pages
Regards,
Vijayakhanna Raman
Message was edited by: Vijayakhanna Raman

Similar Messages

  • How to use the eventing and databag with a WAS 6.20 ?

    How to use the eventing and databag with a WAS 6.20 ?
    Is what there is a good guide for these services?
    Thank's

    In the raise event you can pass the value
    like below.
    <SCRIPT>
    function raiseEvt(value1){
    if(window.document.domain == window.location.hostname){
    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
       EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
      // alert('tree domain'+document.domain);
    </SCRIPT>
    and in the
    subscribe event you can get the values like below.
    <script language="javascript">
    if(window.document.domain == window.location.hostname){
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);
        EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
    function myreceiveEvent( eventObj ) {
          document.forms[0].gp_hidden.value = eventObj.dataObject;
    </script>
    Also look at the following link for a complete documentation.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
    Regards
    Raja

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • Sample project how to use Itext (pdf) in webdynpro

    Hi all,
    Have someone a sample how to use Itext in a webdynpro.
    Richard

    Hi Roberto and Bala,
    Sorry, I was thinking the wrong way!!
    Please can you check my source, I a'm get an error by opening the new window. the error : D:\PDFfromJava.pdf (The system cannot find the file specified)
    this my source:
        //@@begin wdDoInit()
        wdContext.currentPersonalDataElement().setFirstName("Richard");
        wdContext.currentPersonalDataElement().setLastName("Middelburg");
         Document document = new Document();
         try {
          PdfWriter.getInstance(document, new FileOutputStream("D:
    PDFfromJava.pdf"));
           document.open();
           document.add(new Paragraph("Hi, this is demo PDF file from JAVA!"));
         catch(DocumentException de) {
         //     wdComponentAPI.getMessageManager().reportException(de.getMessage(),false);
         wdContext.currentContextElement().setTest("fout1");
         }catch(IOException ioe) {
         //     wdComponentAPI.getMessageManager().reportException(ioe.getMessage(),false);
         wdContext.currentContextElement().setTest("fout2");
         File file = new File("D:
    PDFfromJava.pdf");// from iText library
         try
              IWDResource wr = WDResourceFactory.createCachedResource(getBytesFromFile(file), "PDF Report", WDWebResourceType.PDF);
              IWDWindow w = wdComponentAPI.getWindowManager().createNonModalExternalWindow(wr.getUrl(0), "PDF Report");
              w.show();
         catch (Exception e)
              wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
              wdContext.currentContextElement().setTest("fout3");
        //@@end
    //@@begin others
      public static byte[] getBytesFromFile(File file) throws IOException {
                    InputStream is = new FileInputStream(file);
                    // Get the size of the file
                    long length = file.length();
                    // You cannot create an array using a long type.
                    // It needs to be an int type.
                    // Before converting to an int type, check
                    // to ensure that file is not larger than Integer.MAX_VALUE.
                    if (length > Integer.MAX_VALUE) {
                         // File is too large
                    // Create the byte array to hold the data
                    byte[] bytes = new byte[(int)length];
                    // Read in the bytes
                    int offset = 0;
                    int numRead = 0;
                    while (offset < bytes.length
                             && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                         offset += numRead;
                    // Ensure all the bytes have been read in
                    if (offset < bytes.length) {
                         throw new IOException("Could not completely read file "+file.getName());
                    // Close the input stream and return bytes
                    is.close();
                    return bytes;
      //@@end
    Richard

  • How to use Protected event CLICK_ROW_COL  of  cl_gui_alv_grid.

    I've  worked with Double_click,Hotspot_click events of Cl_gui_alv grid class quite comfortable as they are Public.
    But i'm unable to work with click_row_col..
    Could u tell me how to use protected event click_row_col..

    Hi Ilayarajaramana 
    Did you try to build up a subclass of cl_gui_alv_grid and access the protected events via the subclass?
    You could e.g. throw an own public event every time the click_row_col event is risen.
    I know this isn't the best way, but it should work.
    Kind Regards,
    Sebastian

  • How to use two BAPIs in webdynpro Applicaiton?

    Hi All,
    I'm developing one webdynpro application which is using BAPI_FLIGHT_GETLIST for gettting list of flights and then using an other bapi BAPI_FLIGHT_GETDETAIL for getting details of particular flight which is selected from getlist bapi.
    how can use these two BAPI in single application? How to get the flight details after selecting the one row in getlist view?
    please provide me the procedure.
    Regards
    Srikanth

    hi
    First create two models Bapi_flight_getlist, Bapi_flight_getDetails.
    Add these models in your component.
    Do the model binding on Component Controller.
    Comp.Controller>apply template>servicecontroller>flightlist>choose
    Airlineid
    Maxrows
    Expand Output node.
    select Flight_List node.
    ServiceController will automatically generate the method,choose ok.
    Repeat the same for second bapi also.
    choose
    Airlineid
    Connectionid
    Flightdate
    and select Flightdata
    (you can find it by expanding output node).
    after completion of all these steps u will have Getdetilas and getlist bapi details in comp.Controller.
    To avoid overloading in selecting particular node specify different name for node.(eg:output-->output1)
    Contextmapping.
    you do the contextmapping between Comp.Controller and view by choosing appropriate details from comp.controller.
    now you will have GetDetail and GetList nodes data.
    do the view binding.
    Apply template-->select Airlineid
    Maxrows from getlist node.
    again do the
    Apply template-->select Flightdata from getdetailnode.
    onleadselect of table you call the execute methods from comp.controller generated by service Controller.
    Layouttab>table>properties-->onleadselect Event
    create action for it.
    in onleadselect<actionname>
    wdThis.wdGetFirstCompController().executeBapi_Flight_Getdetail_Input();
    wdThis.wdGetFirstCompController().executeBapi_Flight_Getlistl_Input();
    in the output Getlist table will be displayed.
    by clicking on table row,onLeadselectaction will be called.
    you will get the flightdetails.
    i hope this will solve your problem.
    Regards
    sowmya

  • How to use multiple events on one project?

    I want to make a show reel, this obviously involves using various events.
    I'm worried if I do this the whole file system will be a mess. Surely I should be sopying any files I want to use into the new showreel folder?
    How can i do this?
    Or is using various events ok?
    Hope someone ca recomend the best way forward

    You can edit from any event into the project. There is no need to copy the clips into a new event. When you're done you can archive the used clips into a new event.

  • How to use security zone in WebDynpro

    Hi.
    I want to use security zone in WebDynpro for java like PDK.
    Is it possible?
    if possible, plz explain detail how to use security zone.

    Hi,
       You can locate the <i>portalapp.xml</i> file for a WD project inside the <i>gen_wdp</i> folder. Check if you can add the <i><component-config></i> tag and others in the <i><webdynpro></i> section of the file.
    Regards,
    Satyajit.

  • How to use a event structure in a subVI

    I am trying to use an event structure inside a subVI.  The subVI has an array builder that builds arrays, and the event structure is used so that when the program is running, it allows you to change the elements of the array.  It works, but when I implement it inside a subVI, it does not work properly.  This is going into a subVI, because it will be a part of a much larger progrram, so it needs to be modular.

    If you're using an event structure, it's not a subVI.  if you're worried about modularity, you shouldn't be using the event structure.
    You seem to have a fundamental misunderstanding of modularity.  An event structure should be placed within a while loop.  If you have a while loop within a subVI, you've handed over control of your program to the subVI.  You're not modular at this point.  Your top level GUI has no control.  You'd have to create some asinine system of variables to pass data down to that loop to stop the loop and return to your main VI.  That's not a good design decision.
    Instead of looking for a way to do something broken, you should spend effort trying to understand what you actually want to accomplish.  You should also spend some time learning how event structures work.
    This application is small right now and it's already on the path to unreadable.  That's a terrible thing to do to yourself.  Break these habits now.  se variables only when absolutely necessary.  Use subVIs to accomplish individual tasks, not run the entire application.  With event structures, use a stop button value change event to not be held hostage by the timeout.  If your variable has "2" in it, you're doing something wrong.  There has to be something different between the setpoints, put that in the name.  If you want to make subVIs, create an icon.
    But first and foremost, invest time in understanding dataflow

  • How to use integration event

    Hi
    i am facing issue when using integration event to get the modified value of account type in accounts. i have made a workflow on accounts at event of "when modified record save" which is using queue of "Default Queue". I have a also made custom .Net application which is using wsdl of "integration event" . But i can't read the modified value of account type through integration event when an account modified . Can any one guide me in this regards ?

    Hi,
    I have a WSDL file and i woudl know how to process for updating an account.
    I am pragramming in php. I have donne a function to connect to my Oracme crm domaine url.
    Thanks for your help
    lansar

  • How to use FPM event in Launchpad Folder

    Hello Experts,
    We have a requirement in which we want to navigate to the Service on clicking the folder name of the launchpad. As this folder is going to have only one service inside it , it does not make any sense to go inside the folder and then access the service by clicking on the service link.
    Do you have any suggestions how we can do this.
    I was expecting that we can use the 'FPM Event ID'  of the Launchpad folder for this , but now sure how to use it.
    Please let me know how we can do this , and if  this can be done by 'FPM Event ID'  how to do that.
    Attached is image about the 'FPM Even ID' which i think i can use.
    Thanks
    Amol

    check this document on Actions configurations in Launchpad
    https://help.sap.com/erp_hcm_ias_2013_01/helpdata/en/5f/b1aa2dcdd54783b6ee557ce1abcb8e/content.htm?frameset=/en/63/61982…

  • How to use the Events which are in BOR?

    HI Experts
    In SAP Business Object Repository, under each object, we can see some events. What are these events, can we use them in our programs. For instance the business object type BUS2010-Purchase order; I can see some events for it, If I want to use these events in my custom program, can I use them?
    What is the use of it SAP R/3. If you feel my question is baseless also, please provide me the information about this once.
    Thanks in advance
    Praveen

    Hi,
    If you want to raise BOR event from your program you can use function module SWE_EVENT_CREATE.
    If you want to register for the event and handle it you can go to transaction SWEC and register your function module there.

  • How to use a event structure with a state machine

    First, I would like to inform you that I only work on LabView part time, and have much to learn.  Anything I do learn, I usually forget until I need it again, because I only work on it part time.
    Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.  
    Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
    Here is my application:  on the front panel, the user can select any combination of 7 different tests.  I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea).  The user should be able to stop the test, reselect tests to perform, and re-start the tests. 
    When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
    In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.  
    I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize.  The state machine stops and waits up to a certain number of iterations.  If it passes the test, the while loop stops and the next state starts.  If it takes too long, it exits and reports an error.  Maybe I need to just use the state machine and not an event structure?
    Is there a good example of an event structure?
    metzler CLAD
    Solved!
    Go to Solution.

    I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others?  I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test?  If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own.  Threading was the first thing to come to mind, but this may not be necessary using events.
    You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
    I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed.  mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes.  subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up.  You can modify this any way you wish to get it to do what you want.  You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
    Hope this helps.
    A
    Attachments:
    mainvi.vi ‏17 KB
    subvi.vi ‏33 KB

  • How to use an Event Structure responding to an image control that belongs to a parent VI.

    Hi
    I am loading a subpanel vi by pressing a button located in the user interface of the main vi which also contains an image display. Subpanel vi opens up on the side and doesn't hide the image display of the main vi. Subpanel vi contains an event structure that needs to respond to user clicking on the image display of main vi.
    Since the bug that occured while creating an image reference control isn't fixed, I am passing the main vi pane reference onto the subpanel vi. From that point I've tried to edit event structure and have it respond to the image control/pane that belongs to main vi but I don't know how.
    Any help would be appreciated.
    Thanks

    Post a screenshot of your subVI code where you register the events.
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

Maybe you are looking for