URL Iview - Dynamic properties.
Hi all,
I am using iview "Url iview" and I would pass some specific parameters.
Example: What is the page that directed to her, who was logged, and another dynamics parameters
And the result is -> http://sapportal/Log/index.asp?User=xxxx?PageID=com.company.xxxxxxx
Could someone help me?
Thanks
Ricardo
Please read up about the application integrator. This allows the building on dynamic URLs based on things like the user's id etc.
For example: http://help.sap.com/saphelp_nw04/helpdata/EN/36/5e3842134bad04e10000000a1550b0/frameset.htm
Similar Messages
-
Dynamic Parameters in URL-IView
Hai,
I am using the ESS-framework and I want to create a link which calls an URL with dynamic parameters.
I have already created an URL-Iview with the example url:
http://a.nl:51800/webdynpro/dispatcher/sap.com/pcui_gp~isr/IsrForm
And I also defined a resource and a service in the backend (Customizing)
My question is:
How can I dynamically generate the Parameters SCENARIO and MODE in the url using the URL input field in the defined resource?Hi Remco,
If you create several resources for the same webdynpro (isrform) you can pass params via the resource definition (URL params).
Your webdynpro application can be defined as:
- Webdynpro application (in the xss homepage framework) as a resource;
- URL resource linking to a portal page/iview (with params): url iview with params
- URL resource linking to a portal page/iview (with params): webdynpro iview with params
But before you are going to tweak with it, please try to find out if your url will work:
http://a.nl:51800/webdynpro/dispatcher/sap.com/pcui_gp~isr/IsrForm?scenaro=SPEG&mode=CREATE.
If this works, then create an iview in the portal of the url type or webdynpro type. Does it still work with static params? If so, remove the static params from your iview properties.
Now try the following link:
http://yourportal:port/irj/portal?NavigationTarget=pcd_path_to_your_iview
If this works, check out the following link:
http://yourportal:port/irj/portal?NavigationTarget=pcd_path_to_your_iview&DynamicParameter=MODE%3DCREATE%26SCENARIO%3DSPEG
Everything after DynamicParameter must be encoded. To find out what the encoding is, just use google and search for your characher. As an example (let's find the = sign):
http://www.google.nl/search?hl=nl&q=%3D&meta=
%3D is the = sign
Last step:
Create a resource as described on top of this post.
This will be my approach to get this working
Good luck! -
How to set dynamic host name in the URL of a URL iView?
Hello,
I am using a standard URL iView that points to some J2EE app I've written and deployed on the same server.
I would like to set the host name to be a dynamic one, this way I won't need to change the iView URL when transporting it from one portal to another. As far as I know the system for a URL iView only controls authorizations but cannot replace the full URL set in the iView.
Any idea who can this be achieved?
RoyHi Mrityunjay,
forced URL at runtime will require me to call the URL iView from another iView that I will need to code (setting the URL in the Request object). If I did all this I might as well call it from this iView already.
I would like to do it with no further developments. I would have thought that SAP has constants that can be plugged in the URL for this type of thing, i.e. $hostname...
Rgds,
Roy
Edited by: Roy Cohen on Aug 21, 2008 4:03 PM -
How to open URL IView with dynamic url parameter (navigate_absolute)
Hi Experts,
i would like to open an URL-IView from the WebDynpro ABAP Application in the Enterprise Portal 7.0
and i want to set the URL parameter dynamically. Is this possible and how can i achieve this!!
Thx MarkusHi Markus,
You can take help of the following code snippet.
Here we are calling an Iview using absolute navigation and passing URL parameters as well
* Select the input value entered and then pass it to REM INQ application---------
DATA lv_inputbusobjid TYPE wd_this->Element_context-inputbusobjid.
DATA lv_path TYPE string.
DATA lv_tab_wd_param TYPE wdy_key_value_list.
DATA lv_str_wd_param TYPE wdy_key_value.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA api_component TYPE REF TO if_wd_component.
DATA window_manager TYPE REF TO if_wd_window_manager.
DATA window TYPE REF TO if_wd_window.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
* read the imput data first-------------
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `INPUTBUSOBJID`
IMPORTING
value = lv_inputbusobjid ).
** call remuneration inquiry window using absolute navigation
CLEAR lv_tab_wd_param.
* Adding parameters
lv_str_wd_param-key = 'sap-wd-configId'.
lv_str_wd_param-value = 'CACS_REMINQ_CONF'.
APPEND lv_str_wd_param TO lv_tab_wd_param.
lv_str_wd_param-key = 'BUSOBJ_ID'.
lv_str_wd_param-value = lv_inputbusobjid.
APPEND lv_str_wd_param TO lv_tab_wd_param.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
if lo_portal_manager is BOUND.
* PCD
lv_path = 'ROLES://portal_content/com.sap.pct/specialist/com.sap.pct.erp.common.workset_reuse/com.sap.pct.erp.icmparticip.bp_folder/com.sap.pct.erp.icmparticip.15.bp_folder/com.sap.pct.erp.icmparticip.15.pages/com.sap.pct.erp.icmparticip.RemInquiry'.
lo_portal_manager->navigate_absolute(
navigation_target = lv_path
navigation_mode = if_wd_portal_integration=>co_show_external
window_features = 'toolbar=no,resizable=yes,scrollbars=yes'
business_parameters = lv_tab_wd_param
endif.
Hope this helps
Regards
Manas Dua -
I need to be able to create an URL iView where by the domain and port must be dynamically set in the URL. Is there an easy way to accomplish this using EP70?
Hello Chris,
The error is:
RuntimeException during appliction Java mapping com/sap/xi/tf/_mm_paymentClusterCreate_ Thrown: com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-field mapping /ns0:mt_newPaymentClusterData/merchant_name; root message: Exception:[java.lang.IllegalArgumentException: Value is too long (471/200):
It's even in the SAP Help:
http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce299c3a8e5430e10000000a42189b/frameset.htm
The length of the attribute value is defined by the XI message protocol. Values can be a maximum of 200 characters long. If, for example, you assign longer values in the mapping or adapter modules then this can lead to processing errors at runtime or the values are shortened to 200 characters. This shortening can also lead to a processing error. The processing error that occurs depends on the components that access the attributes. -
Hi
We need to show language specific content to the user logged in. We have different URL for each language.
We are using URL iviews in portal.
If a Arabic user logs into portal I want him to see the Arabic page by default. If a English user logs on I want him to see the English page by default.
I wanted to know whether it is possible to change the URL dynamically depending on the user profile.
Rgds
NagaKishore VHi
My req is
We are using url iviews for in portal. We have web pages for different languages. Req. is when a user with Arabic as language preference logs in he should see the web pages in Arabic. If the user preference is Japanese he should see Japanese pages. We dont want to maintain mulitiple iviews for each language. The webpage urls are in this format
For englisj ;-- www.xxx.com/yyy/en
for japanese - www.xxx.com/yyy/jp
for arabic - www.xxx.com/yyy/ar
Since only the last 2 characters are differeent and rest of the url is same, Is there is a way where we can create 1 iview and depending on the user preference he is navigated to that page.
Regards
NagaKishore V -
Pass parameters dynamically to url iview from web dynpro abap
Hi,
I am trying to pass 3 key-value pairs via absolute navigation to a URL iview.
The url expected is : http://www.sap.com?field1=value1&field2=value2&field3=value3
For this, I have done the following:
1) Created a url iview with the 3 parameters in get.
2) Used the pcd location of the url iview and referred it in the navigate_absolute method.
Following is the call:
CALL METHOD lr_port_manager->navigate_absolute
EXPORTING
navigation_target = wa_navigation-target
navigation_mode = wa_navigation-mode
use_sap_launcher = abap_false
business_parameters = l_bus_parameter_tab.
The l_bus_parameter_tab has the key-value pairs populated and I can see them populated.
However, when the url is being called the parameters are not getting passed. Am I missing anything to be passed?
Thanks.Hi Kumar,
I have followed your reccomendation and updated the code and iview properties.
The code now looks like:
l_parameter-key = 'userid'.
l_parameter-value = sy-uname.
INSERT l_parameter INTO TABLE l_bus_parameter_tab.
l_parameter-key = 'portal'.
l_parameter-value = 'test'.
INSERT l_parameter INTO TABLE l_bus_parameter_tab.
l_parameter-key = 'mode'.
l_parameter-value = 'I'.
INSERT l_parameter INTO TABLE l_bus_parameter_tab.
*End of business parameters population
CALL METHOD lr_port_manager->navigate_absolute
EXPORTING
navigation_target = wa_navigation-target
navigation_mode = wa_navigation-mode
use_sap_launcher = abap_true
business_parameters = l_bus_parameter_tab.
launcher_parameters = l_bus_parameter_tab.
However, when the method is called, it does nothing and the url does not get called.
When I manually add parameters to the url iview and preview it, it does the job.
For some reason, these parameters are not getting passed to the url iview or page.
Is there a limitation that parameters cant be passed to url iviews? -
Dynamically change URL iView link
Hi,
I have a requirement like this:
Button1 would open an external link from Portqal
Button2 would open a KM document from KM
Button3 would open a KM folder
In future the link type of these button can change.
These external link, KM document location and KM folder location are read from a properties file and are subject to change.
Here is my Approach
I have created a separate URL iViews for testing purpose and tested that with URL iView, it is possible to open:
External link in the format of http://www.<link>.com
KM Folder in the format /irj/go/km/navigation/documents/..../<Destination Folder> , &
KM document in the format /irj/go/km/docs/documents/..../<Destination File>
I have now created a single URL iView pointing to a default URL(google), and marked the URL iView parameter Forced URL - Enabled as True
The plan is to use this single iView for invoking any type of links - be it external, KM Folder or KM document
In WebDynpro, I have tried using the following code to call this iView:
WDPortalNavigation.navigateAbsolute(("ROLES://portal_content/demo_role/universal_url_iview",
WDPortalNavigationMode.SHOW_EXTERNAL,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
"forcedURL="+dynamicURL);
Not Working! Always opening the default google link.
WDPortalNavigation.navigateAbsolute(("ROLES://portal_content/demo_role/universal_url_iview",
WDPortalNavigationMode.SHOW_EXTERNAL,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
"app.forcedURL="+dynamicURL);
Not Working! Always opening the default google link.
where dynamicURL= either http://www.<link>.com or /irj/go/km/navigation/documents/..../<Destination Folder> or /irj/go/km/docs/documents/..../<Destination File>
Am I missing any configuration or the code is wrong?You really need to open the url within an iView? Oo
IWDWindow window=wdComponentAPI.getWindowManager().
.createExternalWindow("http://www.google.co.in","Google-search for an email address",false);
window.setWindowSize(100,100);
window.open();
or
String linkToBeOpen = "https://www.sdn.sap.com/irj/sdn";
IWDWindow window =
wdComponentAPI.getWindowManager().createNonModalExternalWindow(
linkToBeOpen,
"My window title");
window.show();
or
import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
import com.sap.tc.webdynpro.clientserver.navigation.api.WDPortalNavigation;
if ( ! WDPortalUtils.isRunningInPortal() ) { // standalone mode
wdThis
.wdGetExternalcompInterfaceViewController()
.wdFirePlugGoToUrl(urlobject);
} else { // portal iView mode
WDPortalNavigation.navigateAbsolute(
... /*set of parameters that I do not understand ;) */
regards,
Angelo -
Hi Expert,
I need to create a page with two URL iviews. The first iview is fixed and the other one is flexible and the URL address must be passed by parameter. Is that possible?
Thank in advance
Sergio Sepulveda M.Hi Sergio,
it depends a bit from where the parameter should come... Anyhow, a general approach is to develop a wrapper iView around the target iView (component) which takes a parameter / calculates target parameter on the fly and then calls the target component with these dynamic parameters.
Serach for "proxy iView AND Detlev" on SDN for further details.
Hope it helps
Detlev
PS: As already mentioned, please consider rewarding points for helpful answers on SDN, see tool tips in second level navegation too -
Get URL, code link properties of iview
Hello SDN,
I have few iviews in a folder. I have a program which iterates through all the objects in folder and if the object is an URL iview, i want to open it in a new window using "window.open(Url)" Two questions i have,
to check if the object is an URL iview, I am using this code
String path = "<path of the object>";
IPcdContext targetobject = (IPcdContext) initialContext.lookup(path);
Object attr4 = iattrs.get("CodeLink").get().toString();
and i want to compare it with the "com.sap.portal.httpconnectivity.urliviews.runtime"
but i get attr4 as "null".
although i know that it is a URL iview, how do i get the actual URL in the URL iview. what property should i access and how?
could someone please help?
thank YouHi,
Hello SDN,
I have few iviews in a folder. I have a program which iterates through all the objects in folder and if the object is an URL iview, i want to open it in a new window using "window.open(Url)" Two questions i have,
to check if the object is an URL iview, I am using this code
String path = "<path of the object>";
IPcdContext targetobject = (IPcdContext) initialContext.lookup(path);
Object attr4 = iattrs.get("CodeLink").get().toString();
and i want to compare it with the "com.sap.portal.httpconnectivity.urliviews.runtime"
but i get attr4 as "null".
Try the following code instead: (also have a look at the doc here: http://help.sap.com/saphelp_nw70/helpdata/EN/44/6aaf92f5a23672e10000000a114a6b/content.htm)
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
String attr = "";
InitialContext iCtx = null;
try
String iViewID = "pcd:portal_content/...../...";
iCtx = new InitialContext(env);
IiView myIView =(IiView)iCtx.lookup(iViewID);
attr = myIView.getAttribute("CodeLink");
} catch(Exception Ex) {
Ex.printStackTrace();
response.write("Value of Parameter CodeLink is " + attr");
Replace the value of the String Variable iViewID with the complete PCD Path of your iView. You will need to perform a JNDI Lookup on the ID. If you have a naming convention it should be possible to generate the IDs dynamically in your Code. Otherwise just provide a list of all IDs and iterate through the list to provide the appropriate ID.
although i know that it is a URL iview, how do i get the actual URL in the URL iview. what property should i access and how?
could someone please help?
Mmmh, good question. You can try to access it the way I described above. I've never tried for a URL iView.
Try URL as name of the property or maybe LaunchURL or SourceURL. If both do not work you can try to get a list of all Paramerters (I think there should be a method for this). You could print all parameters and its values so you can find out the name of the URL Property.
Hope this helps (Points are appreciated if helpful )
Cheers -
Dynamic pass parameter URL iview Portal
Hi guys
i have url iview, this iview is assigned to a rol of anonymous user,
http://XXXXXXXX/irj/portal/anonymous?guest_user=Guest01
the ivew set automatically and i can see when user guest sign in.
this iview have 2 parameters i need this parameter, has set values with a link, like this
http://XXXXXXXX/irj/portal/anonymous?guest_user=Guest01¶meter1 = value1¶meter2 = Value2
i appreciated any help
Angel G.Hi Angel,
So you are trying to pass two parameters to your iView that is embedded in a portal role that is assigend to an anonymous user... is that right?
What problems are you having? Does the iView not see the parameters if passed as part of the top level URL (e.g.
http://XXXXXXXX/irj/portal/anonymous?guest_user=Guest01¶meter1=value1¶meter2=Value2)?
Not sure if it is just a typo but you have blank spaces between your "=" signs in that URL you posted, there should be no spaces.
A bit more info and perhaps I can help more,
Simon -
Dynamic Url iView- is it possible?
Hallo
Just a short question concerning the url iView in 7.0.
I need to implement a url iview which can be transported through the landscape (directing to various systems in dev, test and prod).
Do you know if this is possible while using a url iview?
I have noticed the system drop down in the url iview. Does anybody know what it is good for? (there are no systems available despite having system[including associated alias] set in the pcd)
Thanks for your help,
Regards,
MinimaHi Minima,
I don't know where your URLs are pointing to but maybe the following will help you.
We have uploaded some static html in a .par file to the portal server, lets say for this example the file is called com.company.statics.par.
We call them via a URL iView that is using Relative URL instead of an Absolute one...
To call an URL we use: /irj/portalapps/com.company.statics/example.html
As you can see it's a Relative URL and not an Absolute one, in this way you don't have to worry about the URL's after transport.
If this is not a possibility for you then I would suggest to take a look at the Application Intergrator.
Cheers,
Benjamin Houttuin -
WD Java iView & Dynamic Navigation Problem
Hi,
I'm trying to use a WebDynpro Java iView in Dynamic Navigation but have the following display problem:
When I navigate to the page for which I've added the iView to the dynamic navigation, only the WebDynpro iView (from the navigation) is shown. You can see the page in its correct form being loaded but as soon as the navigation iView seems to be loaded/ing it replaces the full lower part of the screen (navigation and content panel).
If I use a plain URL iView in the dynamic navigation the behaviour is as expected.
But if I add a WebDynpro iView or even a page containing that iView I get the strange behaviour again.
I'm running NW04s SP7.
Any ideas?
Do I have to set some properties on the WebDynpro iView?
I've tried a couple of things but none did work so far.
Thanks & Regards
MarkusHi Henrik,
Sorry for the late reply but I'm just back from vacation.
No, I have not found a solution. I decided to go for an integrated application instead (Main WD application that bundles navigation with other applications). That works but of course is not as "nice".
Have you come across some solution yet?
Kind Regards
Markus -
Configuring SSO to a URL iView
hi everyone......
i'm relatively new to EP....
and my requirement is.....
i've created a URL iView and when i logon to the portal.....i need my <b>yahoo or gmail inbox</b> to appear in this URL iView.....
i read frm a thread that i need to confgure SSO for this by creating a system....
can u plz guide me how to configure SSO and also the usermapping.......
help is highly appreciated....
thanks and regards,
SudheerHi Sudheer,
Please Ensure The following:
SSO with Yahoo:
UPLOAD:
1.Upload the par in PCD
SYSTEM CREATION:
1)Create ->System from par -> select com.sap.portal.howtos.webapp -> web application->give name & Id
2)Properties-->object->system definition
Name of the server : login.yahoo.com
Port : (empty)
URI :/config/login
3)create alias
4)set user Mapping
IVIEW CREATION:
1)Iview from par
2)Iview type:com.sap-appintegrator.sap
3)template:generic
4)Properties Setting:
System : (system alias name )
URL Template :<System.protocol>://<System.server><System.uri>?<Authentication>
URL Template fragment for UserMapping: <System.protocol>://<System.server><System.uri>?<Authentication>
Regards,
Ramganesan K. -
How to change the URL of a URL-iView over Code ?
Hi all,
i am getting started with the Portal-Application-Developement and want to change the URL of an URL-iView on runtime with java-code.
i have read the context and can get the Property url with this statement.
endContext.getProfile().getProperty("url")
But if i change this property, nothing is done.
endContext.getProfile().setProperty("url", "http://www.yahoo.com");
Where is my fault.
Thanks for help.
Regards JürgenHi,
the context is of Type IPortalComponentContext.
I cant find no method getParameter() at the context or the profile.
The methods to read the properties of the URL-iView are
context.getProfile().getProperty("url")
context.getProfile().getAttributeValue("url")
But if i want to set (change) this attribute, nothing is done.
Regards Jürgen
Maybe you are looking for
-
How to display total in ALV Header
How to display total in ALV Header?
-
How can I have two different windows up on one screen at the same time?
How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.
-
Error when uploading par files - Exception
Hi all, I'm getting an error when I try to upload any par file of the MSS package through the administration console. The error thrown is: Messages: INFO: Detected Portal Archive File: com.sap.pct.hcm.attendanceoverview.par INFO: Application successf
-
Can anyone help please. had similar problem with previous version of PS.
-
Hello all, I have a question. Is there a way to change the default sort order of pcmanfm? Whenever I start it up, files will be shown sorted by type. I would like it to sort files by name instead.