cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read Portal Navigation Parameter in ABAP Web Dynpro

Former Member
0 Kudos

Hi Experts,

I use portal absolute navigate and how could I get the parameter in the recevier dynpro program? Is there any example code? Many thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Experts,

I found if the parameters under name DynamicParameter, it could be get in in window handledefault method. The url looks like below.

http://svsrmd01.csvw.com:51000/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_con...

My original url was generated by UWL. Is there any way to read it? Many thanks.

Former Member
0 Kudos

if your URL is same as above. You can add a importing parameter"WI_ID" to your window inbound plug .

This will make sure that the URL parameter will be imported automatically.

Former Member
0 Kudos

Hi Baskaran,

My URL is like below.

http://svsrmd01.csvw.com:51000/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_con...

This URL is generated by sap portal universal worklist(UWL). I set the action of typical work item to lanuch a iview. The uwl lunch the iview successfully but I don't know how to read the the wi_id parameter in the corresponding dynpro program of the ivew. Do you have any suggestion? Many thanks.

Former Member
0 Kudos

in the WDA iView property Parameters to be forwarded to WebDynpro set the value *.

This will transfer the URL parameters to inbound plug of the window.

Former Member
0 Kudos

Hi Baskaran,

It works. Thanks a lot!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, Lao Mei

It's nice to find you at SCN. I'm looking for the solution for transferring parameters during iviews with OBN, it's a coincidence to find your earlier post.

I'm Zhang Jiajun@CSVW MSS project

Former Member
0 Kudos

Hello Darcy,

There could be parameters defined at window level, one could define parameters for an inbound plug of startup type.

when the window is linked to webdynpro application, portal could be sending those obligatory/optional parameters.

Regards

Anurag Chopra

Former Member
0 Kudos

Hi Darcy,

Please check this sample code.. it might helps..

DATA lr_port_manager TYPE REF TO if_wd_portal_integration.

DATA lr_componentcontroller TYPE REF TO ig_componentcontroller .

DATA l_api_componentcontroller TYPE REF TO if_wd_component.

DATA:lt_para type table of WDY_KEY_VALUE,

ls_para type WDY_KEY_VALUE.

lr_componentcontroller = wd_this->;get_componentcontroller_ctr( ).

l_api_componentcontroller = lr_componentcontroller->;wd_get_api( ).

lr_port_manager = l_api_componentcontroller->get_portal_manager( ).

target = 'ROLES://portal_content/com.test/test'.

ls_para-key = 'ZTEST'.

ls_para-value = ls_wbs-wbselement.

APPEND ls_para to lt_para.

CALL METHOD lr_port_manager->navigate_absolute

EXPORTING

navigation_target = target

  • navigation_mode = navigation_data-navigation_mode

  • window_features = navigation_data-window_features

  • window_name = navigation_data-window_name

  • history_mode = navigation_data-history_mode

  • target_title = navigation_data-target_title

  • context_url = navigation_data-context_url

post_parameters = 'X'

  • use_sap_launcher = abap_true

business_parameters = lt_para

  • launcher_parameters = launcher_parameter_list.

Also Check this..

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e4/f86f4132f15c58e10000000a1550b0/content.htm

Cheers,

Kris.

Former Member
0 Kudos

see this thread [|]

if your concern is about how to read the URL parameters.

Former Member
0 Kudos

Hi Kris,

Thanks for your reply. You aive the example code of sender but I need the code of receiver. Do you have any example code? Many thanks.

gill367
Active Contributor
0 Kudos

Hello

You can write the code in the recieving dynpro applications method.

and it will give you the parameters recieved.

write this code in the handledefault method of the web dynpro application.

data lt_params TYPE tihttpnvp.
  data ls_params type IHTTPNVP.
wdevent->get_data( EXPORTING name = '_ALL_URL_PARAMETERS'
IMPORTING value = lt_params ).
data name type string.
data val type string.
"read the table lt_params now to get the value of all the parameters
loop at lt_params into ls_params.
" name of the parameter ls_params-name.
"value of the parameter ls_params-value.
  
  endloop.

thanks

sarbjeet singh

Former Member
0 Kudos

Hi DArcy,

Check this blog...

/people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony

Cheers,

Kris.

Former Member
0 Kudos

Hi sarbjeet,

Thanks for your reply. You method works for normal url parameter. But for portal navigation, the parameter table is empty.

gill367
Active Contributor
0 Kudos

Hi sarbjeet,

>

> Thanks for your reply. You method works for normal url parameter. But for portal navigation, the parameter table is empty.

if you know the portal event's parameter name then you can get it by using the Get_String( ) method of WD_event

go to this link

http://help.sap.com/saphelp_nw70/helpdata/en/f6/7d6f4151dc5758e10000000a1550b0/frameset.htm

adn there you can see the code

method ONACTIONRECIEVE_CUSTOMER_ID .

 

  data: EVT_NAME type STRING,

        CUST_ID type SCUSTOM-ID.

 

  EVT_NAME = WDEVENT->GET_STRING( NAME = 'PORTAL_EVENT_NAME' ).

 

  if EVT_NAME = 'showCustomer'.

    CUST_ID = WDEVENT->GET_STRING( NAME = 'PORTAL_EVENT_PARAMETER' ).

    WD_COMP_CONTROLLER->SHOWCUSTOMER( CUSTOMER_ID = CUST_ID ).

  endif.

 

endmethod.

here we are geting the value of portal event parameter in the variable CUST_ID.

have you tried this

thanks

sarbjeet singh

Former Member
0 Kudos

Hi sarbjeet,

Thanks a lot for your quick reply. But I just use portal absolute navigate, not portal event.

The url looks like below:

http://svsrmd01.csvw.com:51000/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_con...

I Debug in window handledefault method, but there is no data for ALLURL_PARAMETERS.

Do you have any suggestion? Many thanks.

Edited by: Darcy Mei on May 18, 2011 4:40 AM

Former Member
0 Kudos

Hi Kris,

Thanks a lot for your reply. But I just use portal absolute navigate, not portal event.

The url looks like below:

http://svsrmd01.csvw.com:51000/irj/servlet/prt/portal/prteventname/navigate/prtroot/pcd!3aportal_con...

I Debug in window handledefault method, but there is no data for ALLURL_PARAMETERS.

Do you have any suggestion? Many thanks.

Former Member
0 Kudos

is it possible that you are talking about FPM application. Then you might have to use different approach to read URL parameters. You need to find out like which component is called by the component configuration then from that on fpm_start event you can get the URL parameters.