Closing window in abap webdynpro

Dear All,
would like to inform you that i created one custom application with exit for exit iam using
Link to URL UI element where its taking me to required destination but with current window
opened.
on Exit it should close the custom application.
Help me on this
Bunch of thanks
Regards
Jaipal.E

Hi ,
Try this
DATA lv_wc TYPE REF TO IF_WD_WINDOW_CONTROLLER.
data lv_view TYPE REF TO IF_WD_VIEW_CONTROLLER.
data lo_window  type ref to if_wd_window.
lv_view = wd_this->wd_get_api( ).
  lv_wc = lv_view->GET_EMBEDDING_WINDOW_CTLR( ).
   lo_window =  lv_wc ->GET_WINDOW( ).
   lo_window->CLOSE( ).
Regards,
K. karthikeyan

Similar Messages

  • ABAP WebDynpro iView with window id problem

    We have a custom ABAP webdynpro iView that is part of a dynamic navigation.  When the iView loads the following warning message is displayed...
    An error occured while starting the iView.
    Application
    https://<server>/sap/bc/webdynpro/sap/WebDynproComponent/;sap-ext-sid=J2IlkGCm4WYvxnfaQC8bVgY0oAX5DVVY3z_8GGDYcLow
    will run with wrong client window ID!
    Do not continue; please report this problem to your system administrator.
    Once you click 'Ok' on the warning message....the webdynpro iView is displayed. 
    How do you not have the message display? 
    Thanks.

    If the user is using link from favourites of browser, Ask him to delete it and manually enter the url and Try.
    In my case, The user just deleted the saved link from Favorites and tried entering the url manually,
    though it is weird it worked.
    or else try these Notes 1450543, 1171930 .

  • How browser window can be closed in WD ABAP

    Hi,
    Please suggest how browser window can be closed in WD ABAP?
    Regards,
    Anindita

    Alternatively, just use the FPM framework - it can detect that the application is in it's own browser window when launched from the portal and enables a "close" button.
    You can also create a FPM close event which closes the application:
    data: lo_fpm type ref to if_fpm.
      lo_fpm = cl_fpm=>get_instance( ).
       lo_fpm->RAISE_EVENT_BY_ID( cl_fpm_event=>gc_event_close ). 
    As this is handled within the framework you have access to the standard eventing and checking - so ensuring application is in a fit state to exit etc.

  • Calling an ABAP WebDynpro Popup from a BSP view

    I need to know if the following is possible.
    I have a requirement to call an ABAP WebDynpro Popup from a BSP view.
    When the Popup is triggered (eg via pushbutton) the BSP will pass data to the Popup, before the Popup is closed the Popup will pass data back to the BSP to be displayed in the BSP view.
    I do not want to rely on Portal Events as Portals may not be used, would really appreciate a clean simple solution.

    Hi,
    any webdynpro application has a URL behind it. Haven´t you tried to call that URL with Javascript code ??
    script language="Javascript"
          url = "test_page.htm" + "?field=" + param;
          window.open(url, "F4window", "width=400, height=400");
    /script
    You can pass data to the WD application using parameters as I show you after the "?".

  • ABAP WebDynpro - Session remains open....

    Hi Experts,
    We have configured ABAP Webdynpro (SD Order Creation) iView in SAP Portal. When we test it from intranet, everything works fine and session in backend gets terminated when we leave that page on portal. But when we test it from internet, session remains open and not getting closed. How to terminate these onen sessions??
    SAP Portal and backend SAP ECC are on same domain....
    Helpful answer will be respected.....
    Thanks
    PRAMOD

    Hi Parmod,
    are you accessing the application in exactly the same way in the two cases?
    logging into portal from internet?
    One thing that you might need to be wary of is a lack of pop-ups. The portal uses a pop-up window when a user closes the browser to terminate the session.
    I've had plenty of problems with pop-up blockers that have prevented this pop-up from terminating the portal sessions. Sometime these pop-up blockers are configured to operate only on internet sites and not on internal intranet sites. That might be a possible cause.
    Cheers,
    Chris

  • Doubts in ABAP WebDynpro

    Hi Experts,
    I am new to ABAP WebDynpro and self-learning going through SDN stuff and other online-help. Please provide me
    your kind explanation on below doubts.
    1. When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    2. How to read the index of a particular selected row in table?
    3. How do you change position of a particulr node dynamically?
    4. Is it possible to execute a component without a window?
    5. Is it possible to run a VIEW without embeding into a window in Webdynpro application?
    6. How to read the content entered in PARAMTER and SELECT-OPTION elements in ABAP Webdynpro? Can anybody pass code how to read entries?
    I mean GET_ATTRIBUTE or GET_STATIC_ATTRIBUTES is used for reading attribute value. 
    7. Is it possible to fix the Message window position? Show at the bottom of a screen? Please provide some code for this.
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text. Please provide me example code.
    Thanks in advance for the support and useful explanation!
    Regards,
    Meera.

    Hi
    Refer the answers inline
    1) When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    GET_ATTRIBUTE
    Method to get the values of a context attribute.
    The prerequisite for this method is that the application knows the data type of the attribute.
    The value of the given attribute is copied to the export parameter. To do this the export parameter must have a data type to which a value can be written.
    GET_STATIC_ATTRIBUTES
    This method copies the static attributes to the transferred variable. If the structure is not identical, a move-correspondingis performed, which is not as efficient as a direct move, but is still useful in many cases.
    Static attributes are those that either have been declared or that belong to the structure with which the node was declared.
    2) How to read the index of a particular selected row in table?
    data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    3) How do you change position of a particulr node dynamically?
        Explain Bit deeply
    4) Is it possible to execute a component without a window?
        No it is not possible, actually the component view can be viewed by embedding it to the window
    5) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
        No it is not possible, without window you cant run the view
    6) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
      DATA LO_ND_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA LO_EL_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA LS_MAIN_NODE TYPE WD_THIS->ELEMENT_MAIN_NODE.
      DATA LV_INP_VALUE LIKE LS_MAIN_NODE-INP_VALUE.
    navigate from <CONTEXT> to <MAIN_NODE> via lead selection
      LO_ND_MAIN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'MAIN_NODE' ).
    get element via lead selection
      LO_EL_MAIN_NODE = LO_ND_MAIN_NODE->GET_ELEMENT(  ).
    get single attribute
      LO_EL_MAIN_NODE->GET_ATTRIBUTE(
        EXPORTING
          NAME =  `INPUT_VALUE`
        IMPORTING
          VALUE = LV_INP_VALUE ).
    7) Is it possible to fix the Message window position? Show at the bottom of a screen?
        Yes it is possible to show the messages by using the message area UI element in the needed position
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you      forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text.
        Im working onit and let you know after i complete.
    Regards
    Arun.P

  • How to call a RFC of a remote system from an ABAP webdynpro component

    Dear Experts,
    I am a newbie in ABAP Webdynpro.
    I am working on a requirement where I have a webdynpro component on ECC system.I need to call a RFC located on CRM system from my webdynpro component on the ECC system.
    How do I do that ?? Please help.
    Regards,
    Mamai.

    Calling RFC from some other system is same as local except the difference is that you have to give destination name while calling.
    And the regarding the method of calling it depends on your FM.
    if it is big RFC with complex structure, you can create the service call for it with destination given as RFC desitination.
    if it is simple straight forward RFC you can directly call it.
    for creating RFC service call call use this method
    1. Starting the Wizard
    To start the wizard, position the cursor on the Web Dynpro component to be edited in the object list at the left margin of the
    workbench window. Open its context menu and choose the entry Create->Service Call. The wizard is started and leads you
    through the creation process.
    Press Continue.
    2. Choice of Controller
    On the second dialog window of the wizard, you can choose whether the service call is to be embedded in an existing
    controller or whether a new controller is to be created for this purpose. Service calls can only always be embedded in
    global controllers u2013 that is, in the component controller or in additionally created custom controllers. It is not possible, to
    embed service calls in view controllers.
    a. Select radio button Use Existent Controller
    b. Do not change the default entry for component: <CC name>
    c. Enter for controller COMPONENTCONTROLLER
    d. Press Continue.
    3. Service Type and Service Selection
    a. You now select, which service type should be used for this service call. Select radio button Function Module. Fill the
    destination here. Press Continue.
    b. Select the service: for Function Module enter <RFC name>. Press Continue.
    4. The Required Methods and Context Elements
    On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes
    required by the service call as well as to the required methods. The proposed names are based on the names of the
    embedded service, but you can change them as required. However, heed the respective notes in the corresponding dialog
    box.
    a. Adapt Context: Select from Nodes/Attributes . Press Continue.
    b. Specify Method Name: leave all entries as provided: Component:  Controller: COMPONENTCONTROLLER Method: EXCUTE_ Press Continue.
    5. Completing the Choice
    When you have confirmed the last dialog box, the generation is triggered. Afterwards you now have the required methods
    and contexts at your disposal for using them within your Web Dynpro component.
    or if you want to call directly the use the call statement with destination

  • Calling different views at runtime based on my condition abap webdynpro

    Hi friends,
    Could you pls help me in this issue.
    I am new to webdynpro abap.
    I have an action on my first view.
    basically its a sales order linktoaction.  when i click it, i have to check a condition.
    if  process type = A,
    then navigate to view 2(different abap webdynpro component's view)
    elseif process type = B,
    then navigate to view 3(different abap webdynpro component's view)
    endif.
    I only have experience in calling one view for a action, so i dont have much idea on this how to acheive.
    I have this IF condition, on action event.ON that i need to call view of another application.
    thanks in advance,
    Niraja

    Hi Niraja,
    If you want to pass parameters to a WDA application you can pass them by URL link.
    Example: http://...?pass1=value1&pass2=value2 In this case you pass two parameters to the application.
    In WDA application you can control parameters in windows, you can add parameters in the plug 'Startup' which names are same as URL parameters, and then you can create notes/attributes in the context of windows then map them to the context of view. In the method of startup plug you can pass the parameters to the context of windows. You can search WDA help by WDA application parameters.
    You can check this [link |http://****************/Tutorials/WebDynproABAP/DynamicViews/Window.htm]for dynamic view navigation in a window. And no its a pdf file. It takes you to another website where they have explained it with step-by-step screenshots.
    You may also be interested in checking out this [link |http://****************/Tutorials/WebDynproABAP/views/navigation.htm]where they have explained Navigation from one View to other View along with parameters using Plugs with out using Component Controller context. It too isn't a pdf & does take you to another website.
    Hope these help.
    Regards,
    Uday

  • Abap webdynpro layout and application not displayed

    Hi Gurus ,
        We have upgraded the SAP HR system from ECC6.3 to ECC6.4 and netweaver from 7.0 to 7.1 .
        Following are the list of error in EHP4 system ,
                    1)  Layout of ABAP Webdynpro Component are not displayed .
                    2)  Any ABAP WEBDYNPRO Application is not displayed by tesing in SAP-R3 and also in ESS .
        error are as follows while trying to view layout in abap webdynpro application :
        http://dv.hr.co.in:4567/sap/bc/wdvd/painting.html?_vdrespkey=4IS29CT7NDRIOI511AFI0R1E3&_vdframe=painting&sap-client=435
          If any one have information for this kindly let me know .
    Thanks :
    Vishwas
    Edited by: vishwassap on Aug 12, 2010 7:17 AM

    Hi,
       Thanks for reply ,
       Above mention is not link ,its an error in pop up inside layout of view .
      I resolve this problem by deploying mime object by program in R/3 , so that i can able to view layout .
      But still application is not displayed it shows error like
      1) 'UCF_LoadingPlaceHolder' is undefinged by testing through R/3 and starting view is not opened .
      2) 'UCF_Image' is undefined by testing through portal but starting view is opened here .
      3) while navigating from one view to any view or window is not possible , it gives error
      4) When I navigate from one view to other .
      The following error text was processed in the system D36 : The ASSERT condition was violated.
    The error occurred on the application server RELSRMSR2_D36_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DISPATCH_NW7_EVENT of program CL_NW7_VIEW_ELEMENT_ADAPTER===CP
    Method: IF_WDR_CLIENT~GET_CLIENT_UPDATES of program CL_WDR_CLIENT_SSR_LS==========CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_WDR_RUNTIME~EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: HANDLE_REQUEST of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    Edited by: vishwassap on Aug 13, 2010 8:31 AM

  • Whether Workflow Program Exit works in ABAP WebDynpro

    Hi,
    I have the custom  workflow in which in each task i have given a program exit to update the status into my custom tables.
    Now i'm in doing the change in workflow, that it should call the abap webdynpro screen, where the user decisions has to be made.
    I'm getting the Workitem id from the UWL and then it lauches the Web Dynpro to choose either Approve, Reject or Change etc along with some other travel expense information.
    Now once i complete the web dynpro by calling the method 'SAP_WAPI_WORKITEM_COMPLETE', the particular work item is completed.
    I want to ask whether before this FM is called,whether the Program Exit which i have written in the Class method and which is called in the Workflow, whether it triggers or not?
    Regards,

    It is calling the workflow program exit before the SAP_WAPI_WORKITEM_COMPLETE function module.
    So closing the thread.

  • Error occured while showing adobe form in abap webdynpro application

    Dear SAP-Masters ,
    This is the mail regarding the error occured while showing adobe form in abap webdynpro application .
    When i run the adobe form seperately it works fine but with abap web dynpro , i'll get following error .
    Pls tell me how to resolve this problem .
    The following error text was processed in the system D35 : WebDynpro Exception:
    The error occurred on the application server DV35_D35_00 and in the work process 2 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: UPDATE_PDF of program CL_WD_ADOBE_SERVICES==========CP
    Method: CREATE_PDF of program CL_WD_ADOBE_SERVICES==========CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/LADOBE==================CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/LADOBE==================CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: CONV_VIEW_INTO_VE_ADAPTER_TREE of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    Method: SET_CONTENT_BY_WINDOW of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP

    Hi Arjun ,
                Thanx for ur reply ,
                i got following results in ST22 dump analysis :
    '  An exception occurred that was not caught ' .
            and
    Source Code Extract
    Line
    SourceCde
    79
    x_xml = get_wd_context_as_xml( data_source = data_source ).
    80
    m_pdf_object->set_data( formdata = x_xml ).
    81
    catch cx_fp_exception into lr_fpexc.
    82
    raise exception type cx_wd_general
    83
    exporting
    84
    previous = lr_fpexc.
    85
    endtry.
    86
    if fillable = abap_true.
    87
           if m_version is initial.
    88
             m_version = m_pdf_object->get_version_info( ).
    89
           endif.
    90
           if version < ''.
    91
             set_usage_rights( m_pdf_object ).
    92
           endif.
    93
    endif.
    94
    endif.
    95
    endif.
    96
    97
    only call the ads if requested
    98
    if execute_ads_call = abap_true.
    99
    try.
    100
          set document
    101
    m_pdf_object->set_document( pdfdata = pdf ).
    102
    103
          execute, call ADS
    104
    m_pdf_object->execute( ).
    105
    106
          get result
    107
    m_pdf_object->get_document( importing pdfdata = pdf ).
    108
    catch cx_fp_exception into lr_fpexc.
    >>>>>
    raise exception type cx_wd_general
    110
    exporting
    111
    previous = lr_fpexc.
    112
    endtry.
    113
    endif.
    114
    115
    endmethod. 
    and
    Error analysis
    An exception occurred which is explained in detail below.
    The exception, which is assigned to class 'CX_WD_GENERAL', was not caught and
    therefore caused a runtime error.
    The reason for the exception is:
    WebDynpro Exception:
    The occurrence of the exception is closely related to the occurrence of
    a previous exception "CX_FP_RUNTIME_SYSTEM", which was raised in the program
    "CL_FP_PDF_OBJECT==============CP",
    specifically in line 255 of the (include) program
    "CL_FP_PDF_OBJECT==============CM02Y".
    The cause of the exception was:
    ADS: com.adobe.ProcessingException: PDF is not interactive.  Data can only be
    |    imported into interactive forms.(201501).

  • How to create popup in ABAP webdynpro.

    Hi,
    I found lot of examples to create a popup/ model window for java webdynpro.
    Could anyone give a pointer to an example which explains how to create popup in ABAP webdynpro??
    Kind Regards
    Shahul

    Hi Thomas:
    It worked fine the 1st time. Second time when the user clicks on the button to open up the popup it dumps.
    Here is the code in the action for popup:
    data: l_cmp_api type ref to if_wd_Component,
            l_window_manager type ref to if_wd_window_manager,
            l_api type ref to if_wd_View_controller,
            l_text type string_table.
      l_cmp_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      if wd_this->m_popup is initial.
        wd_this->m_popup = l_window_manager->create_window(
                 window_name = 'DOCQSOW'
                 button_kind = if_wd_window=>co_buttons_ok
                 message_type = if_wd_window=>co_msg_type_none ).
               component_usage_name = 'DOCQUERY_USAGE_1'
        l_api = wd_this->wd_get_api( ).
        wd_this->m_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_ok
              button_text = 'Transfer'
              action_name = 'POPUP_CLOSED'
              action_view = l_api  ) .
        wd_this->m_popup->SET_REMOVE_ON_CLOSE( abap_true ).
       endif.
      wd_this->m_popup->open( ).
    Second time when the popup tries to open, I get the following error:
    Method: RENDER_WINDOW of program CL_WDR_WINDOW_RENDERER========CP
    Method: RENDER_WINDOW of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_POPUP_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_VIEWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_USER_INTERFACE_UPDATES of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_SSR=============CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Is there a way to destroy the instance of the m_popup?
    Any help is appreciated!
    Thanks

  • Consuming web service in ABAP webdynpro application

    Hi
    I have created a webservice to RFC scenarion in XI. I have the URl
    http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel  in this format with me.
    now i want to create an ABAP webdynpro application and call this webservice. for example the application contains some input fields and clicking on submit button will call the webservice and result is diaplyed in the same  window. How can we do this??
    thanks
    sankar

    See this
    /people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    Regards,
    Prateek

  • Steps for ABAP WebDynPro Application Creation in SE80

    Hello
    i can create ABAP WebDynPro iViews
    but i dont know how to create ABAP WebDynPro Applications in R3
    can someone help me out how to create simple ABAP WebDynPro Application in R3 from where i can create ABAP WebDynPro iViews
    useful points will be rewarded
    Regards
    JM

    Hi John,
    You can create a ABAP webdynpro application in the transaction SE80.
    Only precondition is u have authorization to develop Webdynpro Programming
    in SE80.
    Go to SE 80 --> Select webdynpro ABAP --? Create Project --> enter the name
    and text-->save it --> right click ur Project Node --> create --> View.
    Note: In Webdynpro Programmin if u want to create view or window or any new object u have to use rightclick on the project root node or corresponding node.
    Regards,
    Ramganesan K.

  • ABAP -WebDynpro - Read URL Parameter

    Hi,
    We have a Custom 'Catalog' that needs to be called from SRM using OCI (Open Catalog Interface). We are developing this custom catalog using ABAP Web Dynpro. We have following issues because of which we are unable to communicate back to Shopping cart from the Custom Catalog:
    1. Unable to read the value of 'HOOK_URL' in WebDynpro application. We need this value so that it can be used as Exit URL. How and where do we read this URL parameter in ABAP WebDynpro ?
    2. How can we return the 'HTML Form' to SRM with the values from Custom Catalog to fill the shopping cart ?
    I would appreciate your help...
    Thanks
    Meenal

    Hi Menal,
    I had the same problem.
    Did you define the HOOK_URL parameter in your webservice ? If not, do this 1st.
    2nd
    In you Webdynpro read the HOOK_URL in your handledefault method your window. Store it e.g. as attrribute in you assistance class.
    method handledefault .
    *&- Add FOF and HOOK_URL to assistanceclass attributes
      wd_assist->hook_url = hook_url.
    endmethod.
    After this you can read your HOOK_URL e.g in a view via:
    concatenate 'HOOK_URL=' wd_assist->hook_url zlv_hook_url into zlv_hook_url
    I hope your question is answered.
    What I want to now is: How to controll the HOOK_URL so that the formfields of the extenal catalog is added to the shopping card. Do you now that ?
    John

Maybe you are looking for