Skip to Content

Enterprise Portal to Web Dynpro ABAP Parameter Passing

Hi All,

I created a ABAP Web Dynpro Application and this is put on the Corporate Website using Web Dynpro iView in EP.The requirement is to pass the User Id from the Corporate Portal to Web Dynpro Application so that corresponding data for that user id can be fetched in the Web Dynpro Application and displayed.

Appreciate your help....

Regards,

Kedar

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 05:25 AM

    Hi Kedar,

    Please follow below steps to get the User ID

    Suppose we have to import parameter zuserid .

    1. Go to component window.there make context node (say cn_userid).and under that node, one attribute userid.

    2. Now define parameter (zuserid) in default method of component window. and associate its type accordingly .in case of zuserid it is string.

    3. And in that method (default) of window, copy the following code

    method handledefault .

    data lo_nd_cn_userid type ref to if_wd_context_node.

    data lo_el_cn_userid type ref to if_wd_context_element.

    data ls_cn_userid type wd_this->element_cn_userid.

    data lv_userid like ls_cn_userid-userid.

    • navigate from <CONTEXT> to <CN_USERID> via lead selection

    lo_nd_cn_userid = wd_context->get_child_node( name =

    wd_this->wdctx_cn_userid ).

    • get element via lead selection

    lo_el_cn_userid = lo_nd_cn_userid->get_element( ).

    • get single attribute

    lo_el_cn_userid->set_attribute(

    exporting

    name = `USERID`

    value = zuserid ).

    endmethod.

    4. Further u can bind this context to component controller context or wherever u want to use. Where ever u want to use this context ,the window controller must be defined as USED CONTROLLER.

    5. Go to application and click on application parameter tab. define zuserid there also.

    Note : Donu2019t set any default value parameter tab as it can lead to confusion.

    6. In portal , while creating iview in the application parameter set zuserid = <User.LogonUid>

    Please revert back with issues.

    I hope it helps. 😊

    Regards,

    Sumit Oberoi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 03:25 AM

    Kedar,

    this question has been asked several times.please do a search in sdn before posting the question.

    for instance find these threads

    https://forums.sdn.sap.com/click.jspa?searchID=20237985&messageID=6604967

    https://forums.sdn.sap.com/click.jspa?searchID=20237985&messageID=6570035

    Thanks

    Bala Duvvuri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.