How to addRecord in Web Dynpro to Model node (Entity Service ref)

Hi,
1) I create Entity Service in CAF and try to write web dynpro Table UI for it.
2) is it possible with using Model Node? or I MUST use Value Node - Table must have possibilities for Add, Edit and Delete records.
Now I can edit, and delete records, but I can't add records with AddRecord method
Code below
  public void NewTS( )
     //@@begin NewTS()
   IServiceFacade serviceFacade;
// Add new Model object TS
   ATS ts = TSServiceProxy.create();
   ts.setDate( new Date(System.currentTimeMillis()));
   ts.getAspect().sendChanges();
   serviceFacade = CAFServiceFactory.getServiceFacade(tsDefinition.class);
// try to addRecord to Controller context     
   IWDNodeElement n = wdContext.nodeTS().createElement(ts);
   wdContext.nodeTS().addElement(n);
The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException:
Aspect row is invalid for aspect:   <Aspect name="TS" >
Thx for any help

Hi Nikolai,
implement it in the following way:
wdInit()
     IAspect originalAspect = TSServiceProxy.FindByName(employee) ;
     wdContext.nodeTS().bind(originalAspect)
     //just create new attribute this java native type IAspect
     wdContext.currentContextElement().setOriginalAspect() ;
public void NewTS( )
//@@begin NewTS()
     IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
        IAspectRow newTS = originalAspect.createAspectRow() ;
        newTS.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
or
public void NewTS( )
     IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
        IAspectRow newTS = originalAspect.createAspectRow() ;
     ITSElement tsElem = wdContext.nodeTS().getTSElementAt(originalAspect.indexOf(newTS)) ;
        tsElem.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
Best regards,
Aliaksei

