Set (PCD) IViewID out of web dynpro
Hi experts,
is it possible to set the portal (pcd) iviewID out of web dynpro, via some api?
i would like to provide my Iview with a unique identifier and the default IviewDI does not suit our needs.
thanks for any help,
Rene
hi,
see this document
http://help.sap.com/saphelp_ep50sp6/helpdata/en/6c/670e3c421ff443e10000000a11405a/frameset.htm
You can manually add the get_ API to the iView URL by defining it as a parameter in the Parameter Properties table. The get_ API reads the value of whatever you ask for. For example, get_IsolationLevel instructs the iViewServer to read the currently defined isolation level. At runtime, the iViewServer replaces this URL parameter value with the requested value.
The syntax of what follows get_ is very specific
GET_IVIEWID returns the unique iView ID defined in the portal content repository.
Thanks and Regards
Avijit
Similar Messages
-
Hi,
How does SAP applications handle sessions time outs in Web Dynpro for ABAP when the processing takes a long time. Can we change some configuration settings so that we can have a Web Dynpro application can run for a very long time without getting into time-outs?WDA uses a Dialog Work Process just like a SAPGUI session and is subject to the same timeout limit on continuous processing within this work process.
In addition there is also a separate timeout parameter at the ICM level. This controls how long the HTTP connection is held open while wiating on the Diag Work Process to complete its work. The ICM time out is generally set shorter than the dialog WP timeout - default is set to 60 seconds. -
Nwdi-managed access of pcd-objects from java web dynpro
Hi,
im am trying to access portal pcd-objects from a java web dynpro component (namely getting and setting personalized iview properties). for locally managed web dynpro components this works fine with the code below.
when i try the same with a nwdi managed web dynpro component i run into problems regarding references to used dcs. for instance, i need to reference used dc SAP_JTECHS/tc/epbc/pcm/adminapi/java because the build needs tcepbcpcmadminapijava.jar which is inside the mentioned dc. but access permissions of this dc don't allow the dependency. when i try to "add used dc ..." in nwds i get the error message: illegal dependency: access list does not allow use of ...
has someone any solution for this problem? are there other ways of accessing pcd-objects from java web dynpro (nwdi managed!)?
thanks
heiko
private static void savePersonalizationData(String value) {
try {
IAttributeSet attributeSet = (IAttributeSet) getIview(IVIEW);
attributeSet.putAttribute(ATTRIBUTE, value);
attributeSet.save();
} catch (Exception e) {
private static Object getIview(String pcdPath) throws Exception {
Hashtable env = new Hashtable();
env.put(
com.sap.portal.directory.Constants.REQUESTED_ASPECT,
com.sap.portal.pcm.admin.PcmConstants.ASPECT_SEMANTICS);
env.put(
Context.SECURITY_PRINCIPAL,
WDClientUser.getCurrentUser().getSAPUser());
env.put(
IPcdContext.PCD_PERSONALIZATION_PRINCIPAL,
WDClientUser.getCurrentUser().getSAPUser());
InitialContext iCtx = new InitialContext(env);
return iCtx.lookup(pcdPath);Hi Kust,
To access the PCD objects the code you used looks ok for me but your main issues is related to the dc access permissions. This thread discussed about the similar issue. Please review this below thread.
/message/979328#979328 [original link is broken]
Regards
Krishna Reddy -
Set Portal Page URL in Web Dynpro IFrame
Hi All,
I've a Web Dynpro application that runs in the portal.
The application creates iframes dynamically.
I want to set in the iframes portal pages.
In order to get the page's url, I go to content admin, navigate to the page and then press the 'preview' button then I copy the url from the browser's address bar.
I copy the url from the '/irj....' to the src property of the IFrame UI element.
So the source property looks something like this:
/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.mycomp.Omri!2fcom.mycomp.TestPage
When I run the project I get:
<i>Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
Access denied (Object: portal_content/.../...).
Exception id: 06:01_17/10/06_0015_4401150
See the details for the exception ID in the log file</i>
The page's permissions are set to everyone so I don't know why do I get this error.
So, how do I set portal page url in Web Dynpro IFrame?
p.s
I tried to use NavigatinTarget in the URL and it works. The problem is that the TLN is included. I want to display only the page.
Thanks,
OmriHi Valery,
I have only one domain...
I searched SDN and I found this post:
/message/1259616#1259616 [original link is broken]
Daniel Wroblewski from SAP says:
<i>This, naturally, sounds like a permission issue. Two steps:
You must give the Everyone group end-user permission to the iView. This will eliminate the error and cause a login screen to display.
If you want to eliminate the login screen, you must set the iView property Authentication Scheme to anonymous.</i>
I will try it tomorrow in the Office.
Omri -
How can I set the data binding between Web Dynpro & Database table
Dear friend,
I am a beginner of Web Dynpro. I want to develop my simple project like these:
1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
1. How can I set the data binding between Web Dynpro and Database table ?
2. Are there any nescessary steps that I will concern for this case?
Sorry if my question is simple, I had try to find solution myself, but it not found
Thanks in advances,
SeMsHi,
You can write your own connection class for establishing the connection with DB.
Ex:
public class ConnectionClass {
static Connection con = null;
public static Connection getConnection() {
try{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
con = ds.getConnection();
return con;
}catch(Exception e){
return null;
You can place the above class file in src folder and you can use this class in webdynpro.
You can have another UserInfo class for reading and writing the data into the DB .
Regards, Anilkumar
PS : Refer
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
Message was edited by: Anilkumar Vippagunta -
How to set a background image in Web dynpro for Java?
Hi,
Experts,
As i want to set a background image in my application can u please suggest how to get background image. send any sample scenarios.
Thanks in advance,
Shabeer ahmedHi,
I don't think it can be done in WDJ.
Maybe something can be done on the portal end.
Refer to http://help.sap.com/saphelp_nw70/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
Changing the theme can help maybe but I do not know how to go about that
Regards,
Himanshu -
Setting first visible row in Web Dynpro ALV in Releases above 7.0
Hello Everybody,
I have an ALV in which a particular row should be set to lead selection and also set as the first visible row in this ALV for the first display. The index for this row is determined at runtime.
I used the method SET_FIRST_VISIBLE_ROW of the interface IF_SALV_WD_TABLE_SETTINGS and it worked fine in a system of Release 7.0.
However, after the system has been upgraded to 7.02, this is not working. The row is lead selected but it is not set as the first visible row and as a result I need to scroll down and look for the row that is lead selected.
Does anybody have suggestions?
Thanks!
VidyaHello Srilatha,
Thanks a lot for your suggestion! I am calling method SET_FIRST_VISIBLE_ROW in the wddoinit method of the view.
I tried checking in the debugging mode by inserting a call to GET_FIRST_VISIBLE_ROW in both the wddoinit method as well as wddomodifyview method.
The value of the first visible row is correct in both these methods but when the screen is rendered, the first row of the ALV continues to be the first visible row.
CALL METHOD wd_this->lref_nd_node_rename->set_lead_selection_index
EXPORTING
index = lv_leadselection.
wd_this->lref_table_settings ?= wd_this->lref_value.
CALL METHOD wd_this->lref_table_settings->set_first_visible_row
EXPORTING
value = lv_leadselection.
" Set vertical scrollbar height to 15 rows
CALL METHOD wd_this->lref_table_settings->set_visible_row_count
EXPORTING
value = '15'.
Here lv_leadselection contains the index of the row that needs to be lead selected (in this case it is 3)
lref_value is of type CL_SALV_WD_CONFIG_TABLE
lref_table_settings is of type IF_SALV_WD_TABLE_SETTINGS
lref_value and lref_table_setings are view attributes.
Thanks and best regards,
Vidya -
Create PCD folder using web dynpro Java
Hi All ,
I would like to create pcd folder structure using web dynpro java
i.e. My folder at top level and under this there will be iviews , roles , worksets etc.
Is it possible using WDJ ?
I have checked the below link , but for folders I did not get anything.
http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
Can you please help me ?
Thanks,
SandipHi,
Please refer to the following document
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
The same can be implemented in webdynpro also.
Regards,
Raju Bonagiri
Edited by: Raju Bonagiri on Sep 3, 2010 8:36 AM -
How to include source code in web dynpro java deployment
Hi,
We dont have NWDI.
We are creating ear files out of web dynpro applications packaging them as sca files and deploying them in server.
But the source code is not included in ear.
How to include source code with your ear/sca , so that when anyone downloads the sca file later, they are build the Project in the studio.
How would they typically download? Do they require NWDI ,
Right now we dont have NWDI in place, but we want to do is parcel the applications such that the source code should be available at a later time for download.
This is possible with .par files , but what about web dynpro?
Thanks,
DebIf you are not using NWDI use the _comp file.
-
In web dynpro i want explanation/definition for the following things
Hi dudes,
I want explanation *** definition for the following
(1) web dynpro
(2) Cardinality
(3) methods
(4) Nodes
(5) Attributes
(6) Interface
(7) Views
(8) Windows
(9) Mapping
(10)Binding
(11)Model
(12)ControllerHi,
Here are the defintions for the terms you hav requested-
Web Dynpro Architecture
Definition
Web Dynpro is the SAP NetWeaver programming model for user interfaces (UIs).
The Web Dynpro model is based on the Model View Controller paradigm, and has the
following features that build on the classic dynpro model:
Clear separation of business logic and display logic
Uniform metamodel for all types of user interfaces
Execution on a number of client platforms
Extensive platform independence of interfaces
Web Dynpro provides support for developing Web representation of a business application.
You use specific tools to describe the properties of a Web Dynpro application in the form of
Web Dynpro metadata. The necessary source code is then generated automatically and
executed at runtime. In addition to the events offered by the framework, you can also define
your own events for a Web Dynpro application. However, the event handling must always be
programmed in separate source code areas which are executed automatically when the event
is triggered at runtime.
In Web Dynpro, each user interface is always made up of the same basic elements. These
elements of the metamodel can be statically declared using Web Dynpro tools.
It is also possible to implement elements of the metamodel at runtime and to change them or
reintegrate them at runtime. Using these implementations, you can make any changes or
enhancements to a user interface that has been created by declarative methods by
generating new interface structures at runtime.
This means that you can combine declarative processes and the implementation of source
code.
A Web Dynpro component is a reusable entity. It summarizes all components that are
required as part of this programming unit for an executable Web Dynpro application.
The Web Dynpro component concept offers a number of advantages:
Structuring of the programming
Creation of easily manageable application blocks
Reusability of whole components
Decoupling of software projects in both time and space
The Web Dynpro component contains any number of windows and views and their
corresponding controllers. Additional Web Dynpro components can also be referenced.
View
A view describes the layout and behavior of a rectangular area of a user interface.
Every Web Dynpro application has at least one view. The layout of a view is made up of
different user interface elements, which can be nested in each other. The positioning of
interface elements in one view is supported by the supplied layout variants.
In addition to the visible part, the layout, a view also contains a controller and a context. The
data to which the elements of the view can be bound are stored and managed in the view
context, enabling them to be represented or used on the screen. The view controller can
contain methods for data retrieval or for processing user input.
Window
A window is used to combine several Views and View Sets (the concept of view sets is only
offered in Web Dynpro for Java). A view can only be displayed by the browser if it has been
embedded in a window. A window always contains one or more views, which are connected
by navigation links. One of these views, or a view set, is specified as the start view and is
displayed the first time the window is called.
Windows have inbound and outbound plugs.
Inbound Plugs and Outbound Plugs
A window has one or several inbound or outbound plugs. Using these plugs, a window can be
included into a navigation chain. The concept of these plugs corresponds to the concept of
the plug for a view. Each plug of a window is visible within the entire window and can be used
for navigating within this window. In addition, one or several plugs can be made accessible to
the component interface so that they are visible even beyond the limits of the component in
question. They thus belong to the interface view of the relevant window.
They are used to navogate from one view to other and pass the data between the views. Which view to be called next from current view - the flow of views is descriebd here using Plugs.
Controller
Controllers are the active parts of a Web Dynpro application. They define how the user can
interact with the Web Dynpro application. The data that a controller can access is defined in
the corresponding context. Different instances of controllers and contexts exist within a Web
Dynpro application.
View Controller
Each view has exactly one view controller, which processes the actions performed by the user in the view.
A view also has exactly one view context, which contains the data required for the view.
Interface Controller
Each Web Dynpro component contains exactly one component controller. This controller is a
global controller that is visible also outside the component. It is thus part of the interface of a
Web Dynpro component.
Context
Definition
The data used in the component or in the view are stored in the context. Read-write access to
this data is available using the controllers as a starting point.
Structure
The data from the contexts is managed in a hierarchical structure. Each context has a root
node, underneath which the individual data fields (attributes) are stored in a tree structure.
You create this tree structure according to the structure of your application.
CONTEXT is generally called as a ROOT Node.
Each context has nodes and attributes also.
Cardinatlity
Each node contains data fields that represent one of the following:
u2022
An individual instance of an object type
u2022
A table of instances.
This property of a node is known as its cardinality. The following table summarizes the
possible cardinalities for a node:
Cardinality Description
1:1 The node contains only one element instance, which is instantiated automatically.
0:1 The node contains only one element instance, which must not be instantiated.
1:n The node can contain multiple element instances, of which at least one must always be
instantiated (and is instantiated automatically).
0:n The node can contain multiple element instances, of which none have to be instantiated.
Further information about this and other properties of context nodes is available in the section
Context-Nodes: Properties.
Recursion Nodes
Dynamic node nesting is possible within a context, creating what is called a recursion node.
The node that is used for recursion is always a predecessor of the new node. The newly
created recursion node is a reference to a predecessor node and therefore cannot be
processed separately. Instead it takes on the structure of the node to be repeated.
Data Binding and Mapping
Within the Web Dynpro architecture, the contexts of the different controllers can be linked in
different ways:
u2022
A UI element of the user interface of the view can be linked with an element of the view
context.
u2022
A mapping can be defined between two global controller contexts, or from a view
context to a global controller context.
The context of a global controller can be linked to a Web Dynpro Model.
Defining Mapping Between Two Contexts
The elements of a view context can be locally defined. In this case (represented in the graphic
below as a "Local Node"), all the contained attributes are only visible within the relevant view.
When the view disappears, the attribute values are deleted.
Event
The component controller allows you to create events.
Events are used to communicate between controllers and enable one controller to trigger
event handlers in a different controller.
Cross-component communication can be implemented using the interface controlleru2019s events.
Events that were created in the component controller are visible within the component only.
Inbound Plugs
Inbound plugs in a view also react like an event. Therefore, when a view is called using an
inbound plug, the event handler that is optionally available for the inbound plug is always
called first. In this case event handling takes place within the current view controller.
UI Element Events
Some UI elements, such as the Button element have special events that are linked with user
actions. These events are predefined and have to be linked with an action at design time.
Actions for UI Element Events
Some UI elements such as the button element can react to a useru2019s interaction: clicking on
the corresponding pushbutton can trigger a handling method to be called within the view
controller. Such UI elements are equipped with one or several general events, which can be
linked with a specific action at design time (switching to a subsequent view, for example). If
such an action is created, an event handler method for this action is created automatically. In
this way, you can equip a UI element event (which has been inserted several times into a
view) with different actions as necessary. The event is then processed by the corresponding
event handler depending on the action that is linked.
Interfaces of Web Dynpro Components
Each component has an interface in order to enable communication between Web Dynpro
components and to enable a component to be called up by a user. This interface consists of
two parts:
Interface View of a Window Contained in a Component
The interface view of a Web Dynpro window is used to link a window with a Web Dynpro
application that can be called by the user.
Reward if helpful.
Best Wishes,
Chandralekha -
Is there any way we can integrate ALV controls in web dynpro .Actually I am looking for developing simple reporting solution out from web dynpro.
What would be the ideal way of displaying simple lists in web dynpro?
Thanks in Advance .Hi,
as far as I know there is nothing like ALV in Web Dynpro. If you want to display a list the easiest way is to use a Table-Control. Read the data via RFC-Call and display them in a Table-Control. Its very easy.
Have a look in the tutorial "Creating a Web Dynpro Application Accessing ABAP Functions"
http://help.sap.com/saphelp_nw04/helpdata/en/e9/1fc0bdb1cdd34f9a11d5321eba5ebc/frameset.htm
Hope that helps.
Best regards
Renald -
Hi,
can anyone will help me out in web Dynpro's
i want to call RFC R/3 function in Web Dynpors
i created the RFC function and called in Web dynpro's
i wnat to add the contents to r/3 data base and display the values on the Web , plz can anyone will tell me program for customer define function, what are the steps involeved......... specially design part....
because according to the SAP we can call dictionay objects but i think we have to design the screen as per our requirement....
plz help me out its bit urgnet
anjaliPlease have a look at this tutorial (you need to be logged in to SDN to be able to download it!) - it is related to ESS custom development but should give you a good idea.
https://www.sdn.sap.com/irj/sdn/softwaredownload?download=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/teched-2006-sdn-day/sdnday_ess_hr.zip
Harald -
Web Dynpro ALV grid filter on date
Hi,
I want to set a "view" on my web dynpro alv grid that uses the current date. Is there a way to specify the current date in the filter values? Thanks,
SamirThanks Thomas. I will certainly look into using POWL in the future.
A related question - Its possible to use a filter by entering something like " .01. " but it doesnt seem to allow me to save that value as its not a date. Is there any way around this? Thanks -
Web Dynpro & Adobe Forms: Context Mapping
Hi Experts,
By assigning a form to a view via templateSource the option to automatically generate context. With sample data, implemented in the view its working fine.
Now I want to use data out of the component controllers' context, but I can't map the views context nodes to the component controller nodes without deleting the context structure out of the form.
In other words; how can I connect the automatically generated context from the form with the context of the component controller?
How can I solve this issue?
An option is to read out the component controllers context into itabs and save them in the views context.......
not very nice, but my only idea right now.
Does anyone has an idea?
Thanks in advance,
TanHi again,
I've found this [documentation|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011?quicklink=index&overridelayout=true], chapter "Integrating a PDF in a Web Dynpro Application" (Page 192-193) and followed the print scenario.
My intention is not to create an interactive form. I just want to display a generated pdf which is provided with data out of web dynpro context.
That's what I did:
In my views' layout tab in properties list I've entered a (not existing) form name (as templateSource) to create a new form. Then double cklicked on it to create it, entered a interface name (which was not existing also) and selected a context (the context was mapped before out of the component controller). Then se80 switched to form builder. The context nodes are available so I dragged some into the form, save & activate.
The result is, the dragged fields are visible, but there are no values assigned, the corresponding fields are empty.
I checked whether the context nodes are filled --> they are....
Any idea what's going wrong? -
Timezones and dates in Web Dynpro
Hello all,
We have a web dynpro application and it seems to be showing different dates for different users in our application. I am trying to figure out how web dynpro determines which locale to use (or timezone) when displaying. We are exposing the WD through EP 6.0 SP2, but I do not think there are any locale specific settings there. The only thing I can think it is doing is for users that do not have a timezone specified it is using UTC instead of the system timezone. Does anyone know definitevely what WD uses to display dates? Also, is there a way we can force all dates shown in WD to show in a particular timezone (i.e. PST)?
Help is appreciated.
Thanks,
Dustin GronsoHi Dustin,
You can show the time in a specific timezone using the following code :
TimeZone zone = TimeZone.getTimeZone(("PST");
DateFormat dateFormat = DateFormat.getDateTimeInstance();
dateFormat.setTimeZone(zone);
String time = dateFormat.format(Calendar.getInstance().getTime());
Hope this helps,
Best Regards,
Nibu.
Maybe you are looking for
-
I was on a a different Apple ID and I logged out because they didn't want me on there anymore so I figured out how to make one and now it's not letting me upgrade or download anything. I rebooted my iPhone 5, iOS 7.0.4 multiple times nothing fixed my
-
i just updated my IPOD and now every app except the apps that come on it wont open.
-
After restoring from Time Machine onto a new Mac, all images in Aperture are now just outlined. Aperture can't find the volume of the master images because that was the volume of my old Mac. Is there any way to tell Aperture to reconnect with the mas
-
Help - Focuslost is trigered too many time during jtextfield validation.
Hi all, I am designing a form containing multiple fields with field validations. The program supposes bring the focus back to that particular field after the error message is displayed. However; the error/warning message is displayed infinitely betwe
-
Hello java friends! I have implemented an auction application over a TCP communication. The client's using a basis Socket and the server is multi threaded with a ServerSocket returning a Socket which is processed in a separate thread. The connection