Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Reading application parameter from portal

In this blog we will learn how to read the application parameter from the portal. Let us see how to read a parameter from the URL in an already created component.

Let’s see how to read the user who is logging into the portal and triggering the link for our application.

Pre-requisites: The portal must be configured in a way to pass the parameter.

Step 1:
Go to the window of the component and select the method handle default. This is the first method which is triggered when a component load, even before the DOINIT method.


Step 2:
In Handle default method create a importing parameter to get the value from the portal the importing parameter must be created in a same name that the portal passes the parameter.


Step 3:
Go to the application. In parameters tab add the variable declared in Handle default method using F4 help.


Step 4:
Whatever the value that comes in the portal will be captured by the parameter we declared. It can be used only within the windows, to use that variable in our view we have to move it to the controller.
To move it to the controller, create a variable in the component controller as shown below.


Step 5:
Now move the application parameter to the variable declared in the component controller.
Wd_component_controller is the object referring to the component controller.
Using that object access the attribute of the component controller and assign the importing parameter of the handle default method to it. Now value is passed from window to the controller.


Step 6:
Now we have to set the value in some variable so that the value can be used across any no’s of views.
Create a node in the component controller with an attribute to hold the value.


Step 7:
Handle default method is executed after the method wddoinit. Hence we can make use of method wddomodifyview to set the value to the context node.



method wddomodifyview .

data : lv_user type uname.
data lo_nd_uname type ref to if_wd_context_node.
data lo_el_uname type ref to if_wd_context_element.
data ls_uname type wd_this->element_uname.

* Move the value from component controller attribute to the variable.
= wd_comp_controller->lv_user.
* set the value to the context node.
* navigate from to via lead selection
= wd_context->get_child_node( name = wd_this->wdctx_uname ).
* get element via lead selection
= lo_nd_uname->get_element( ).
* set single attribute
value = lv_user ).

endmethod.                    "WDDOMODIFYVIEW

Now Parameter has been set in the context node and can be accessed in any number of views.

About Arun


  1. We can also read the application parameter using the class

    wdr_task=>client_window->get_parameter( 'i_parameter' ).

    1. Please, explain how to read application parameters from WDDOINIT method of component controller.

      in 1st step, you told that handledefault method triggers first but in 7th step you told differently.

      please clarify brother!.

    2. i learnt webdynpro from your website........thank you very much brother!

  2. They ought to be simple in correspondence and you can contact by messages, live visits, moment errand people and by global calling framework. Outsourcing organizations give every one of these offices to their designers.
    convert website to app

  3. Nice to read your article! I am looking forward to sharing your adventures and experiences. desawar satta

  4. Hi, I find reading this article a joy. It is extremely helpful and interesting and very much looking forward to reading more of your work.. buy weed online usa

  5. This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. nationwide thc vape shipping

  6. When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. thc oil cartridges shipped anywhere

  7. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. birrificio artigianale

  8. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. https://www.sergiofabbri.com/scarpe-converse-originali

  9. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! situs slot online

  10. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. شحن من كندا الى مصر

  11. Really a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene. bahis siteleri listesi

  12. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. bahis siteleri listesi

  13. Business owners who are starting their online business do not like to make mistakes. They do not like the feeling that they are shooting blind in the dark. Creating web design is like solving a big puzzle. Internet and Website Marketing Company


Powered by Blogger.