Handling standard iview event from web dynpro

Hi all,
I hav w a search iView which is SAP standard, when you click an element on the result list it triggers an event. The link contains the following:
javascript:{jsCode="
EPCM.storeClientData('urn:com.sap.bor:BUS1001','objid','12002');
EPCM.storeClientData('urn:com.sap.bor:BUS1001','AllKeys','objid');
EPCM.raiseEvent('urn:com.sap.bor:BUS1001','select','','a very long url');"};if(opener!=null&&self!=opener){opener.execJS(jsCode);}else{execJS(jsCode);};
On the other side I'm developing a custom WebDynpro iView whick needs to handle this event. By adding to wdInit() the line WDPortalEventing.subscribe("urn:com.sap.bor:BUS1001", "select", wdThis.wdGetGetReportsListForMaterialAction());  I was able to catch the event. But I can't get the parameters from the event.
For what i've learned browsing the forum the javascript code above stores the parameters in the "client data bag", and are not directly passed in the event.
Is there any way to retrieve these parameters from the Web Dynpro iView ?
Thanks in advance,
Diego.

Hi all,
As a workaround I made a Portal Component application which receives the event and parameters from the standard iView and lanuchs a new event setting the aprameters in the event as Web Dynpro expects them (without using the client databag). Then I inserted this Iview in the same page as the others, but hidden. It's not elegant but is working.

Similar Messages

  • Catch event from Web Dynpro for Java

    Dear guru's,
    we have a working Web Dynpro for Java. It delivers a company code that needs to be routed to a visual composer model. In the Web Dynpro we use the WDPortalEventing.fire command to trigger an event named 'ShowCompanyCode' in namespace com.sap.vc:epcm. In the visual composer, I used a 'signal in' for the same namespace and event name. However, the supplied value for the company code is not received. Both iviews (from VC and Web Dynpro) are on one page.
    I have enabled the flash debug console and did some testing with a VC model that consists of two iviews on one page. Here it does work. I have found some differences in the debug output that points in a direction.
    In the case of the VC iviews, I get the following string in the debug console: signalinAHAPP -<Params version="2" ><Row STR1="1000" /></Params>. This results in a correct transfer of company code value '1000'.
    When getting the info from the Web Dynpro iview, I get the following string:  signalinAHAO8 -1000. It seems that the web dynpro does not supply the values in a correct way. However, the same mechanism is used to supply the data to another web dynpro iview and that works fine.
    Do we have to use special coding to be able to fire the event to a VC iview? Any help will be appreciated and points will be awarded!
    Thanks,
    Arno

    A. Van de Camp,
    You can create two iViews that communicate with each other on the same page, using client-side eventing, so that the output of the first iView serves as the input to the second. Eventing in the portal is based on the use of the Enterprise Portal Client Manager (EPCM), an object defined by the portal client framework to handle functions such as client eventing.
    To define eventing between an iView created and existing in the portal(web dynpro iview), and an iView created in Visual Composer:
    1.Check the properties of the existing portal iView and find out its EPCM event name.
    2. In Storyboard, open the iView that is to be the second part of the eventing scenario and create the required port: as input or as output.
    3. Double-click the newly-created port and in the Configure Element task panel, enter the portal event name in the Signal name field and the EPCM event in the EPCM event field.
    Regards,
    Sami

  • Portal dynamic iView from Web Dynpro ABAP?

    I wish to use a "Dynamic iView" from a Web Dynpro ABAP application, but it appears the API is only available in Web Dynpro Java.  Can this feature be used from Web Dynpro ABAP, or can this be accomplished in another way?
    Scenario: I have two iViews on a page, one Web Dynpro ABAP and another iView whose source I want to change dynamically based on something a user clicks in the Web Dynpro ABAP.
    Dynamic iView:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/a72c155df77038e10000000a422035/frameset.htm

    So you are suggesting the WDA fires an event to a new WDJ that we would need to create that would in turn use the Dynamic iView service mentioned in that help document?

  • Eventing between Web Dynpro iView and regular DynPage iView

    I have seen, done eventing between two dynpage iviews and two webdynpro iviewsHowever, and gone through "How to Use the Portal Eventing for Web Dynpro iViews". However, I have been trying to have a webdynpro iview talk to a dynpage iview but they just won't communicate. Is this even possible?
    Ok basically I have a portal page in a popup window with no masthead and top level navigation. The page has two iviews -  the top one being an iView that points to a webdynpro application on Server A, and the bottom one being a dynpage iview on the Portal Server B.
    In the webdynpro iview, the code for when a button is clicked is
    public onSomeAction(Event event) {
        WDPortalEventing.fire("urn:myUrn","eventName","value");
    In the dynpage iview, the code i have for it is
    myServ = (IEpcfToolbox) PortalRuntime.getRuntimeResources().getService(IEpcfToolbox.KEY);
    myReceiver = myServ.getClientEventReceiver(request, "urn:myUrn", "eventName");
    form.addRawText(myReceiver.getWrappedScript());
    try {
        if (!myReceiver.isReceived()) {
            form.addComponent(createMainScreen());
        } else {
         form.addComponent(new TextView("event received!"));
    } catch (Exception e) {       
        form.addComponent(createErrorScreen());
    I tried all the things I could think of but the receiving iView just won't get the event fired.
    Can someone confirm that this should work? and correct me where I've done wrong.
    Please help. this is very urgent. your help will be greatly appreciated. thanks in advance
    PS. My environments are EP 6.0 SP2 and WAS 6.40 SP14

    > hi,
    >
    > portal eventing  works properly if all participants
    > are in the same domain. Otherwise portal eventing
    > g does not work. If the SAP J2EE
    > Engine on which the Web Dynpro application is
    > deployed is in another domain, you have to  map the
    > IP address of the SAP J2EE Engine to the domain name
    > of the
    > SAP J2EE Engine on which the SAP Enterprise Portal is
    > running, by editing the configuration file hosts.
    >
    > regards,
    >
    > Ganesh.N
    I am no direct access to the boxes so I can't try your suggestion. It really makes sense that eventing won't work if the iViews are on different domains. I know they are in the same domain but different subdomains.
    Anyway, good news I got eventing to work with the mentioned set. I found that that the SAP Java EPCFToolbox API had a bug that kept throwing javascript errors when I tried to have the web dynpro iview fire an event and the SAP one subcribed to it.
    I got around it but using the EPCF Javascript API instead.
    Code:
    response.write("<script>");
    response.write("EPCM.subscribeEvent('urn:dla.telework', 'createPdf', doSomething);");
    response.write("function doSomething() {");
    response.write("window.location = self.location + '&eventReceived=true';");
    response.write("}");
    response.write("</script>");
    So basically just output raw text through the response object and it just works.
    On a similar topic, since eventing can only pass string parameters back and forth, I'm still looking for a way to pass other more complex Java objects between web dynpro and sap iviews. From what I haven't they don't share the same session object (which I thought they did). So basically I can't just stick stuff in the session and pull it down on the other end. I'm clueless right now. If anybody has some tips, plesae share. Thanks

  • Calling Batch input from Web Dynpro - any alternatives for table updates?

    Hi!
    I am asked to create a screen in Web Dynpro for the GJ30 transaction (JV Cutback mapping of WBS' elements). I created a remote enabled function module which call batch input for GJ30 . Testing the Function modules direclty goes fine, but not calling the function module from WD. then I get the same error message as when I once tried to call SAP GUI from Web Dynpro ( Call transaction /submit program).
    My next step is to try to create a batch input session (instead of call transaction) and run it using rsbdcsub, and then check the result of the run. But maybe this will fail of the same reason as well, and I suppose this will make the user waiting longer for the response .
    I read somewhere that Web Dynpro does not support batch Input. But what can you do when there are no standard BAPI's for the update you want to do in SAP ?  We are not supposed to do direct table updates.  
    Anyone who have struggled with the same issues and found a solution??
    regards, Tine

    Hi,
    as BDC is calling screens and in Webdynpro ABAP you cannot use SAP GUI sceeen, you are getting short dump.
    Refer CNTL_SYSTEM_ERROR in webservices from r/3 system
    Thanks,
    Chandra

  • Calling a Report Program from Web Dynpro

    Hi all,
              I have a requirement, where i have to call a report program from web dynpro?. Wether its possible to call a report program in web dynpro?. Is we can call it, how this functionality has to be achived?

    Hello,
    Yes it is possible to call report using SUBMIT statement from one of the method defined in COMPONENTCONTROLLER's method tab.
    Once you define the method with SUBMIT statement then call that method with proper event.
    Rest configuration will remain same for ABAP webdynpro.
    Hope this helps.
    Thanks,
    Augustin.

  • Pass Parameters to an external appl when launched from web dynpro ABAP .

    I want to Pass Paramaters to an external application when launced from Web dynpro ABAP . I have successfully launched an .exe file ( Notepad / eViewHSEditor ) from Web dynpro using the logic from Standard WD_TEST_APPL_ACFEXECUTE component  But I am unable to Pass paramters to the .exe file .
    example :-  I would like to pass parameters  text1 text2 in the arugement list and I expect it opens an untitled notepad and in the file it will have parameters text1 text2 . But it is behaving in a different way . Below are the detailed steps of what I have done .
    The steps that I followed :-
    1)  Right now I have created the white list Configuration for Notepad.exe
    2) I have created 1 and 2 postions both of type string and permission Legal .
    3) The Paramter Value is * for both 1 and 2 .
    4) I activated the whitelist and it generated an .XML file
    5)
              application = 'C:
    WINDOWS
    system32
    notepad.exe'.
              argument = 'text1 text2' .
              co_element :- I am reading the element from the conrtext .
          co_element = wd_context->get_lead_selection( ).
          co_element_stru-attribute_name = 'ERROR'.
          co_element_stru-element = co_element.
          wd_this->acf_method_handler->if_wd_acfexecute~execute( application =  application
                                                                 argumentlist = argument
                                                                 errorinformation = co_element_stru ).
    when i execute  the application , it is trying to launch a notepad with file  'text1  text2.txt'  and it doesn't have one , it is asking do you want to create .  If You yes, it will open notepad with name 'text1 text2.txt' . If you Pass abcd in the arugement list , if the file with name abcd.txt exists , it opens the notepad with that file name .

    You try to open notepad from your PC with the same command, you will the same result.
    start->run->notepad "test1 test2". You get the popup saying that "test1 test2" file is not existing. You can google it to find a way to pass the text while opening notepad and try to fit that in your WebDynpro argument. I doubt if it is possible though.

  • CE 7.1 - How to call CAF services from Web Dynpro

    Hi,
    whats the suggested way to call caf services from web dynpro?
    Of course I can use the Web Service model. But can I call caf directly?
    I read something about caf web dynpro model, but I cannot find it in nwds 7.1. On some older tutorial it was in context menu of caf project, but it seems to be removed.
    best regards
    tom

    Hi ,
    The standard way is to use the web service model.
    You have to expose the the services as web service and then you can use the wsdl url in the Adaptive web service model option.
    The above option will be available when you click the Model in the webdynpro application and the click create new model.
    Hope it helps you.
    Regards,
    Srinivasan Subbiah

  • Push data/ trigger event in Web Dynpro app

    Hello All.
    I'm a newbie with web dynpro.  I have a need to “push” information to a web dynpro application.  Is there a way I can trigger an event in web dynpro to refresh the screen from another application running on the Netweaver J2EE?  Is it possible to implement an ActiveX or AJAX  application to retrieve server data and communicate with a web dynpro app running on the enterprise portal?
    Your help will be appreciated.
    Mohan

    Hi,
    You can search for portal eventing...subtscribing event and unsubscribe it etc.
    Regards,
    Kiran Chennapai

  • Initiating guided procedures  from web dynpro

    Hi All ,
             I am working on Netweaver 7.1  with guided procedures . I want to handle all process from web dynpro , i.e. i want to initiate process from web dynpro not from portal.
    Thanks in advance
    Regards
    Kavita

    Hi Kavita,
    You can Initiate the GP Process from web dynpro.
    Refer to these blogs.You have all that is required for you in these bolgs.
    The specified item was not found.
    The specified item was not found.
    Regards,
    Sumangala

  • "UnknownHost" exception while connecting to mysql from web dynpro

    Hi
    I am trying to connect to Mysql 5.0 database from web dynpro application.I am using NWDS 7.1.
    I have followed this blog and created the datasource in NWA.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8675
    I have written the following code in my web dynpro application.
    InitialContext ctx;
           try{
                ctx=new InitialContext();
                DataSource ds=(DataSource)ctx.lookup("jdbc/dbconnect");
                Connection conn=ds.getConnection();     
                wdComponentAPI.getMessageManager().reportSuccess("connected");
                Statement stmt=conn.createStatement();
                   String query="select Col from TestTable";
                   ResultSet res=stmt.executeQuery(query);
                   while(res.next())
                        String str1=res.getString(1);
                        wdComponentAPI.getMessageManager().reportSuccess(str1);
              }catch (Exception e) {
                   wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
                   // TODO: handle exception
    But I m getting the following error as "UnknownHost exception"
    I checked with the datasource created in NWA.Here in the Driver status it is showing the driver as unknown.
    I have added the following driver.
    mysql-connector-java-5.0.8-bin.jar
    Any idea on how to solve this problem?
    Do I need to add the driver in my application also.
    Thanks in advance,
    Sumangala

    Hi,
    Have you created a datasource in Visualadmin?
    Was that tested and was it success full?
    If you havent done this this could be your issue
    make sure the following code is using the correct datasource
    DataSource ds=(DataSource)ctx.lookup("jdbc/dbconnect");
    Regards
    Ayyapparaj

  • How to get the Response Code when a URL is launched from Web Dynpro

    Hello Experts,
    I have a Web Dynpro Application in which in one of its views i have an IFrame UI element in which i will show a resource stored somewhere ..
    But before showing it i want to check if the resource actually exists. For this i have to check the HTTP Response code from Web Dynpro Application without setting it in the Iframe..
    I am using the following code to get the Response Code:
    try{
    URL url = new URL("Some Url");
    HttpURLConnection.setFollowRedirects(false);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.connect();
    wdComponentAPI.getMessageManager().reportSuccess("Response code ="+connection.getResponseCode());
    }catch(Exception e){
    wdComponentAPI.getMessageManager().reportSuccess("Exception");
    Now the Problem is whatever response Code occurs 403 (for No Proper Authorization), 404 (for Resource not found) etc..
    i always get Response Code=  500 (which is for Internal Server Error) shown in the messgae i have printed.
    Please let me know the correct way of getting the Response Code from Web Dynpro.
    Also my resource is lying on a SAP Portal 6.4
    Best Regards
    Sundeep
    Edited by: Sundeep Sethi on Feb 18, 2008 9:07 AM
    Edited by: Sundeep Sethi on Feb 18, 2008 10:23 AM

    Hi,
      Check this code from /thread/5242768 [original link is broken] if it works.
    try{
    URL myurl = new URL("http://calendar.google.com");
    URLConnection connection = myurl.openConnection();
    if(connection instanceof HttpURLConnection) {
    HttpURLConnection httpConnection = (HttpURLConnection) connection;
    HttpURLConnection.setFollowRedirects(true);
    httpConnection.setRequestMethod("HEAD");
    httpConnection.connect();
    System.out.println("Response = "+httpConnection.getResponseCode());
    catch(Exception e) {
    // print exception
    Regards,
    Harini S

  • Regarding how to pass the data from web dynpro to workflow

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Check this [thread|SAP_WAPI_START_WORKFLOW;

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

  • Passing parameters to Transactions from Web dynpro Application through ITS

    Hi,
    i need to call a transaction from Web dynpro through ITS. On action from web dynpro application, i am concatenating the respective parameters mentioned below along with URL. The problem is one parameter(VARIANT) is being passed to the t-code CAT3 correctly. The next mandatory parameter(PERNR) is not passed to the respective field.Here is the URL Code:
    CONCATENATE 'http'
    '://' host ':' port
    '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'CAT3'
    '%20TCATST-VARIANT=' lv_name2 '&CATSFIELDS-PERNR=' lv_name1 INTO url.
    Called T-Code CAT3
    Passing Parameters are:
    Data Profile TCATST-VARIANT
    Pernr: CATSFIELDS-PERNR

    Pradeep,
    iam trying to pass values from webdynpro application to SAP GUI Transaction
    here is the sample code which iam using
    CONCATENATE  'http://s0164dep01.adta.uae:50000/irj/portal/interop?NavigationTarget=pcd:portal_content/Testing/trn_iw33?'
    '%20CAUFVD-AUFNR='
                 'ApplicationParameter=CAUFVD-AUFNR='
                  lv_workorder';'
              'DYNP_OKCODE=SHOW'
             INTO lv_url.
    i could'nt able to succed as its displaying page not found exception.
    Help me on this to proceed further
    Regards
    Jaipal.E

Maybe you are looking for

  • Is there an add-on to close firefox when it has been idle for some period of time? (under Ubuntu Linux 10.10)

    I have a PC set up as a kiosk for the public to use our online catalog in our library. The user clicks one of four launchers (shortcuts) on the desktop which open a firefox browser pointed to the chosen variation of our catalog. What I need is some a

  • O.T.  New Macs Won't Run Tiger

    For information : Over on another Adobe Forum I came across a thread which pointed out that the latest Mac incarnations will not boot up with the Tiger software. So, if you or your software don't like Leopard,now installed as standard, you can't go b

  • Understanding resizing for projection

    If there is any topic upon which one hears conflicting information it is this one.  It is my understanding that when an image will be viewed on a computer or projected via a digital projector, the factors which matter are:   1. pixel dimensions, and

  • Can I put .aiff files on a 4th generation Touch?

    I can get them into iTunes and they play but iTunes will not allow me to put them on the ipod.

  • My notes won't update

    Is there any way to get my notes to update? I keep my grocery list on my Mac at home, but want to read it on my iPhone. My note is on my iPhone, but it doesn't update when I change it on my home computer.