cancel
Showing results for 
Search instead for 
Did you mean: 

Enterprise Portal to Web Dynpro ABAP Parameter Passing

kedarT
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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