Restricting inputfield on web dynpro
Hi All,
I am customizing web dynpro screens wherein some of the input fields should not accept more than 5 characters. I tried setting the 'length' attribute to 5 in 'properties' tab, but still I am able to enter more than 5 characters. Any other option on how to do it.
Thanks,
Tom
TOM,
Create Simple Type in Local Dictionary (see your WD project tree in IDE), type should use "string" as base type, set min/max length constraints here.
Then go to content attribute of corresponding view and change attribute type to newly created type.
Btw, "length" of InputField just set average width of control in characters.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com
Similar Messages
-
How to select a directory path to inputfield in web dynpro abap?
Hi,
Experts,
I want to select a directory path into a inputfield as like in file_upload browse button but it select only a file but i want the whole directory to select can i achieve this please suggest me on this.
Thanks in advance,
Shabeer Ahmed.Currently not possible in Web Dynpro directly. If you are on 7.01, you could use a FlashIsland to acomplish such a thing. Here is a similiar tutorial.
https://wiki.sdn.sap.com/wiki/display/EmTech/IslandsWDA_MUploader
Next year in 7.02, we add a file dialog option to the ACFUpDownload UI element. It can be used as described to only return a directory path using only native WD UI elements. -
Validation of an inputfield in Web Dynpro ABAP
Hello together,
I have an input field in which is bound to a context. The context has a value-help.
My problem is that the user can input into tte inputfield any value. Is there a method or something to validate against values of the value-help.
Greetings,
FlorianHi
To the best of my knowledge
as the UI element is bound to a contex you can get it back in the program using GET_ATTRIBUTE method or GET_STATIC_ATTRIBUTE
as the value is available you can validate it against any table or in whichever manner you want
Regards
Ramchander Rao.K -
Web Dynpro Java - Light Portal Desktop
Hi Guys... I have a web dynpro java application that I want to display on a Light Portal Desktop, but when I display the iview... it gets cut. I mean I can see only part of my application and there is also a right scroll bar... It looks like the height size of the iview is set to "FIXED" but it's not. I Actually modifed all values for size even on the Light Framework Page used...to FULL_SCREEN. I don't know what's wrong. If I display the same iview using a Default Framework Page it looks fine... I'm using SAP EP 7.00 SP 16.
Is there any restriction for using Web Dynpro iviews for Light Porta Desktops?
Thank you.
DavidDavid,
Webdynpro content is considered heavy and I dont think we can use it in LPD.
Update:
Note 916545 - Central Note for External-Facing Portal (NW 7.0)
Check under application.
Regards,
Sandeep Tudumu
Edited by: Sandeep Tudumu on Sep 17, 2008 8:56 PM -
Restrict simultaneous login to a web dynpro application by the same user
I have a stand alone web dynpro application and used the sap.authentication for user to login into the application. How can i restrict a user from accessing the application from two different browsers using the same userid?
Hi,
You can try the following approach:
1. Create an outbound plug to some dummy view which shows the message to the user that he/she is already logged in. Let's call this plug "ToMessageView".
2. In the "wdDoInit" method of the component controller write the following code:
String loggedInUserID = WDClientUser.getLoggedInClientUser().getClientUserID();
String[] apps = WDServerState.getActualApplications(loggedInUserID);
//All entries of apps will look like <application-name>/<application-id>
boolean isRunningParallely = false;
for (String app : apps) {
if(app.split("/")[0].equals(wdComponentAPI.getApplication().getName())){
isRunningParallely = true;
break;
if(isRunningParallely)
//fire the plug to message view here
FYI, I haven't tested this but do try it out.
Regards,
Satyajit -
Mimicking SAP search functionality for Web Dynpro inputfield
Hello Experts,
I am using NWDS 7.0.18. EP 7.00 SPS 18
I want to mimic the standard SAP functionality of an input field search values in web dynpro.
Is it possible to have an inputfield with the little square search values button next to it, so that after I type in a few characters in the input field and click the button, a window will open up and list the values that contains that string? Then the user can double click the value and it will get populated into the inputfield?
Any suggestions?
Regards,
MMHi Marshall,
You can easily use the IModifiableSimpleValueSet for getting the value help attached to input field. Follow these steps:
1) Create a attribute under somenode in the view context.
2) Bind the atribute with the input field.
3) Use the following code:
IWDAttributeInfo list =wdContext.node<Node_Name>().getNodeInfo().getAttribute("ATTRIBUTE_NAME");
ISimpleTypeModifiable type = list.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = type.getSVServices().getModifiableSimpleValueSet();
valueSet.put("value1", "value1");
valueSet.put("value2", "value2");
valueSet.put("value3", "value3");
valueSet.put("value4", "value4");
Also please note that webdynpro does not support the feature what we have in ABAP when we type in some value and hit enter a pop up comes with the list of values. Such feature is not supported. The maximum what you can do is just hit the F4 button to get the value help and select some values from the value help popup which has come.
I hope this solves your issue. Please revert back in case you need any further information on this.
Thanks and Regards,
Pravesh -
ECATT abends during recording when lead selection is set to 0 on web dynpro
We have a web dynpro application that works ok when running by itself. When we tried to record ECATT testing on it, it abended after we click on a selection from a list of values. The error on the browser indicated an error on the "lead select". After reviewing the dump, we found that it abends on an exception when the lead selection on the ALV is not set. When we changed our code to set the lead selection to 1, the ECATT recording worked.
We have a requirement to set the lead selection of ALV to 0 so we need to change back our code. We just did the setting to 1 just to get ECATT recording to work for now. Does anybody know why ECATT requires this? Is there a support packs that fixes this?
Here is a snippet from ST22 for more details on this:
Runtime Errors UNCAUGHT_EXCEPTION
Exception CX_WD_CONTEXT
Date and Time 2007/02/07 14:50:06
Short text
An exception occurred that was not caught.
What happened?
The exception 'CX_WD_CONTEXT' was raised, but it was not caught anywhere along
the call hierarchy.
Since exceptions represent error situations and this error was not
adequately responded to, the running ABAP program
'CL_WDR_CONTEXT_NODE===========CP' has to be
terminated.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred which is explained in detail below.
The exception, which is assigned to class 'CX_WD_CONTEXT', was not caught and
therefore caused a runtime error.
The reason for the exception is:
The lead selection has not been set. VIEW_TABLE
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UNCAUGHT_EXCEPTION" "CX_WD_CONTEXT"
"CL_WDR_CONTEXT_NODE===========CP" or "CL_WDR_CONTEXT_NODE===========CM00V"
"_RAISE_ELEMENT_NOT_FOUND"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
System environment
SAP-Release 700
Application server... "torsapd01"
Network address...... "10.2.75.183"
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "4x AMD64 Level"
Character length.... 8 Bits
Pointer length....... 64 Bits
Work process number.. 0
Shortdump setting.... "full"
Database server... "TORSAPD01"
Database type..... "MSSQL"
Database name..... "PR3"
Database user ID.. "dbo"
Char.set.... "English_United State"
SAP kernel....... 700
created (date)... "Aug 28 2006 22:20:27"
create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
Database version. "SQL_Server_8.00 "
Patch level. 75
Patch text.. " "
Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
SAP database version. 700
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
Memory consumption
Roll.... 16128
EM...... 16759616
Heap.... 0
Page.... 0
MM Used. 12713776
MM Free. 4042608
User and Transaction
Client.............. 200
User................ "SIC0010"
Language Key........ "E"
Transaction......... " "
Program............. "CL_WDR_CONTEXT_NODE===========CP"
Screen.............. "SAPMHTTP 0010"
Screen Line......... 2
Information on Caller ofr "HTTP" Connection:
Plug-in Type.......... "HTTP"
Caller IP............. "10.49.77.47"
Caller Port........... 8000
Universal Resource Id. "/sap/bc/webdynpro/sap/zpr3_base_price/"
Information on where terminated
Termination occurred in the ABAP program "CL_WDR_CONTEXT_NODE===========CP" -
in "_RAISE_ELEMENT_NOT_FOUND".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 11
of the (Include) program "CL_WDR_CONTEXT_NODE===========CM00V".
Source Code Extract
Line
SourceCde
1
method RAISEELEMENT_NOT_FOUND.
2
data: l_count type I,
3
l_node_name type string.
4
5
l_node_name = if_wd_context_node~get_path( ).
6
7
l_count = if_wd_context_node~get_element_count( ).
8
if l_count = 0.
9
raise exception type cx_wd_context exporting textid = cx_wd_context=>NODE_EMPTY node_nam
10
elseif element_index = if_wd_context_node=>use_lead_selection.
>>>>>
raise exception type cx_wd_context exporting textid = cx_wd_context=>NO_LEAD_SELECTION n
12
else.
13
raise exception type cx_wd_context exporting textid = cx_wd_context=>ELEMENT_NOT_FOUND n
14
endif.
15
endmethod.
Contents of system fields
Name
Val.
SY-SUBRC
0
SY-INDEX
1
SY-TABIX
0
SY-DBCNT
2
SY-FDPOS
0
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
SY-UCOMM
SY-TITLE
HTTP Control
SY-MSGTY
E
SY-MSGID
TD
SY-MSGNO
600
SY-MSGV1
000003587101
SY-MSGV2
0001
SY-MSGV3
EN
SY-MSGV4
SY-MODNO
0
SY-DATUM
20070207
SY-UZEIT
145005
SY-XPROG
SAPCNVE
SY-XFORM
CONVERSION_EXITHi Eugene,
i suggest you raise an SMP ticket for these.
Looks like a bug at first glance.
regards
Phil -
How to use EVS with different data in each row, in a Java Web Dynpro table?
Hi all,
I am using EVS in a column of java web dynpro table.
Let's say the name, and context attribute, of this column is column1.
It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2). Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
The code I'm using works great for filling the EVS dynamically:
IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
value.clear();
if(this.initRFC_Input(nodeElement.getColumn2())){
for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
, wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
Thanks!I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
Here´s what I did:
I
In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
"Column1Values" node has an attribute called "column1", of type String.
I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
if(this.initRFC_Input(nodeElement.getColumn2())){
for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
Thanks! -
Read only access to few users & RW to others for Web Dynpro App in EP
HI All,
I am creating few Iviews using custom development and able to display on the EP fine.. Now customers want to have red only to few users and read/write access to few users.. Can any one point me to the right documentation or the steps to be performed to acheinve this.
Thanks
RajeevHi Rajeev,
Please create role/group for WD applciation which you want to assign read/read & write to the users. Access the role/group in WD application and restrict the access to UI Element properties.
Refer to below documents for protecting Access to the Web Dynpro Application Using UME Permissions.
[help.sap.com|http://help.sap.com/saphelp_nw04/helpdata/en/f3/a64d401be96913e10000000a1550b0/content.htm]
[Exmaple|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/297f35cf-0201-0010-00b2-fe2f3e23d360?QuickLink=index&overridelayout=true]
Hope it will helps
Regards
Arun -
[Web Dynpro]How to add a new function in the implementation of a view?
Hi, all,
I'm trying to add a inputfield check method in the viewname.java , the method is used to check all the 12 inputfields in the view, at least one inputfield should be filled.(Is there any other methods I can use to do this job?)
however, when I clicked the save meta data button, the function disappeared from the viewname.java. The import statements were still there and showed that they are never used...
Could you please give me some hints to avoiding this?
I want to save my function in the viewname.java.
Thank you in advance.Hi folks,
I'm somewhat new to WebDynpro and when I want to declare my own methods I generaly put them at the bottom of the file underneath the comment;
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
//@@begin others
This way I can delare them as private methods for the class. Am I wrong in saying that anything you declare in the 'Methods' tab will be public?
Since I'm new to WebDynpro I don't know all the best practices so any clarification here will be appreciated.
Regards,
Patrick. -
Hi All,
I am trying to complete the Integrating EJB 3.0 into Web Dynpro Using the EJB Model Importer tutorial that goes with SAP NetWeaver Composition Environment 7.1 SP3 Developer Studio.
Does anyone ever completed this tutorial because I have problems completing it. The result is very important for me because I need to use this technology for my essay.
In this tutorial you create a button that calls the method StudsBean.getStudent(String). In this method the object student is created and it will be returned. In several labels the information of the returned student should be displayed. But that doesnt happen, when I push the button no error occurs but the labels are still empty. When I try to debug the Enterprise Bean and Web Dynpro application I see that the method StudsBean.getStudent(String) is called and the propertys are set and the student object is returned, but still it isnt displayed.
After discussing this with a colleague I tried to search for a solution on the SDN and of course Google. First I thought I would be a bug but I only found 2 people with the same problem. I found it remarkable because its one of the key subjects of Java EE 5 and its a tutorial displayed in the welcome page of the Developer Studio.
So do you people think its a bug in WebDynpro? Because I am sure that I followed all the steps mentioned (a colleague checked it even).
Regards,
SanderHi Vesselin,
Thank you for the quick replay, this is the code I'm using:
public void onActionGetStudent(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionGetStudent(ServerEvent)
try {
// executes the corresponding method on the session facade
wdContext.currentRequest_StudsLocal_getStudentElement().
modelObject().execute();
// forces Web Dynpro to re-create the Request model object
// in order to clear the InputField
wdContext.nodeRequest_StudsLocal_getStudent().invalidate();
// updates the UI elements bound to the Response node
wdContext.nodeResponse().invalidate();
//Code for trying something out
//wdContext.nodeReturn().invalidate();
//wdContext.nodeAddress().invalidate();
} catch (Exception e) {
throw new RuntimeException(e);
Have you tried this example yourself, or is replay based on experience?
Kind Regards,
Sander -
How to customize error mess, when an Web Dynpro application Deployed
Hi Frndz...
When we r deploying any web dynpro application , if there was any error in that WDP application its showing an error page the list of errors with HOST name n patch level n OS details n so many n with the line number of that error in the code.. Normally.
But as my requirement i need to restrict the HOST,OS ,PATCH details in this list to avoid the security issues.
If anybody have any idea plz share with me...
Regards
RajeshHi..
Thank u boss, ur reply was very helpfull to sort out our requirment.
Regrads
Rajesh -
ABAP Web Dynpro application in new UWL tab
Hi All,
I have been looking for an option to open a web dynrpo abap application in a new tab in UWL which i created. I have been searching on SDN for this but i could only find the help docs which say how to open a task in web dynrpo abap application.
But in my case i want to open a web dynpro abap application on click of a new tab in UWL. The WD ABAP application doesn't have any workflow task.
Also is it possible to restrict the tabs which user see based on their roles ?
please help me on this.
Thanks
HussainHi,
how did you open in administrative mode?
to open in adminstrative mode do as follows:
In se80 ,i.e in the menu bar:
Web Dynpro Application->Test->Test in Administation mode.
i hope u can see the option "Settings for surrent config" .
you can refer the thread.
[Re: ABAP Web Dynpro Application changes in Administation mode]
Priya. -
HI:
Now come across a problem.
In Web Dynpro, there are several UI: inputfield and fileupload. when click submit, create an microsoft word with the content of inputfield and fileupload. then save in server.
My question is : how to create microsoft word in web dynpro.You need to use OfficeControl UI element.
check this link
http://help.sap.com/saphelp_dm40/helpdata/en/4c/9980415dc6050de10000000a1550b0/frameset.htm
Thanks
Bala Duvvuri -
Hey people!
Im pretty new in web dynpro, and i want to store the data i input in the inputfields somewhere.. either in a database (oracle) or xml file.. someone got any tips? and if i choose to go for oracle, do i have to create an EJB as well? or could i just write the connections and queries in the views?I think that suggested way is to use SQLJ in a EJB and then use that EJB in your web dynpro project.
Check out this thread.
Accessing Dictionary devlopment component in Web dynpro component
Regards,
Rich Heilman
Maybe you are looking for
-
How to find the Table from which a Custom table is created.
Hi Gurus, I have a custom table in SAP and want to figure how that has been created. How can I do that? Regards Prashant
-
Error while creating Product Group in SOP
HI Gurus, When I am trying to create the product group in SOP in MC84 , I get follwoing error. "Product group cannot be created (batch input error 7) Message no. MA218" how to slove this? Thanks in advance. RG
-
Firefox cannot load certain websites
Dear FireFox supporters . First of all, I would like to apologize for my bad english, it is not my nativ language. I have FF22 on Windows 7 . I don't know what happen but Suddenly some site couldn't be on opened , For example i can open Youtube & Goo
-
IMac still wants to connect to LogMeIn!
Hi there, I opened Console and noticed that every few seconds I got this message 22/09/2012 17:52:16 com.apple.launchd[1] (com.logmein.hamachi[274]) posix_spawn("/Library/Application Support/LogMeIn Hamachi/bin/hamachid", ...): No such file or direct
-
Class members don't override via inheritance in Java?
Consider following code: class A protected int v=1; void print() System.out.println(v); class B extends A protected int v=2; public class m public static void main(String args[]) B kl=new B(); kl.print(); What do you think, what should be the program