cancel
Showing results for 
Search instead for 
Did you mean: 

How to Call VC Application(iView) by passing parameters form WebDynpro

Former Member
0 Kudos

Hi,

How to call a Visual Composer Application(iView) from WebDynpro on a Button click.

And I have to pass some parameters to VC application. I tried using

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/Project/com.sap.SomePage",

WDPortalNavigationMode.SHOW_INPLACE,

(String) null,

(String) null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String) null,

(String) null,

"param1=value1,param2=value2 "

);

Don't know how to get those parameters (param1, param2) in VC application.

Thanks,

Joe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are they on the same page?

Former Member
0 Kudos

Hi Raj,

No, those will be on different pages.

Thanks

Joe

Former Member
0 Kudos

Joe,

As far as I know, for Portal Eventing between iViews, the minimum requirement is to have both of those iviews on same page. You cant do eventing if they are different pages. Please make sure that.

/Raj Peddisetty.

sridhar_k2
Active Contributor
0 Kudos

Raj,

For Portal Eventing (WDPortalEventing raise / subscribe ) both iviews has to be in same page. Not for the portal navigation - method WDPortalNavigation.navigateAbsolute(....).

Here in this method you will be calling page / iview with parameters with pcd path.

http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/content.htm

Joe,

I Can answer your first question. You are not passing parameters correctly. To send multiple parameters we need to use '&' .

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/Project/com.sap.SomePage";,

WDPortalNavigationMode.SHOW_INPLACE,

"MyWindowFeatures",

"MyWindowName",

WDPortalNavigationHistoryMode.Allow_Duplications,

"MyTargetTitle",

"MyContextURL",

"parameter1=value&parameter2=value2");

I will let you know, how to access parameters in VC soon.

Thanks,

Sridhar

Former Member
0 Kudos

Joe,

I apologize for misunderstanding your question. I assumed you were doing Eventing. Sridhar is right, you dont need to have two iviews on the same page for Absolute Page Navigation.

You can send parameters via URL in Navigation.

/Raj Peddisetty.

Former Member
0 Kudos

Sridhar,

Yes, thats correct("parameter1=value&parameter2=value2"). Its just a typo mistake in the question.

My actual question is how can we read these parameters in VC. As WebDynpro will pass parameters as DynamicParameter.

Below is the Documentation:

"

The value of businessParameters is passed as a URL parameter called DynamicParameter.

Web Dynpro applications automatically parse this URL parameter, and make the key-value pairs available as separate URL parameters. Non-Web Dynpro applications must retrieve the DynamicParameter parameter and parse it themselves. "

http://help.sap.com/saphelp_nw04s/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm

How to parse this DynamicParameter in VC. Please Let me know whether it is possible or not.

Thanks

Joe

sridhar_k2
Active Contributor
0 Kudos

Joe,

This may be useful for you. In VC if you declare your start parameters it will automatically gets the URL Parameters.

Thanks,

Sridhar

Former Member
0 Kudos

Hi Sridhar,

Yes, using start point we can get Url Parameters but as I mentioned before WebDynPro passes parameters as DynamicParameter. We have to parse this DynamicParameter in non WebDynPro applications. How to read this DynamicParameter in Visual Composer?

Thanks

Joe

Former Member
0 Kudos

Hi Joe,

I solved it by adding the encoded parameter string

&_paramsXmlStr_=<Params><Row BANK_CTRY="US" MAX_ROW="10"></Row></Params>

to iView URL in the WDPortalNavigation.navigateAbsolute. Find the code below.

WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/myFolder/myiViews/myVCiView?&_paramsXmlStr_=<Params><Row BANK_CTRY="US" MAX_ROW="10"></Row></Params>",
WDPortalNavigationMode.SHOW_INPLACE,
(String) null,
(String) null,
WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
(String) null,
(String) null,
" "
);

I did not pass the parameters as Business parameters(WebDynpro will change these Business parameters as DynamicParameter).

Thanks

Sreekanth

Former Member
0 Kudos

Hi Sreekanth,

Thanks a lot. Your code solved my issue.

Thanks

Joe

Answers (0)