[Web Dynpro ABAP] - Passing a parameter between 2 windows

Hi!
I'm trying to do a web dynpro application that displays in a popup the result of a research.
Thus, I have:
          - main_view embedded to main_window
          - popup_view embedded to popup_window
In main_view, I have an input field where the user can enter a string. After clicking on the "search" button, the popup has to appear showing all matches corresponding to the user research.
In need to pass the parameter of the input field from main_view to popup_view but don't know how to do it.
Thanks for any help you can provide.
C.
Edited by: Cristina CHEN MA on May 18, 2009 1:24 PM

Thank you both for your time.
TO:  Radhika Vadher   
I tried your solution but I get an error message when using
lo_el_tresult->get_static_attributes_table
=> method unknown, protected or private
I used the wizard to get the node's attributes:
DATA : lo_nd_tresult TYPE REF TO if_wd_context_node,
           lo_el_tresult TYPE REF TO if_wd_context_element,
           ls_tresult    TYPE wd_this->element_tresult.
* navigate from <CONTEXT> to <TRESULT> via lead selection
  lo_nd_tresult = wd_context->get_child_node( name =
wd_this->wdctx_tresult ).
* get element via lead selection
  lo_el_tresult = lo_nd_tresult->get_element(  ).
* get all declared attributes
  lo_el_tresult->get_static_attributes(
    IMPORTING
      static_attributes = ls_tresult ).
But I still have an error message:
ls_tresult is not an internal table "OCCURS n" specification is missing
Thanks again for any help you can provide =)
C.