Similar Messages

  • How to guide for Web Dynpro

    Could u please tell abt "  How to guide for Web Dynpro ".
    Where i can get details for webDynpro
    Regards,
    Vibhuti

    Hi,
    Check with SDN link.
    Getting Started with Web Dynpro [original link is broken]
    Also Check with the SAP Help link.
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/1a1e3e7181b60ae10000000a114084/content.htm
    Regards,
    Maha

  • How to Login to Web Dynpro developer studio in real time scenario.

    Hi,
    1. How to Login to Web Dynpro developer studio in real time scenario.
    Do we have login pad and User id to enter developer studio.
    Is the user id for login maintained in UME of J2EE engine.
    2. How to stop and start j2ee engine in real time. Is it same SAP Management console is used like in Demo version.
    3. If I use central server, Do I have to install GUI like SAP R/3 GUI to Develop, test and deploy my application.
    Cheers,
    Sam

    Hi,
    What do you mean with real time scenario? Do you talk about runtime?
    NetWeaver Developer Studio (NWDS) is only for design time and you install it on the local PC/laptop of the developer. The 'connection' between NWDS and engine is specified in the preferences (Window->Preferences->SAP J2EE engine) of NWDS. The development track is in 'real life' (e.g. if the engine is a remote one) connected with support from SLD (System Landscape Directory) which is a tool for managing the NWDI (NetWeaver Development Infrastructure). In normal case, there are so-called 'development configurations' that can be imported into NWDS (Window->Preferences->Java Development Infrastructure).
    For starting and stopping the engine, there are several possibilities: SAP MMC, view in NWDS or console.
    If you've a central server, you connect your NWDS to this central server and then you can deploy to this central server.
    Regards,
      Jan

  • How to Logon to Web Dynpro developer studio in real time scenario.

    Hi,
         1. How to Login to Web Dynpro developer studio in real time scenario.
             Do we have login pad and User id to enter developer studio.
             Is the user id for login maintained in UME of J2EE engine.
         2.  How to stop and start j2ee engine in real time. Is it same SAP Management console  is used like in Demo version.
         3. If I use central server, Do I have to install GUI like SAP R/3 GUI to test and deploy my application.
    Cheers,
    Sam

    Hi,
    What do you mean with real time scenario? Do you talk about runtime?
    NetWeaver Developer Studio (NWDS) is only for design time and you install it on the local PC/laptop of the developer. The 'connection' between NWDS and engine is specified in the preferences (Window->Preferences->SAP J2EE engine) of NWDS. The development track is in 'real life' (e.g. if the engine is a remote one) connected with support from SLD (System Landscape Directory) which is a tool for managing the NWDI (NetWeaver Development Infrastructure). In normal case, there are so-called 'development configurations' that can be imported into NWDS (Window->Preferences->Java Development Infrastructure).
    For starting and stopping the engine, there are several possibilities: SAP MMC, view in NWDS or console.
    If you've a central server, you connect your NWDS to this central server and then you can deploy to this central server.
    Regards,
      Jan

  • How can I change the cardinality of Model Node?

    Hi everybody
    How can I change the cardinality of Model Node?
    Previous:
    I import a Model RFC, and some nodes has the cardinality 0..1, but with this configuration, when I bind to the text fields of my webdynpro and deploy, all my fields text are unables when I shows the webdynpro.
    I check RFC and all the fields and estructures are obligatories.

    Hi Jesus,
    You cannot change the cardinality of the model node. All  the properties of the Model node are derived from the Model object.
    Your input fields are disabled because you are not creating your model object properly.
    You can import the example project TutWD_FlightList, which is available in c:\Program Files\SAP\IDE\IDE70\eclipse\examples.
    Import it in NWDS and you can see how to initialize model object properly.
    Thanks
    Prashant

  • How to use different Web Dynpro Applicat. in one view?

    hello all,
    i want to call at least 3 different Web Dynpro Applicat as main view in one component configuration (or as subtables in one page in portal).
    can anyone please show me how to resolve this?
    thank you
    SR

    in one Portal page, i have several subtables that they are mapped to the same webdynpro application, and i want add an other subtables to the others, but that one has/mapped to a different webdynpro application..
    exampl :
    one portal page containes a subtables that have at the moment only one Web Dynpro Application( HRTMC_01) and  Web Dynpro configuration(ZHRTMC_01)  so, i want to add another subtables that have another Web Dynpro Applicat(HRTMC_02) and a different Web Dynpro configuration(ZHRTMC_02).
    please show me how can I do this?
    thank you all

  • FPM Form Scripting - How to call a web dynpro application as pop up

    Hi All,
    I want to call a web dynpro application as a pop up from FPM form scripting.
    Like click on button -Maintain Approval Routing in a FPM form i want to open a web dynpro pop up..
    Thanks In Advance.

    Refer to the post How to show pop up’s in WDA HCMPF by Yugandhar Reddy - on some hints
    Hope this helps.
    Regards,
    Sahir.

  • How to create a Web Dynpro Project from Downloaded zip file?

    Hi,
    I have been working in Java Web Dynpro for last 1 month but not able
    to create any Web Dynpro from Downloaded zip file?
    Can anybody tell me how to create a Java Web Dynpro Project from
    Donloaded zip code?
    Regards
    Kaushik Banerjee

    Hi Kaushik,
    You can add the existing zip file into your workspace by the following way -
    First open the NWDS and create a new project by clicking file -> new -> Project -> Simple -> Project
    and then File -> Import -> zipfile and then browse the zip file into the newly created project.
    or else you can also unzip the zip file into a folder and then Use the option of Import an exisitng project into workspace. You can find this in the File-> import -> Existing project into workspace. and then use the Browse option to browse to the existing folder.
    After importing the project you need to rebuild the project
    Regards,
    Raju Bonagiri.

  • Web Service as Web Dynpro tableView Model

    Hi people!
    I´ve developed a WebService with a findAllClients method which brings out all the rows from a MaxDB table. Everything works fine when I test it from de WebServices perspective, but when I create a model for my Web Dynpro tableView importing the mentioned WS, I get the following error message:
    The Java type of the cmp-field that is stored in column ID, table DB_CLIENTES does not fit to the JDBC type INTEGER of the column. The expected JDBC type is VARCHAR.
    I´ve set the built-in type of the column ID in my Java Dictionary project to integer. The corresponding CMP-Field in the entity EJB is java.lang.Integer. I´ve deleted the column from the tableView.
    What´s wrong? Any idea please? Where could I find some documentation about this mapping requirements topic?
    Thanks very much in advance.

    Is this the only way?
    Anyways, thanks a lot. I haven't been working with ODI yet, I just have to find out, if it is possible to use it for our project. So I just read through the user's guide...

  • Problem with Complex Web Dynpro Webservice Model

    Hi all,
    in my Web Dynpro application I am using a Webservice which seems to be too complex for the Web Dynpro Model. I think I am getting the same kind of problems like:
    HELP for WebDynpro web service model with complex structure
    But I dont have a complex structure in my input parameters (like in this thread), <b>I have a complex structure in my output.</b>
    This is the structure of my WSDL. I have a customer (KUNDE) which has an array of contracts (Vertrag).
    <wsdl:types>
      <schema targetNamespace="urn:Rentenkonto" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="Vertrag">
        <sequence>
         <element name="aufschubfrist" type="xsd:int"/>
         <element name="brutto" type="xsd:double"/>
         <element name="eintrittsalter" type="xsd:int"/>
         <element name="endalter" type="xsd:int"/>
         <element name="laufzeit" type="xsd:int"/>
         <element name="renteKapital" type="xsd:double"/>
         <element name="rentenbeginn" nillable="true" type="xsd:dateTime"/>
         <element name="rentenbeginnAlter" type="xsd:int"/>
         <element name="versichererName" nillable="true" type="xsd:string"/>
         <element name="vertragsablauf" nillable="true" type="xsd:dateTime"/>
         <element name="vertragsartTx" nillable="true" type="xsd:string"/>
         <element name="vertragsbeginn" nillable="true" type="xsd:dateTime"/>
         <element name="vertragsnummer" nillable="true" type="xsd:string"/>
         <element name="zahlungsweise" nillable="true" type="xsd:string"/>
        </sequence>
       </complexType>
       <complexType name="ArrayOfVertrag">
        <complexContent>
         <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Vertrag[]"/>
         </restriction>
        </complexContent>
       </complexType>
       <complexType name="Kunde">
        <sequence>
         <element name="geburtsdatum" nillable="true" type="xsd:dateTime"/>
         <element name="kundenkennzeichen" nillable="true" type="xsd:string"/>
         <element name="pkNummer" nillable="true" type="xsd:string"/>
         <element name="vertraegeDcKapital" nillable="true" type="impl:ArrayOfVertrag"/>
         <element name="vertraegeDcRente" nillable="true" type="impl:ArrayOfVertrag"/>
         <element name="vertraegeDv" nillable="true" type="impl:ArrayOfVertrag"/>
         <element name="vertraegePk" nillable="true" type="impl:ArrayOfVertrag"/>
         <element name="vertraegeRdv" nillable="true" type="impl:ArrayOfVertrag"/>
        </sequence>
       </complexType>
      </schema>
    </wsdl:types>
    When I execute the Webservice basically I get an empty response. I think this is because the WSModel isnt fully mapped to the WS proxy. This should be done via coding.
    Can someone give me some hints on this?
    Kind regards
    Christoph

    Hi Christoph,
    First test the webservice itself. Maybe it is required to give some input parameter in the request and then get some output parameters in the Response. But therefore you should test the webservice yourself and take a look.
    Give more detail about ur case.
    Greetings, Sandhya

  • CRM2007 How to add a Web Dynpro ABAP application to a CRM business role

    I am investigating CRM2007 UI framework and I cannot seem to find a way to add a custom made Web Dynpro ABAP Application (created in CRM 4.0) to a business role, or how to add a custom transaction created in classic ABAP (transaction created via se93, progam created via se38). Whatever I do, I only see BSP components. I am using transaction BSP_WD_CMPWB.
    Next to this it seems you can add/integrate Visual Composer applications to (there is an entry in spro called "integration of the visual composer in BI"). However, I presume we first have to meet the requirements for the portal integration in SAP CRM 2007 as described in spro. If somebody knows how this works, that would be great!
    kind regards
    Angelique Heutinck

    Hello Angelique,
    It should be possible to call web dynpro applications from the L-shape menu of CRM UI (check transaction CRMC_UI_NBLINKS). As for the old GUI transactions, you can embedd them also via transaction launcher using CRMC_UI_NBLINKS (search for "transaction launcher" in this forum, there is plenty of information on it).
    Best Regards,
    Yevgen
    Edited by: Yevgen Trukhin on Jun 19, 2008 11:53 AM

  • How to integrate backend web dynpro abap application in Portal 7.3?

    Hello,
    before Portal 7.3 I was able to integrate a web dynpro abap application as iView in the portal. Now I don't get the point on how to do it. I cannot find a "normal" iview that enables me to give the backend and the application name. The possibilty to create iView based on remote source looks strange because I don't want to upload the application I just want to do my normal user/pass mapping and show the applicaton via iView.
    Somehow I don't get the point with the new version. Could someone give me a hint where to find more information regardings this problem`?
    Thanks a lot,
      Vanessa

    Hi Vanessa,
    Could someone tell me if I should see the SAP Web Dynpro for ABAP iView template in the long list of available templates when I create a new iView?
            You will 'SAP Web Dynpro iView' option in the list while creating iview from template.Create and change the property platform to 'Web Dynpro for ABAP'.
    Is it correct not to use the remote source option? I think yes because otherwise he would upload the app to the portal, if I am not wrong.
         If i understood your question correct,then You can use this option as well to create iview.Atlast it wil create only iview for the application not the application itself in the portal.
    Naga

  • How does Time Statment Web Dynpro calls an Adobe Form of R3?

    Hi forum
        I want to know how works the Web Dynpro of Time Statement. The cause of my dude is that this dynpro shows an Adobe Form that is into R3, not in NWDS and Adobe. I want to calls some Adobe Forms since a Web Dynpro for Java. Some body knows how to do this.
    Thnks
    Josué Cruz

    Hi,
    If you go for TC HRFORMS, there you can find some HRFORMS global. we need to activate that form and configure the feature called "HRFOR". This works once implemented time evalution.
    Thanks & Regards.

  • How can we creat web-dynpro in SAP 4.6c?

    Hi Gurus,
    I'm new to the Web-dynpro technology, please help me in creating a simple web-dynpro.
    My questions are:
    1. can we create web-dynpro in SAP version 4.6c?
    2. If yes then how?

    Hi Manjesh,
    You cannt develop Web Dynpro's in 4.6C version. Web Dynpro's are introduced from ECC6.0 onwords.
    Check this document about Web Dynpro for ABAP
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/77/3545415ea6f523e10000000a155106/content.htm
    Edited by: suman kumar chinnam on Oct 17, 2008 12:51 PM

  • How to delete deployed Web Dynpro Content ?

    Hello again,
    simple question (i hope):
    How can i delete a deployed Web Dynpro Application from my portal ?
    Due to all these tests and trials there are a lot of useless WDApps in my portal.
    Did not find anything in help.sap.com or in the portal.
    Thank you !

    Hi Andreas,
    You can remove the deployed components through either SDM or through Visual administrator
    1) In SDM, you will find a tab 'UnDeployment'. In this view, you will be able to see all the applications currently deployed. Select the applications that you want to undeploy and proceed to undeploy.
    2) In Visual Administrator, under Server->Services->Deploy, you will find a radio button 'Application'. From here too you can select the required application and remove them.
    Hope this helps,
    Best Regards,
    Nibu.

Maybe you are looking for