About implementing the "add'" function in web dynpro

hi guyes,
now i want to implement the "add" function in the webdynpro. i bind a model node to the inputfields. and then i call the webservice ,but it does not work . the webservice is good . what happened to my project on earth? can anybody tell me what i should pay attention to in my code? my node structure is below:
AddTicketworkhour==
   ticketworkhourbean
       name
       remark
   userId
the root node is AddTicketworkhour ,it contains ticketworkhourbean and userId,    ticketworkhourbean contains name and remark.
Thanks A Lot !

public onActionSave(  ){
wdContext.currentAddWorkscheduleBeanElement().setConsultantName("qinlei");
    wdContext.currentAddWorkscheduleBeanElement().setDistrictName(wdContext.currentDisplayElement().getName());
    wdContext.currentAddWorkscheduleBeanElement().setRowId(123456789);
    wdContext.currentAddWorkscheduleBeanElement().setLocation(wdContext.currentDisplayElement().getRowId());
    wdContext.currentAddWorkscheduleBeanElement().setWorkerId(12345678);
    wdContext.currentAddWorkscheduleBeanElement().setWorkDate(new Timestamp(wdContext.currentContextElement().getWorkDate().getTime()));
     wdContext.currentAddWorkscheduleElement().setUserId(100);
    boolean result = wdThis.wdGetMyWorkscheduleUICompController().addWorkschedule();
wdDoInit( ){
MyWorkscheduleAddModel addModel = new MyWorkscheduleAddModel();
                AddWorkschedule addWorkschedule = new AddWorkschedule(addModel);
                WorkscheduleBean addBean = new WorkscheduleBean(addModel);
                addWorkschedule.setBean(addBean);
                IAddWorkscheduleElement addWorkscheduleElement = wdContext.createAddWorkscheduleElement(addWorkschedule);
                wdContext.nodeAddWorkschedule().bind(addWorkscheduleElement);
Is there anywrong with my wdDoIt( )?
谢谢!

Similar Messages

  • How can I set a polygon's path by using the .add() function?

    I have been searching the web and this forum and doing plenty of experimenting, and I can't for the life of me figure out how to do this.
    I can set other attributes of a polygon inside the add() parentheses, such as the fillColor, but I can't set the polygon's path's pathPoints unless I use a separate line of code after the add(); line.
    My script adds a great deal of polygons in a row, so halving the number of operations would greatly help me, and also it seems that some properties such as appliedObjectStyle cannot be set until after a polygon's path is defined. That means I need a third line of code after add() and entirePath=, which slows me down even more.
    Help?

    Ryan, I think you need to reset and take a moment to understand what it is that is going on here.
    The things you've proposed that don't work shouldn't work, and it's all quite simple.
    Generally speaking, a .add() function takes an additional parameter, a JavaScript Object, that list properties of the created object that can be set.
    A JavaScript Object is a list of key/value pairs, just like an associative array in a language like perl, or a dictionary in a language like Python. It is expressed in curly braces as such:
    { key1: value1, key2: value2, key3: value3}
    So, for any such general add function, these
    foo = whatever.add();
    foo.bar = baz;
    are equivalent to this:
    foo = whatever.add({bar: baz});
    Are you with me? So, for instance, you had originally asked why you could not use pathPoints in polygons.add() and the answer is simpe. You cannot set polygon.pathPoints, because there is no .pathPoints property of a polygon.
    So, when you want to try add properties inside properties, you must do as as objects within objects, and follow the strict hierarchy. Marc advises that this works:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
    and if indeed that is so, then the extension for setting multiple transparencySettings should be clear. It is not this, that you propose:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
        transparencySettings: {dropShadowSettings: {distance:1}}
    Because to do so is to set the transparencySettings key twice in the same Object. And to do that is to replace the first with the second. The above (yours) is wholly equavelent to:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {distance:1}}
    If you wish to set more than one attribute of dropShadowSettings, you must set transparencySettings to an object containing one and only one dropShadowSettings, and you must do it only once. So it is this:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings:
          {dropShadowSettings: {angle:120, distance: 1}}
    I am not sure why you thought you should have the name of the key in the Object named properties. That is probably because in some cases you can use:
    foo.properties = { a: 1, b: 2};
    as a shorthand for
    foo.a=1;
    foo.b=2;
    but you would [probably] never want to mix that with the object notation for setting multiple properties in the .add() function.
    Does this help to clarify?
    As for your last question:
    Also, it doesn't let me use square brackets or parentheses inside the add() parentheses, so the original problem I posted (trying to set a polygon's path) is still a problem.
    It's not about the use of brackets or parentheses, but what they mean and where they go. As you have not posted an example of setting the polygon's path the long way, it's hard to show you how to shorten it. Post what you have that works, and we will show you how to shorten it. (I suppose some with more patience than I are willing to go look up what we think it is you are trying to do, and then interpret it. But I would much rather you show me the code you have that works, and then your attempts to transform or shorten it and change its notation. This makes it much much easier to help you, and it should also make the help more effective, by contextualizing it. As an added benefit, when someone else reads your post and tries to learn from it, they will gain more.)
    So again, please provide a clear example of the "long way" to do the thing you are attempting, and then your attempt at shortening it.

  • Accessing ABAP Functions in Web Dynpro Java

    Hi,
    I am trynig to do "Accessing ABAP Functions in Web Dynpro Java" this application, (which is the example application which i got from www.sdn.sap.com) but everything is fine no error also while dyploying.
    But it is not dysplaying the first page after i run the application i am getting plain web page ,without any content.
    Can any body help me.
    Regards,
    H.V.Swathi

    k.. now iam getting some error on page.
    I have embeded the two view in to window.
    But now after running the application i am getting connection error
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=jktr3 GROUP=SPACE R3NAME=R32 MSSERV=sapmsR32 PCS=1 ERROR Group SPACE not found TIME Fri Sep 26 15:05:59 2008 RELEASE 700 COMPONENT LG VERSION 5 RC -6 MODULE lgxx.c LINE 4288 DETAIL LgIGroupX COUNTER 1
        at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:457)
        at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:989)
        at com.sap.mw.jco.JCO$Client.connect(JCO.java:3193)
        at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:90)
        at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:122)
        ... 61 more
    Rgards,
    H.V.Swathi

  • Programming Key Functions in Web Dynpro Java

    Hi, "Amigous"
    How can I Programming Key Functions in Web Dynpro Java, like F1, F2, F3...??
    Thanks in advance.
    P:D. I don´t have Swine Flu.

    Hi,
    Please see the below link.
    [http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_I.pdf]
    Regards
    Krishna

  • KM functionality in web dynpro. Missing file: TutWD_KMBrowser_Init.zip

    Hi,
       in pdf documentation "Using Knowledge Management Functionality in Web Dynpro Applications" is mentionated TutWD_KMBrowser_Init.zip file for downloading, but I can't find it following the path suggested.
    Could you help me?
    Thanks,
    Luca Grilli

    Hi,
    There is no resource in the said location
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/tutorial on using knowledge management functions in web dynpro.htm  ...
    Kindly help in finding some document which gives a overview of using KM UI APIs .
    Regards,
    Vani Rao

  • Delete a file from the KM in a Web Dynpro application

    Hello,
    We need to delete a file from the KM in a Web Dynpro application.
    We have a file name (filename.txt) and its path (/documents/Test/), how can we completely delete the file from the KM?
    Thanks,
    Gil

    Hi venkata reddy,
    You wrongly mentioned  system admin instead of content admin
    Go to Content administration not in the system administration
    if u delete the file manually in the portal  you can go with
    go to Content administration  -> KM Content -> go to Particular document -> just tick the check box which doc u want delete -> go to selection -> u will find delete .
    Regards,
    P.Manivannan

  • Possible to change the charset of a Web Dynpro Application ?

    Hello All,
      Does anyone knows if this is possible ? To be able to change the charset of a Web Dynpro application or even changing it dynamically ? Thank you.
    from
    Kwok Wei

    Hello Anilkumar,
      Sorry for not elaborating further again (This is getting to be a habit ;p).
      I have the document on "international of wed dynpro application" but it appears to be more on customising the label fields to reflect the corresponding text in different languages. This is indeed a very cool idea. However, the reason why I am asking if it is possible to change the charset is because (do correct me if I am wrong)I need to display japanese and english characters and to do that I need to change the charset so that Web Dynpro can have them displayed properly. Is this assumption correct ?
      I have actually log a CSN ticket on this query as well and this is the reply "...... My understanding is that with Web Dynpro Java being based on Unicode, we don't need to charset settings. One should be able to display both Japanese and other characters in parallel, automatically, without problem."
      Your comments please. Thank you.
    from
    kw

  • 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,
    SeMs

    Hi,
    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 bind data (from database) to the Dictionary structure in Web Dynpro

    Hi,
    I am getting Hashtable object from the database related classes and I want to bind this data to the Dictionary field in Web Dynpro. So, I can bind this Dictionary field type to the Context variable.
    Please let me know the detailed procedure.
    Thanks
    Tatayya M

    Tatayya,
    Look at this sample tutorial , It will defintely help you with the Data Dictionary .
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/38650ecd-0401-0010-10a0-f9d8fd37edee

  • Error «The entered value is not on the list of valid values» in the hierarchy of mss web dynpro abap

    Hello Experts
    The error «The entered value is not on the list of valid values» in the hierarchy of mss web dynpro abap occurs after manager’s following actions:
    selected detailed Team View ;
    selected hierarchy;
    changed style of the hierarchy to any other (for example, the vertical);
    the error occurs after attempting to do any action.
    Our system is EHP7.
    If someone faced with this error, please give me advice how can i resolve this problem.

    Hi John,
    Sorry for the delay in replying. No, we do not have the same problem if we understand you correctly.
    "We have bypassed the MSS Home Page and just embedded the Detailed Team View as a standalone application in our MSS portal role" - we also made for the our customer. BUT we have error «The entered value is not on the list of valid values» in our standard system.
    Regards,
    Andrey

  • When i am tring to insert the option Utilities- Insert Web Dynpro Script

    When i am tring to insert the option Utilities->Insert Web Dynpro Script
    I am getting the error like Error when inserting webdynpro script thats it.
    Can you please help me in this.

    If you are getting an error when inserting the script, make sure that you have set the Layout Type on the properties tab of the form to ZCI Layout.  If the problem persists you should enter a support ticket, as such an error is not a normal occurance.

  • How-to add a custom Web Dynpro iView to the MSS Employee Profile

    Hello everybody,
    i have created a small How-to guide of how to add a custom iView/Web Dynpro application to the standard MSS Employee Profile for ECC 6.0.
    The How-to guide can be found <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/04/15/How-toaddacustomWebDynproiViewtotheMSSEmployee+Profile">here</a>
    I hope its of any value.
    cheers,
    Markus

    Hello Luca,
    unfortunatelly it wont work. A WDA Application does not have access to the Floorplan Manager for XSS Applications. So until SAP develop an interface, you have to stick for such a task to WDJ.
    regards,
    Markus

  • How to add many lines in the Text View in Web Dynpro

    Hi friends,
    I have one Text Edit in Web Dynpro. I need to show the result of FM READ_TEXT in Text Edit View element, without lose the text format.
    Cardinality of my node is 0:n and attribute datatype is string_table. after assigning the values using bind_table method, I am getting only the first row of the read_text returns...
    By
    deva

    Hi Deva,
    Text View is not meant to be bound to string_table. Create a string instead and convert that string table into that string with
    <br>
    between each row of string table. TextView component will make <br> into new lines. Code will be similar to following.
    DATA: ROWS TYPE string_table,
          top type string,
          result type string.
          loop at rows into top.
            concatenate result top into result separated by '<br>'.
          endloop.
    Now bind this result string to the text view component. It ll work. Hope it will be helpful for you.
    Regards,
    Fareez

  • Callback functionality in Web dynpro

    Dear Experts,
    How i can implement a web dynpro application which gets updates from server without any interaction from the end user? in the same time I dont want to trigger a full refresh using timed trigger as this will slow the application.  is there any functionality like Ajax partial refresh or callback functionality?
    Best Regards
    ebrahime

    >
    ebrahime wrote:
    > Dear Experts,
    > How i can implement a web dynpro application which gets updates from server without any interaction from the end user? in the same time I dont want to trigger a full refresh using timed trigger as this will slow the application.  is there any functionality like Ajax partial refresh or callback functionality?
    >
    > Best Regards
    > ebrahime
    If you want to update with ajax a web dynpro application, you can not do this In CE 7.1 or earlier (I really don't know about 7.11). You can do this for example with a portal application, if it isn't something specific for the wd application you can move it outside and place it somewhere with your wd application, some playing with the pages will do this work.
    You can do another thing: place a portal application, which will be invisible and will call some web service via ajax and use portal eventing to "inform" your we dynpro application. But in this case when you receive the event it will behave like the timer trigger, it will redraw you page.

  • Accessing ABAP Functions in Web Dynpro

    Hi all,
    for testing reasons I would like to implement a simple Web Dynpro Application which access APAP functions (or BAPIs) on a remote SAP backend system. The problem is that I dont have a SAP backend system
    There is a tutorial :
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/355b9c90-0201-0010-d2a8-89fece426526">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/355b9c90-0201-0010-d2a8-89fece426526</a>
    which states some prerequisites.
    My question:
    Is it possible to comply to all these prerequisites by installing NetWeaver Preview and minisap as remote SAP backend system ? Where can I get minisap ?
    I'm quite new to SAP so I'm al little unsure which part belongs where.
    Maybe someone can give me a hint.
    Thanx a lot

    Hi Oliver,
    here you can download all you need:
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/cfc19866-0401-0010-35b2-dc8158247fb6
    Note: read the column comment in the page to understand what you need (java or abap stack).
    Hope this help you,
    Vito

Maybe you are looking for

  • Count Function Specific with Cross Tab Name for Multiple Cross Tabs

    Hello Friends I have cross Tab1 and Cross Tab2 based on 2 query data providers. I need to feed calculate the Count of Items in Cross Tab1 and DISPLAY In cross Tab2 Dimension name is ITEM ID So if there are 21 items in Cross TAB1 then in Cross TAB 2 I

  • Control-Hints are suppose work with UIX/XML, right?

    Control-Hints are suppose work with UIX/XML, right? I've added some control hints and they worked correctly when viewed using UIX/JSP pages. However, none of the Control-Hints appear on UIX/XML pages. The documentation suggests that this should work.

  • Windows update not working on new Dell Inspiron 7000 (7537)

    I currently have Windows 8 on my new dell inspiron (actually refurbished) 7000.  Only things I've done since getting the computer:  I removed McAfee and turned on Windows defender (which also won't update).  Windows update shows about 93 updates but

  • "Formatting failed" - why?

    Sometimes I get "Formatting Failed". I have tried different assets, different length of videos and other ways of creating an hard disk image file. Right now it is at a complete halt. The build is OK. This project is without a menu and one videotrack

  • RE: Color Checker

    Hello Every one I have a question please and I appreciate it very much if you could help me. I was watching a Tutorial on Color Checker and I want to make sure I am doing it Correctly. I shot some pictures,  and I also shot a picture from a Color Che