Similar Messages

  • Web Dynpro Abap - Calling URL in same window

    I've created a new ESS type application but in WD ABAP and in the application I'd like to have an Exit button on each view to the ESS overview page and also put in a link on my confirmation page to go back to the ESS overview page.
    I've found the link I need and tried a couple of methods to call it, either with an exit plug or using the method
    lo_window_manager -> Create_external_window.
    but whatever I do, although it opens up a new page to the correct URL,  it leaves the page I was working on open.  I'd like it to basically go back to the ESS overview page (using my URL), but close the window that is currently running, so that only one window is open at a time.  Does anyone know if this is possible.
    Thanks,
    Pam Laverty

    Yes, I had also found some documents on that and set it up to use an exit plug, and while now although it does not open up a new session in the portal,  when the new page comes up it still has the masthead from the original screen as well as the new one.
    Meaning you still see the portal header and all tabs on the screen from the original screen and then again on the screen just below we again have the portal header and all tabs showing the new page (from URL)  just below.
    Something is still not closing right.  We have portal 7.0.  I see there are come close_window options, but those are only good with 7.1 as far as I read.
    Are there anything special that needs to go in the exit plug method so that it simply closes the old screen and brings up the new URL?
    Thanks for your help.
    Pam

  • Opening External Window in Web Dynpro ABAP with URL disabled or Hidden

    Hi Experts, I have a requirement where-in we want to open the Web Dynpro ABAP application using tcode WDYID (by passing the application name  and startmode), but the URL of the newly opened explorer should be disabled or hidden. To achieve the same, I have created a component (lets name it PARENT) and inside that in DOMODIFY/DOINIT method have written code to invoke the required WDA (lets name it CHILD) in external window (by using lo_window_manager->CREATE_EXTERNAL_WINDOW) and is successfully able to open the application with URL disable using different parameter of method CREATE_EXTERNAL_WINDOW. But in this case there are 2 window which opens, one is for PARENT view and other is for CHILD. Now I only want to keep the second view (CHILD) to be opened and want to close the PARENT view. When I used EXIT_PLUG to close the PARENT window, it closes both the window. Need your inputs on my approach or if you have any. Regards, Harish

    Hi,
    If you open the popup, it opens as Modal Window, originating from Parent window. Without external window( where you can pass has_location = abap_false ), you cannot hide the URL/Address bar.
    If you want to partially hide the URL( if you dont want to show the full URL with application path), you can create an Alias for the service in SICF.
    Go to SICF, and create an alias for your WDA application; say original URL: domain:port/sap/bc/webdynpro/sap/<ZAPPLICATION_NAME>
    This URL you can convert( partially hide) as, domain:port/sap/<ANY_NAME>
    Refer creating Alias in this help: http://help.sap.com/saphelp_sem320bw/helpdata/en/55/361a3c9c004866e10000000a11402f/content.htm
    Hope this helps u,
    Regards,
    Kiran

  • Window Navigation In Web Dynpro ABAP

    In one of our requirements we would have to make use of the suspend plug in Web Dynpro Abap. Would anyone happen to have any other information on this topic. Is there a sample program available which demonstrates the same?
    The requirement is that, I have to call an external window (output screen) from my present screen (input screen). While this external window is active, the calling window (input screen) should be disabled. When the external window (output screen) is closed the input screen should be enabled again. I have read that suspend/resume plugs can be used for this. However, I have not been able to figure out how to use them.
    As a starting point, it would help if I can find out how navigation between two windows (not views) can be achieved.

    You can enable and disable a view at least programmatically by binding the enabled property of all elements to one context variable and setting this to false when you navigate and back to true when you come back.
    With these special plugs I haven't worked at time.
    Frank

  • Event handling for closing a browser window on portal in web dynpro abap

    Hi,
    I am new to portal as well as web dynpro. Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Thanks and regards,
    Amrutha

    Amrutha S wrote:
    Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Hi,
    I dont think that you can code to close IE browser window as you cannot access MS IE APIs in WD ABAP. I looked into closing IE browser and got http://p2p.wrox.com/general-net/16588-handling-ie-close-event.html . reading this, it seems the coding can be done in C#(asp) etc.
    also refer Closing of IE window
    I hope this is useful for you.
    Thanks,
    Chandra

  • Web Dynpro ABAP : Parameter ,start plug and WDDOINIT

    Hi,
    I'm currently developing a web dynpro abap application which receieves parameters(Work item id).
    I can read the content of paramaters in the method start plug of the window and I can store them in the context.
    What I want to do is, in the method WDDOINIT of my main view, I want to read the parameter Work item id
    The problem is that the WDDOINIT  is called after the start plug, So the context is still empty.
    I have tried to read the context in the WDDOMODIFY view. There the context is correctly filled but apparently, we can not navigate to another view from the WDDOMODIFY .
    Is this normal?
    Thanks for your answer

    I did find a solution and I wanted to share and validate it.
    - I created a event in the COMPONENTCONTROLLER "event_chk_url_params".
    - In the view where I use these url parameters, I created a method (event handler) for the above event that checks for the url parameters and fires plugs based on the value of the url parameters.
    - From the window's handle default method, where I get all the url parameters, I raise the event in the component controller ... which inturn calls the event handler in the view, which in turn redirects.
    Is this the right solution or is there something better then this?

  • 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.

  • Difference between ITS and web dynpro abap

    Hi Experts.
    Can any explain me what is the main difference between  EWT/ ITS and web dynpro abap. Basically i am going to developed some existing EWT in webdynpro ABAP , so i want to know what are the advantage of WD ABAP over ITS .
    Thanks in Advance.
    Satya

    Closing thread, thanks for your help.
    Thanks,
    Satya

  • Difference between web dynpro java and web dynpro abap

    Hi this is watson maureen,
                 I wnat to know what is  the difference between web dynpro java and web dynpro abap?
    thank
    maureen

    Hi watson,
    Go through these links, you will get the difference between web dynpro java and web dynpro abap
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0e4940c-035c-2b10-0b9d-eb8f99674f4e
    Web Dynpro: ABAP or Java?
    Regards
    Sreedhar.

  • Difference between pdfsource & datasource in adobe forms - web dynpro abap

    Friends,
    Please let me know the difference between the adobe form attributes pdfsource and datasource, when used in Web Dynpro ABAP. What is the significance of specifying both and the difference between them.
    Points will be rewarded for helpful answers.
    Thanks.

    Hi,
    Pdfsource is a attribute defined to read the form. Suppose in an Application you need to read values from fields on the pdf form. In that case you give an attribute as a pdfsource which will contain all the data in XML format. You can read these values and assign to different data node. normally its helpful in reading offline forms.
    Datasource is a node containing one or many attributes which stores data at runtime. The fields on the interactive forms are bound to these attributes. When you give a context node as data source to the interactive form then it appears in the designer on the left handside in the data view. From there you can bind the fields on the form to the attributes in the context node.
    The difference between both is that a pdfsource is used to read the complete form in XML format with all the fields on it while the data source is used to transfer data from context to the fields on the form. Note that the datasource contains a node with multiple or single attribute and a field on the form can be bound to a single attribute.
    I hope it clears all your doubts.
    Regards,
    Vaibhav Tiwari.

  • Difference between Web Dynpro Abap and Web Dynpro Java

    Hi,
    What is the difference between Web Dynpro Abap and Web Dynpro Java.
    Thanks,
    Suresh

    hi suresh......
          from the end point of view, the customer wont know whether the application is done by java or abap. only the programming language differs and nothing much more.
    ---regards,
       alex b justin

  • Sequencing Problem in Web Dynpro ABAP

    Hi Web Dynpro (ABAP) Guru's,
    Can anyone tell me how to read a parameter from the WDA url in my view? The situation is like this: My WDA is being rendered in the Portal EP 6.0 as an iView. When my WDA is called the portal also appends in the URL the plant number. I want to grab that plant number and use it in my view to show some default data.
    As per other weblogs/forum posts I defined a parameter "PLANT_NO" in the "Default" startup plug of my Main window. I'm using the Get_Data method to read this parameter in the plug. I'm able to read the URL parameter here and so far it is good. Read below for the problem..
    If I understand the order of operations correctly, doesn't the views get created, then the default plug code is run, then the views are placed on the window and then shown to the user. Since my views are created before my default plug is run I DO NOT get the URL parameter value in the WDDOINIT of my view. When I debug the application, the WDDOINIT of the embedded view gets called before the Default startup plug. Am I missing something here?
    If someone can tell how to read the URL parameter in the WDDOINIT (instead of Default Startup) of the view I could default in the data I want to display. OR any other suggestions to get past this problem would be appreciated.
    Does this make any sense and does anybody have an idea of where I could find some info about how to do this?
    Thanks much for your help. Points will be awarded.

    Thanks Klaus for the response.
    I don't want to read the parameter from the default plug, but need to access the URL parameter and display default data in my view. Let me explain the scenario:
    My Web dynpro application is called from the Portal. The Plant number is passed in the URL as:
    http://...../sap/bc/../../<Web Dynpro Application name>?PLANT_NO=0012
    I want to show Material Stock values in the view for Plant "0012". To access this value I've defined a parameter with same name (PLANT_NO) in the default startup plug of my main window. I get access to the URL parameter through this plug parameter.
    I have only ONE view embedded in this window where the Stock values are selected from table MARD for the specified plant. I want to get the plant value from URL in my WDDOINIT method to make this selection from database. I'm then binding the results to the view table UI element. My problem is that the URL parameter is read in the Default plug, but the data selection and view binding happens before in the WDDOINIT method where I don't know the plant.
    Again, I don't want to read the plug parameter, but I want to get the URL parameter (PLANT_NO) and then render the view based on the data selected for this parameter. Please let me know how this can be achieved by reading the URL parameter in WDDOINIT method (Constructor) so that it can be used subsequently in the application.
    Thanks for your help and looking for a resolution.....

  • Web Dynpro ABAP Stylesheet - Portal Integration

    We have a Web Dynpro ABAP being displayed through a Portal iView.  The Portal server and the Web Dynpro ABAP server are separate.  Our problem is in getting the Web Dynpro ABAP to use the stylesheet of the Portal.
    We can make this work by forcing an external stylesheet (via application parameters, global Dynpro settings, or passed on the end of the URL), but we have to hard-code the full URI of the Portal stylesheet.  This would be very hard to manage if we hard-code every iView's CSS location (or set every individual Web Dynpro's application parameters), and we want instead for the Portal to supply whatever the user's stylesheet is dynamically. 
    So what we want is: if we change the Portal stylesheet, the Portal would just pass the new stylesheet URI to our ABAP Web Dynpro iViews without manual modification of the iViews.
    Here is an example of what works:
    http://our-abap-server.com/sap/bc/webdynpro/sap/cprojects?sap-ep-themeroot=https://our-portal-server.com/irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/ourportalstylesheetname
    Shouldn't the Portal iView automatically pass sap-cssurl or sap-ep-themeroot to Web Dynpro ABAP?  We have "Supply Portal Stylesheet" checked on the iView… it just doesn't pass anything to the Web Dynpro ABAP.  Why wouldn't SAP pass this parameter dynamically to the Web Dynpro ABAPs?  Is this a product error? 
    There seems to be a great deal of confusion about this on the SDN message forums... I think this may be the core issue.
    We are using a 7.0 SP13 Portal with an ECC 6.0 SP12 backend.

    Now that you mention it, I ran into that exact same issue  -- the application parameters didn't work for hard-coding the theme.  The fix ended up being the web server semicolon thing I mentioned earlier (that was why the parameter didn't make it to the backend). 
    The themeroot is automatically sent to the backend from the portal, so you shouldn't really have to manually send it as a parameter anyways.
    I'd suggest talking to your network guys.  Also this could be the result of the SP you are on (we're on 13 for the portal and the backend system -- maybe this feature doesn't work in some earlier SP's?).  There are also some options to force the theme as a WD application parameter on the backend side, which you could check into.  Details on those are here:
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb57412df8091de10000000a155106/frameset.htm]
    Also you could look at the requests being made by installing HttpAnalyzer in your browser.  You can inspect "post" parameters going from the portal to the backend system.  One of those posts (the first one to the backend system) should contain the parameter sap-cssurl (same kind of thing as sp-ep-themeroot).  This is where our problem turned up as this parameter was not being posted.
    Lastly, make sure that your frontend portal and backend portal are in the same domain.  For instance:
    frontend.domain.com
    backend.domain.com
    If your backend and frontend are in different domains it messes all kinds of things up, including stylesheets I think.  If you can't get around this, then read about domain relaxing (but I highly recommend getting the domains the same).
    When we started, ours were:
    portal.dx.company.com
    sap.company.com
    This created all kinds of problems.  Putting our systems in the same domain with the same protocol and fixing our little semicolon web server problem fixed basically all of our portal complaints.  Up until that time, we had also had many problems with session management (backend sessions were getting stuck until the HTTP timeout).
    That's all I know.   Good luck.

  • Problem in calling abap editor with the program name in Web Dynpro ABAP

    Hi,
    I have to caal ABAP Editor screen with the display of program after clicking a button from web dynpro abap application.
    I am able to call the ABAP Editor initial screen, but i want the editor display screen with a program.
    How to do that?
    Please find my code below:
      DATA : FINAL_URL TYPE STRING,
             URL TYPE STRING.
      DATA: LV_HOST TYPE STRING,
            LV_PORT TYPE STRING.
    DATA V_TCODE TYPE TCODE.
      DATA:  LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
      DATA:  LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA:  LO_WINDOW         TYPE REF TO IF_WD_WINDOW.
      DATA:  LD_URL TYPE STRING.
    V_TCODE = 'SE38'.
    *Call below method to get host and port
      CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
         IMPORTING
           HOST = LV_HOST
           PORT = LV_PORT ).
      CONCATENATE 'http'
      '://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?sap-client=&transaction=' V_TCODE '&OKCODE=SHOW'
      INTO URL.
      LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
      LD_URL = URL.
      CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
        EXPORTING
          URL    = LD_URL
        RECEIVING
          WINDOW = LO_WINDOW.
      LO_WINDOW->OPEN( ).
    Now, how to pass my Zprogram name into the URL.
    I need to get the editor screen with the display of the program.
    Thanks,
    Radhika

    Hi Kiran,
    Please find my code below:
    DATA :   URL TYPE STRING.
      DATA: LV_HOST TYPE STRING,
            LV_PORT TYPE STRING.
      DATA:  LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
      DATA:  LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA:  LO_WINDOW         TYPE REF TO IF_WD_WINDOW.
      DATA:  LD_URL TYPE STRING.
    *Call below method to get host and port
      CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
         IMPORTING
           HOST = LV_HOST
           PORT = LV_PORT ).
      CONCATENATE 'http'
    '://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?&transaction=se38&RS38M-PROGRAMM=Y2PSOLTREE&~okcode=shop'
      INTO URL.
      LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
      LD_URL = URL.
      CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
        EXPORTING
          URL    = LD_URL
        RECEIVING
          WINDOW = LO_WINDOW.
      LO_WINDOW->OPEN( ).
    Here,, Y2PSOLTREE is the program, that should show in SE38 screen.
    I used the above code, but still it is showing the SE38 initial screen.
    Thanks,
    Radhika

  • Web Dynpro ABAP - Using Formatted TextView

    Hi,
    I created a  Web Dynpro ABAP application.  I need to display user information (i.e. address, phone # etc) on the home page after user logs in to the portal.  I created some Formatted TextView elements in the view and trying to change their text during the runtime.  Can someone please let me know how to change the text of the field in runtime.  If some one can provide pseudo code with sysntax, it would be great help.  Sorry, if it is a very basic question.
    Thanks.

    Hi Shan,
    There is nothing special about how you can work with the text of FormattedTextView UI element. You just need to bind the "Text" property of this element to a context attribute of type STRING. So whatever value you maintain within this attribute would get displayed in your FormattedTextView. So in order to dynamically change the text you would just have to do a SET_ATTRIBUTE on this context attribute. If you want to know as to how you can do it via the methods of FormattedTextView class then you have a method by name SET_TEXT in the class CL_WD_FORMATTED_TEXT_VIEW. You can call this method using the reference of the FormattedTextView on your view & pass the desired text as input to the parameter "VALUE". However keep it in mind that you are better off binding the "Text" property to a context attribute & changing the attributes data rather than directly using the SET_TEXT method to change the data.
    For any example over FormattedTextView you can check the standard component: WDR_TEST_MISC.
    Regards,
    Uday

Maybe you are looking for

  • Switching back to Homepage

    New to BT Broadband.  How do I get back to Yahoo Homepage from a website?  At present it is taking me back to my desktop each time. Thanks in anticipation of the answer.

  • PowerPc G4 Extended Desktop

    Hi there, I was wondering if someone could help me? I have a 533 MHz PowerPc G4 and have just attached 2 monitors... hoping for an extended desktop. 1 of the monitors connects to the VGA port direct and I also purchased a ADC to VGA Adapter to connec

  • How to put mail body while sending Payment Advice Note by mail

    Hi, I am sending payment advice form through mail using the BTE 2040. Everything is fine and mail is coming properly but mail does not have any body line. It just contains the PDF as an attachment. I want to put mail body in that. I have just copied

  • Schedule Agreement filed- lphis

    Hi In the customizing for the document type for the scheduling agreement there is check box for Release documentation, which says that if it is activated then forecast schedule will be saved in a seperate file and displayed anytime. This tick was act

  • Regular expression in biztalk schema

    Hi Experts, Can any one give me the expression for validating the below expression in Biztalk schema. YYYYMMDD HHMM Needed urgently please.Thanks in Advance