Declarative Validation

Hi,
I have a master detail views in which master view has bind variables. one of the detail record's column value depends on the master record's column value. Is there any possibility to declaratively validate the detail record's column based on the master record's column value.
I tried with the Compare Rule on detail record's column to compare with the master view object's attribute. As the master view has bind variables, the validation is failing even I enter the correct data.
Can you please help in setting declarative validation for the detail view object's attibutes.
Thanks and Regards,
S R Prasad

I have a table with columns Control_Num, Accident_Date, Received_Date in the Master table. In the detail table I have Control_Num, Service_Date columns. The control number in detail table is foriegn key reference to control number in master table. We have to make sure the service_date in detail record should not be before the accident date and should not be after received date.
We have a bind variable(control_num) for the query on the master view object, which helps to fetch one master record at a time. The validation should happen for the detail record based on the correspodning master record.
Thanks and Regards,
S R Prasad

Similar Messages

  • Declarative validation on view objects

    Is it possible to set declarative validation on view objects(which override validation in underlying entity objects)?

    [Duplicate post|https://forums.oracle.com/forums/thread.jspa?threadID=2325821&tstart=0]

  • ADF BC declarative Compare  validator on date attributes

    Hello
    I trying to abandone validation on the UI beans by resorting to the built-in ADF declarative validation available at the Entity object level.
    I test the Compare validator between two numeric attributes and it worked well, also between two String attributes, but when i tried to compare two dates attributes the results of the validation was not correct.
    any reason as to why Entity based validation based on dates values does not give appropriate results
    rgds
    Ammar Sajdi

    We are using entity based declerative validations for Dates with no problem.
    Remember that Date type has also a time portion in database.
    may be there is your error.

  • How do you create custom validation rule in WS 9.2?!?!?!

    Hello,
    I am using Workshop 9.2. I created a page flow, and want to do some form validations.
    I saw the simple 9.2 example, but it is only good for very basic validation, what if you have to validate the form field against a database, must you write a custom validation rule? HOW would you do this in 9.2 so that will still stay with the workshop/netui paradigm?
    http://beehive.apache.org/docs/1.0.1/netui/validation.html
    Keith

    Hi Keith,
    Staying within the declarative validation framework the answer is probably that you do need to write a custom validation rule and refer to it using the @Jpf.ValidateCustomRule annotation.
    The NetUI Annotation Reference shows how the Struts validations are supported via the framework.
    http://beehive.apache.org/docs/1.0.1/netui/annotations/pageflow_annotations.html
    Specifically, if you look through the @Jpf.Validate* annotations, while most of these are "canned" common validations, there are a few that are more open-ended, such as @Jpf.ValidateMask and @Jpf.ValidateValidWhen.
    Those two let you write the validation logic in the annotation while @Jpf.ValidateCustomeRule only refers to a custom rule in the struts validator file.
    In any case, there is a validation rule editor which should help in authoring and managing the annotations. In the Page Flow Explorer or Page Flow Editor just right click on the action or form bean bean of interest and choose Validation Rules and the appropriate scope.
    I hope that's of some use,
    Troy

  • ADF Model Validation using JPA/EJB stack.

    Hi,
    We are evaluating 11g and are interested in implementing using a JPA/EJB3.0/Toplink - EJB Session Bean - ADF bindings - ADF Faces RC stack.
    Looking at the declarative validation rule framework, I am trying to determine whether I can define domain model validation rules that can be propagated up through to the ADF faces RC layer. We have looked previously, at the ADF BC framework and note that it can be done there, but we wish to use a pure EJB/JPA solution.
    I can see how validation rules can be declared at the page bindings layer in the pageDef file, and this all works. However, these same validation rules applied to the Structure Definition <entitybeanname>.xml file, do not propagate up through the ADF binding layer, although the xsd of the structure definition file does appear to support it. The documentation I have read is somewhat ambigious as to whether this is possible.
    Basically, it would be nice to have some form of domain attribute validation that can be defined against the entity bean attributes that is available in the service and UI layer ala Hibernate Validator etc...
    Anyone, got any suggestions?
    regards,
    andy

    I'm not sure I understand what the "ADF own transaction operation" is. Could you explain?
    If you have to write your own persist method, what's the proper way to go about doing this? Is there a tutorial to be found somewhere? What I have now has been created by following the tutorial linked above, I haven't modified the code yet. Looking at the code I found this:
    jTable1.setModel((TableModel)panelBinding.bindUIControl("tableNameFindAll",jTable1));
    Where tableNameFindAll is related to a named query TableName.FindAll.
    There seems to be a data structure named "UpdateableCollection" which provides the operations such as 'create', 'next', 'first', etc. Would a subclass of this be the proper place to put a 'commit' function? I'm assuming through the bind control I could gain access to either this UpdateableCollection or the list of entities (List<tableName>) then I suppose I could go through this list and persist the new ones. But I think this doesn't fit with the paradigm as these are data control operations not interface operations. So I'm wondering where should I put the 'commit' operation (which should both add new data and merge the updated data) and how do I bind it to the interface? I just couldn't find a tutorial explaining all of this, but perhaps it's out there.
    Thanks.

  • Built in Constraint Validation before DML

    I have generated Business Components from DB Tables and FK's. When I run the AM in testmode, I expected the Entity Constraints to be checked either upon item validation time or at DML time. But the framework tries to commit invalid data (e.g. child rows w/o matching parent rows) to the DB and displays the resulting Oracle Error as SQLException. Was I expecting wrong, or have Entity Constraints never been thought to be validated at runtime ? If the latter is true, is there any way to generate declarative validation logic for the EO's that reflect the Entity Constraints besides of the not null Check Constraints? I find the need to declare validation logic which matches information accessible for JDev not a task compliant with "productivity with choice".
    And, what is the Key Properties meaning in the Entity Constraint Editor - Properties dialogue ?
    I find it an advantage to test the constraints before performing DML, as does good old Designer generated Forms (no rolled back TX, more accurate user information possible).

    You can expose accessors for each end of an association. For example, say you have tables Emp and Dept. If you have an association between them (joining Emp.DeptId to Dept.Id for example) you can expose the accessors. Then, in the EmpImpl.java file you could use that accessor to get at the associated record in the Dept table. You could then check to see if there is an associated record by calling the getDept() method call in the EmpImpl.java file. I'm not sure how accurate this is, I'd have to look into it further, but it doesn't matter for me because I am commiting on every action so the cache should always be consistent with the DB (except during this transaction obviously)...
    If you need more information on using this method I suggest opening a new thread specifically about it.
    I used to be of the opinion that you should check everything at the application level to save trips to the Database and cut down on DB load. However, there are things that a database does much better than application code, such as catching constraint violations. As such, I do basic validations and then send it to the DB if it passes. The only problem I have with this is that by default JDevloper throws really ugly database error messages which the average user will not understand. To bypass this I found that you can override the default error messages and create a lookup for error messages where you can catch the DB errors and provide user-friendly versions. I have forgotten the steps involved, but it uses the DBTransactionFactory and other classes... I will look for the old thread I got it from later if you like...

  • Dynamic Date range validation

    Hi all,
    I have 2 date fields in a page: Start Date, End Date. The Start Date should not be later than End Date.
    I don't know how to write a validation to control TWO fields. I cannot use the built-in ADF declarative validation at Entity Level, since I want to set the autoSubmit=true to do validation at realtime.
    What I have done is I created validator function for both fields, the function works fine except this:
    1. user input 1-1-2000 to Start Date, user input 1-1-1999 to End Date. the invalid dialog appears for end date
    2. user input 1-1-1990 to Start Date, but the End Date is still Invalid.
    Is there anyway to fix this problem?
    I am using Jdeveloper 11.1.1.2 with ADF BC.
    Regards,
    Samson Fu

    I found the solution for this, post here for anybody have the same problem.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/interfieldValidation.jspx
    Regards,
    Samson Fu

  • Validation Order

    Hi all,
    Is possible to define the order of Validation of a Entity?
    I've defined a entity ProductEO, and it has Id, Description fields. Both are required, but Description has a Declared Validation Rules associated to it. It verify if Description contains invalid characters as *%$@, the problem is that my custom validation is executed and Description contains a invalid character, so a Exception is throw, after this the field is validated again and a Exception to Required Field is throw. In my GUI (Web Application) is show two messages, one to Invalid Characters and other to Required Field.
    Anybody knows a solution for this?
    Thanks

    Add the first validation in the setter method, and the second validation as a method validation for that attribute.
    check this:
    http://mjabr.wordpress.com/2011/05/21/add-business-rule-in-the-setter-method-of-an-entity-attribute/

  • Custom validation rules

    Using adf/bc with jdev 10.1.3.3. I've created a custom validation rule class according to the instructions in the adf guide. In that class, I've defined just one property, along with its getters/setters. I've registered my rule in the business component project and associated the rule to an entity attribute via the entity object editor. My problem is that I don't see any way for me to set the property/value of the property that's defined in the validation rule class. For example, in the SRDemo app, in the entity editor for ServiceRequest, if you highlight Validation in the left pane then select the AttributeMustExistInViewRowRule for the Status attribute and click the Edit button, you can set various property values that have been defined in the validation rule class. These values appear to then be updated to that entity's xml file. When I'm in my entity object editor and i've assigned a validation rule to an attribute, I can type in the error message text in the Edit Validation Rule dialog, but it says there are no properties to edit! I guess I haven't wired something together quite right? Note, I have not created the customizer and bean info classes for the design time aspect of this stuff. I assume that you do not absolutely need these classes to create and work with a customr validation rule? Anyone know what I'm doing wrong?

    ok, i figured out the problem. The property/value fields in the Edit Validation Rule dialog will not appear until you've actually compiled the custom validation rule class. I had tried to create the validation rule class, register it with the bc project, and assign it to an entity attribute all without first compiling the class. I stumbled upon this 'fix' in jdev's help, which leads me to another question. For the help topic entitled Creating Custom Declarative Validation Rules for Oracle ADF Business Components, the instructions have you create a class that implements JbiValidator and provide implementation for the method vetoableChange, from which you typically call validateValue. The adf guide's example has the custom validation rule class that extends AbstractValidator and implements JboValidatorInterface. In this example, you provide implementation for the validate method. What's the difference between these two approaches and when should I use one over the other? Thanks.

  • Validation using a DB function

    Hi,
    I am trying to add declarative validation for a field. The validation is a complex one whose logic resides in the database (let's call it is_valid_part).
    There are 2 pages, first page they enter a part, and on the second they get some part info. I'm using a transient VO, and hoping to stop the user at the first page if the is_valid_part doesnt pass.
    is_valid_part takes 2 parameters - the part number and the logged in user's ID.
    I saw this blog: http://andrejusb.blogspot.com/2010/04/implementing-custom-generic-plsql.html, and other examples on custom validator using backing bean, but they dont talk about how you can pass any other value other than the value on the field (in this case part number). In my case I am trying to pass in both the part number and user's id, which will come from a backing bean.
    I can write a method in the AM but I am trying to as declaratively as possible. Any suggestions?
    Thank you
    Kalp

    Thank you. Looked at the page you provided, but it mentions that "For an attribute-level validator, the method must take a single argument of the same type as the entity attribute. " That is, it can only use the value of the part number, and I cant pass in user id. i'd said user id for simplicity, it's actually a user related ID that is coming from another transient attribute that stores that info, and I will pull that into a managed bean..
    So is an AM method the only way to go? Or there is some other way to allow validation rule to accept 2 parameters?
    thanks!
    kalp

  • Actionlistener and validation logic

    Hi,
    How to prevent the execution of the valueChangeListener code on a field if the attribute level declarative validation fails.
    As an example, I have specified the validation logic on a specific attribute in the entity object. In the user interface, I have specified the valuechangelistener on the same attribute. The valuechangeListener code is getting executed even though the validation fails.
    Thanks and Regards,
    S R Prasad

    I set immediate to true and it is still executing the valuechnagelistener code.
    My assumption is correct if the immediate property is set to true on command items :). But if I set immediate to true on inputtext, as per the document it skips validation on the other components in the same form if the validation on the field fails.
    I need to prevent the system to process valuechangelistener if the attribute validation fails.
    Thanks and Regards,
    S R Prasad

  • No data from a RFC imported in a Web Dynpro project

    Hi all,
    I'm experimentig an issue in an app that calls a RFC, the RFC is returning nothing, no message, no error, no data. I tested the RFC in R3 and is doing what is supposed to do, it was tested also in the SLD content manager and it responses well to the ping and test command.
    This is what am i doing in the component controller called Rgsm_Reload_Comp
    this in the wdDoInit:
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
         try {
                   Z_Ep_Ess_Gral_Get_Empl_Data_Input input = new Z_Ep_Ess_Gral_Get_Empl_Data_Input();     
                   input.setP_Usrid("GRAMIREZ");
                   wdContext.nodeEmpl_Data_Input().bind(input);
                   wdContext.currentEmpl_Data_InputElement().setP_Usrid("GRAMIREZ");
                   //input.setP_Usrid(wdContext.currentEmpl_Data_InputElement().getP_Usrid().trim());
              } catch (Exception e) {
                   IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportException("Error al inicializar la RFC de datos personales " + e.getMessage(), true);
        //@@end
    This in the execute Bapi method called from the view:
      //@@begin javadoc:executeBapGetDataEmpl()
      /** Declared method. */
      //@@end
      public void executeBapGetDataEmpl( )
        //@@begin executeBapGetDataEmpl()
        //Traemos los datos del empleado comunicandonos con la RFC Z_Ep_Ess_Gral_Get_Empl_Data
              try {
                   wdContext.currentEmpl_Data_InputElement().modelObject().execute();
                   wdContext.nodeEmpl_Data_Output().nodeHr_Personal_Out().invalidate();
              } catch (Exception e1) {
                   msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportException("Error al inicializar la RFC de datos personales " + e1.getMessage(), true);
        //@@end
    And last this in the Rgsm_Reload_ComView the view controller, the action to call the execute method in the component controller:
      //@@begin javadoc:onActionfindEmployee(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionfindEmployee(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionfindEmployee(ServerEvent)
        wdThis.wdGetRgsm_Reload_CompController().executeBapGetDataEmpl();
        //@@end
    I've followed all steps in online tutorials I found, but I don't know what is wrong, if somebody can help me on this I'll really appreciate it.
    Best regards,
    Ramien.-
    Message was edited by: Ramien  Rosillo

    Hi Kranthi,
    Yes I'm pretty sure of the input parameter, because P_Userid y conformed by first letter Name and followed with complete last name I.E "RROSILLO".
    Also I've found in a note how to activate log details in the Was I set it to all instead ERROR (as default shipped). On one of log files I found an exception:
    #1.5#001083FDED3400950000008900005CE9000409021814BBD4#1135804505426#com.sap.tc.webdynpro.progmodel.context.Node#sap.com/tcwddispwda#com.sap.tc.webdynpro.progmodel.context.Node.getParentElement#J2EE_GUEST#192##cssapq01.corp_I10_95141350#Guest#0325f1a077e711dabfea001083fded34#ID\#(cssapq01_I10_09)ID1950194550DB11983431035475623143End.d41a077077e611dac48e001083fded34##0#0#Debug##Java###: retrieving parent element#1#Node(Rgsm_Reload_CompView.Empl_Data_Input.Output.Hr_Personal)#
    #1.5#001083FDED3400950000008A00005CE9000409021814CB9A#1135804505430#com.sap.tc.webdynpro.serverimpl.core.localization.AbstractResourceHandler#sap.com/tcwddispwda#com.sap.tc.webdynpro.serverimpl.core.localization.AbstractResourceHandler.getString#J2EE_GUEST#192##cssapq01.corp_I10_95141350#Guest#0325f1a077e711dabfea001083fded34#ID\#(cssapq01_I10_09)ID1950194550DB11983431035475623143End.d41a077077e611dac48e001083fded34##0#0#Info##Java###resourceBundle=, locale=, key=, string=#4#java.util.PropertyResourceBundle@70086665#en#MESSAGE_AREA_ACC_DESCRIPTION#Message Area#
    #1.5#001083FDED3400950000008B00005CE9000409021814E2BA#1135804505436#com.sap.tc.webdynpro.progmodel.context.Node#sap.com/tcwddispwda#com.sap.tc.webdynpro.progmodel.context.Node.getParentElement#J2EE_GUEST#192##cssapq01.corp_I10_95141350#Guest#0325f1a077e711dabfea001083fded34#ID\#(cssapq01_I10_09)ID1950194550DB11983431035475623143End.d41a077077e611dac48e001083fded34##0#0#Debug##Java###: retrieving parent element#1#Node(Rgsm_Reload_Comp.Empl_Data_Input.Output.Hr_Personal)#
    #1.5#001083FDED3400950000008C00005CE9000409021814EACA#1135804505438#com.sap.tc.webdynpro.clientserver.cal.ClientManager#sap.com/tcwddispwda#com.sap.tc.webdynpro.clientserver.cal.ClientManager#J2EE_GUEST#192##cssapq01.corp_I10_95141350#Guest#0325f1a077e711dabfea001083fded34#SAPEngine_Application_Thread[impl:3]_53##0#0#Path##Plain###Exiting method#
    #1.5#001083FDED3400950000008D00005CE9000409021814ECDE#1135804505439#com.sap.tc.webdynpro.services.sal.util.cache.GlobalCache#sap.com/tcwddispwda#com.sap.tc.webdynpro.services.sal.util.cache.GlobalCache.releaseStringBufferCache#J2EE_GUEST#192##cssapq01.corp_I10_95141350#Guest#0325f1a077e711dabfea001083fded34#SAPEngine_Application_Thread[impl:3]_53##0#0#Debug##Plain###released#
    #1.5#001083FDED340044000000FA00005CE90004090218A54537#1135804514898#com.sap.engine.library.monitor.mapping.ccms.Trace##com.sap.engine.library.monitor.mapping.ccms.Trace######876ae77077e411da8dc1001083fded34#SAPEngine_System_Thread[impl:5]_78##0#0#Error##Plain###RegisterNode</Applications/KM Collaboration/SCF/Service Connectors>: com.sap.engine.library.monitor.mapping.ccms.CcmsConnectorException: 95141350: Invalid configuration group for node'/Applications/KM Collaboration/SCF/Service Connectors' (APP.KM.Collaboration.SCF.ConfiguredConnectors, max. 40 characters)#
    #1.5#001083FDED34007E0000000300005CE90004090219854FA9#1135804529581#com.sap.tc.webdynpro.serverimpl.wdc.locking.LockingService##com.sap.tc.webdynpro.serverimpl.wdc.locking.LockingService.lock#J2EE_GUEST#192####ce7be36077e611da9ab6001083fded34#Thread[Finalizer,8,system]##0#0#Info##Plain###Unlocked all.#
    After reducing the size of the Rgsm_Reload_Comp.Empl_Data_Input.Output.Hr_Personal node to Rgsm_Reload_Comp.Input.Output.Hr less than 40 car.
    I get this lines in the same file (defaultTrace.0.trc)
    #1.5#001083FDED34006A0000004D00001B7900040902F81A15BF#1135808263880#com.sap.tc.webdynpro.progmodel.context.Node#sap.com/tcwddispwda#com.sap.tc.webdynpro.progmodel.context.Node.exit#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Java###: exiting#1#Node(Rgsm_Reload_Comp.Input.Output)#
    #1.5#001083FDED34006A0000004E00001B7900040902F81A1790#1135808263880#com.sap.tc.webdynpro.progmodel.context.Node#sap.com/tcwddispwda#com.sap.tc.webdynpro.progmodel.context.Node.clearElements#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Plain###Node(Rgsm_Reload_Comp.Input.Output): cleared elements#
    #1.5#001083FDED34006A0000004F00001B7900040902F81A1956#1135808263881#com.sap.tc.webdynpro.progmodel.context.Node#sap.com/tcwddispwda#com.sap.tc.webdynpro.progmodel.context.Node.exit#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Java###: exiting#1#Node(Rgsm_Reload_Comp.Input.Output.Hr)#
    #1.5#001083FDED34006A0000005000001B7900040902F81A397F#1135808263889#com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel#sap.com/tcwddispwda#com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel.JcoClientManagementWDP#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Info##Plain###successfully released IWDJCOClientConnection to pool for Model: class com.cts.rgsm.wd.Rgsm_Reload_Model - ConnectionInfo: [email protected]68#
    #1.5#001083FDED34006A0000005100001B7900040902F81A3DC9#1135808263890#com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel#sap.com/tcwddispwda#com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel.JcoClientManagementWDP#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Info##Plain###successfully released IWDJCOClientConnection to pool for Model: class com.cts.rgsm.wd.Rgsm_Reload_Model - ConnectionInfo: com.sap.mw.jco.JCO$Client@4f41c0ac#
    #1.5#001083FDED34006A0000005200001B7900040902F81A4075#1135808263891#com.sap.tc.webdynpro.services.session.Monitor#sap.com/tcwddispwda#com.sap.tc.webdynpro.services.session.Monitor#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Plain###Destroying scope for Application com.cts.rgsm.app.AppGetEmployee#
    #1.5#001083FDED34006A0000005300001B7900040902F81A42DA#1135808263891#com.sap.tc.webdynpro.services.session.Monitor#sap.com/tcwddispwda#com.sap.tc.webdynpro.services.session.Monitor#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Plain###Removing Application com.cts.rgsm.app.AppGetEmployee#
    #1.5#001083FDED34006A0000005400001B7900040902F81AA07E#1135808263915#com.sap.tc.webdynpro.clientserver.cal.ClientWindow#sap.com/tcwddispwda#com.sap.tc.webdynpro.clientserver.cal.ClientWindow.removeApplicationWindow#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Debug##Java###Removed application window with ID=, status=.#2#Id8e7544b077ef11da91b9001083fded340#true#
    #1.5#001083FDED34006A0000005500001B7900040902F81AA473#1135808263916#com.sap.tc.webdynpro.sessionmanagement#sap.com/tcwddispwda#com.sap.tc.webdynpro.sessionmanagement.ApplicationWindow.destroy()#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Info##Java###Destroyed ApplicationWindow with ID=.#1#Id8e7544b077ef11da91b9001083fded340#
    #1.5#001083FDED34006A0000005600001B7900040902F81AA719#1135808263917#com.sap.tc.webdynpro.clientserver.cal.ClientApplication#sap.com/tcwddispwda#com.sap.tc.webdynpro.clientserver.cal.ClientApplication.exit#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Info##Plain###ClientApplication destroyed ID: FNOL instanceCounter: 0#
    #1.5#001083FDED34006A0000005700001B7900040902F81AAA3F#1135808263918#com.sap.tc.webdynpro.sessionmanagement#sap.com/tcwddispwda#com.sap.tc.webdynpro.sessionmanagement.ClientApplication.exit()#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#ID\#(cssapq01_I10_09)ID1641170050DB10933063800664331447End.8e7544b077ef11da91b9001083fded34##0#0#Info##Java###Destroyed ClientApplication with ID= and name=. Reason was #3#FNOL#com.cts.rgsm.app.AppGetEmployee#Exception#
    #1.5#001083FDED34006A0000005800001B7900040902F81AACA2#1135808263918#com.sap.tc.webdynpro.clientserver.cal.ClientManager#sap.com/tcwddispwda#com.sap.tc.webdynpro.clientserver.cal.ClientManager#J2EE_GUEST#192####c4793da077ef11daa094001083fded34#SAPEngine_Application_Thread[impl:3]_34##0#0#Path##Plain###Exiting method#
    Could this help?
    Ramien.-

  • Unable to save Sequence value to Database

    Hi,
    I am trying to pupulate a sequence value so that I can use it as primary key along with the combination of other columns later. My problem is that the sequence value is getting populated on the page with the right value, But is not getting saved to the database. The Column is there in the VO. The column is blank on the table. When I print it(System.out.println("Seq=" + xSeq.getText(pageContext));), the value is null. Can anyone please advice what I am doing wrong OR if I am missing anything here.
    Thanks
    Ali
    My CO file:
    ============
    package lac.oracle.apps.lac.jobperf.server.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.jbo.domain.Number;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.layout.OAMessageComponentLayoutBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    import com.sun.java.util.collections.HashMap;
    import oracle.bali.share.util.IntegerUtils;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    * Controller for ...
    public class ReviewCreateCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    OAApplicationModule am; // dave
    OADBTransaction oadbxn; // dave
    oracle.jbo.domain.Number Seq;
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    // Always call this first
    super.processRequest(pageContext, webBean);
    am = pageContext.getApplicationModule(webBean); // dave
    oadbxn = am.getOADBTransaction(); // dave
    OAPageLayoutBean pageLayout = pageContext.getPageLayoutBean();
    OAMessageComponentLayoutBean mainRn = (OAMessageComponentLayoutBean)pageLayout.findIndexedChildRecursive("MainRN");
    // If isBackNavigationFired = false, we are here after a valid navigation
    // (the user selected the Create Review button) and we should proceed
    // normally and initialize a new Review.
    if (!pageContext.isBackNavigationFired(false))
    // We indicate that we are starting the create transaction(this
    // is used to ensure correct Back button behavior).
    TransactionUnitHelper.startTransactionUnit(pageContext,"jobperfCreateTxn");
    // This test ensures that we don't try to create a new review if we
    // had a JVM failover, or if a recycled application module is activated
    // after passivation. If this things happen, BC4J will be able to find
    // the row you created so the user can resume work.
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    // String Seq = (String)oadbxn.getValue("Seq");
    oracle.jbo.domain.Number Seq = oadbxn.getSequenceValue("lac.LAC_CM_PERF_REVIEW_SEQ");
    OAMessageStyledTextBean xSeq = (OAMessageStyledTextBean)mainRn.findIndexedChildRecursive("Seq");
    xSeq.setText(Seq.toString());
    am.invokeMethod("createReview",null);
    // Initialize the ApplicationpropertiesVO for PPR.
    // am.invokeMethod("init");
    else
    if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"jobperfCreateTxn", true))
    // We got here through some use of the browser "Back" button, so we
    // want to display a stale data error and disallow access to the page.
    // if this were a real application, we would propably display a more
    // context-specific message telling the user she can't use the browser
    //"Back" button and the "Create" page. Instead, we wanted to illustrate
    // how to display the Applications standard NAVIGATION ERROR message.
    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
    pageContext.redirectToDialogPage(dialogPage);
    } // end processRequest()
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    {    //super.processFormRequest(pageContext, webBean);
    // Always call this first.
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAPageLayoutBean pageLayout = pageContext.getPageLayoutBean();
    OAMessageComponentLayoutBean mainRn = (OAMessageComponentLayoutBean)pageLayout.findIndexedChildRecursive("MainRN");
    // Pressing the "Apply" button means the transaction should be validated
    // and committed.
    // OAPageLayoutBean pageLayout = pageContext.getPageLayoutBean();
    // String Seq = SeqText.getText(pageContext);
    oadbxn.putValue("Seq", Seq);
    am = pageContext.getApplicationModule(webBean);
    oadbxn = am.getOADBTransaction();
    if (pageContext.getParameter("Apply") != null)
    // Generally in the tutorial application and the labs, we've illustrated
    // all BC4J interaction on the server (except for the AMs, of course). Here,
    // we're dealing with the VO directly so the comments about the reasons
    // why we're obtaining values from the VO and not the request make sense
    // in context.
    OAViewObject vo = (OAViewObject)am.findViewObject("jobperfVO1");
    // Note that we have to get this value from the VO because the EO will
    // assemble it during its validation cycle.
    // For performance reasons, we should generally be calling getEmployeeName()
    // on the EmployeeFullVORowImpl object, but we don't want to do this
    // on the client so we're illustrating the interface-appropriate call. If
    // we implemented this code in the AM where it belongs, we would use the
    // other approach.
    String employeeName = (String)vo.getCurrentRow().getAttribute("FullName");
    // We need to get a String so we can pass it to the MessageToken array below. Note
    // that we are getting this value from the VO (we could also get it from.
    // the Bean as shown in the Drilldwon to Details lab) because the item style is messageStyledText,
    // so the value isn't put on the request like a messaqeTextInput value is.
    String employeeNumber = (String)vo.getCurrentRow().getAttribute("EmployeeNumber");
    //ma String employeeNum = String.valueOf(employeeNumber.intValue());
    //ma Number employeeNumber = (Number)vo.getCurrentRow().getAttribute("EmployeeNumber");
    //ma String employeeNum = String.valueOf(employeeNumber.intValue());
    // Simply telling the transaction to commit will cause all the Entity Object validation
    // to fire.
    // Note: there's no reason for a developer to perform a rollback. This is handled by
    // the framework if errors are encountered.
    OAMessageStyledTextBean xSeq = (OAMessageStyledTextBean)mainRn.findIndexedChildRecursive("Seq");
    System.out.println("Seq=" + xSeq.getText(pageContext));
    am.invokeMethod("apply");
    // Indicate that the Create transaction is complete.
    TransactionUnitHelper.endTransactionUnit(pageContext, "jobperfCreateTxn");
    // Assuming the "commit" succeeds, navigate back to the "Search" page with
    // the user's search criteria intact and display a "Confirmation" message
    // at the top of the page.
    MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName),
    new MessageToken("EMP_NUMBER", employeeNumber) };
    OAException confirmMessage = new OAException("PER", "LAC_FWK_TBX_T_EMP_CREATE_CONF", tokens,
    OAException.CONFIRMATION, null);
    // Per the UI guidelines, we want to add the confirmation message at the
    // top of the search/results page and we want the old search criteria and
    // results to display.
    pageContext.putDialogMessage(confirmMessage);
    HashMap params = new HashMap(1);
    // Replace the current employeeNumber request parameter value with "X"
    params.put("employeeNumber", "employeeNumber");
    // IntegerUtils is a handy utility
    params.put("employeeNumber",IntegerUtils.getInteger(5));
    pageContext.forwardImmediately(
    "OA.jsp?page=/lac/oracle/apps/lac/jobperf/webui/jobperfPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    params, //null,
    false, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
    else if (pageContext.getParameter("Cancel") != null)
    am.invokeMethod("rollbackReview");
    // Indicate that the Create transaction is complete.
    TransactionUnitHelper.endTransactionUnit(pageContext, "jobperfCreateTxn");
    pageContext.forwardImmediately("OA.jsp?page=/lac/oracle/apps/lac/jobperf/webui/jobperfPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    false, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    } // end processFormRequest()
    }

    Hi Tapash,
    Thanks for all of you guys(Tapash/Sumit/user550094) help. The sequence is working and also populating the values in the table when I do not have any validation checks imposed on it.
    If I add any validations as mentioned in the exercise for create page where it checks if the sequence can be updated while null and so on... and throws appropriate exception. I get error. That is the code that I mentioned above.
    Here is the validation code for EOImpl:
    As mentioned below in order for the code to compile and work I had to comment the "throw new OAAttrvalException". If I uncomment the
    "throw new OAAttrvalException" part, it gives me the following error while compiling:
    "Error(796,13): method getPrimarykey not found in class lac.oracle.apps.lac.jobperf.schema.server.jobperfEOImpl"
    public void setSeq(Number value)
    // Because of the declaritive validation that you specified for this attribute,
    // BC4J validates that this can be updated only on a new line, and that this,
    // mandatory attribute cannot be null. This code adds the additional check
    // of only allowing an update if the value is null to prevent changes while
    // the object is in memory.
    if (getSeq() != null)
    /* throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), //getSeq(), // EO name
    getPrimarykey(), // EO PK
    "Seq", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_NO_UPDATE"); // Message name */
    if (value != null)
    // Seq ID must be unique. To verify this, check both the
    // entity cache and the database. In this case, it's appropriate
    // to use findByPrimaryKey() because you're unlikely to get a match, and
    // and are therefore unlikely to pull a bunch of large objects into memory.
    // Note that findByPrimaryKey() is guaranteed to check all employees.
    // First it checks the entity cache, then it checks the database.
    OADBTransaction transaction = getOADBTransaction();
    Object[] employeeKey = {value};
    EntityDefImpl empDefinition = jobperfEOImpl.getDefinitionObject();
    jobperfEOImpl Seq =
    (jobperfEOImpl) empDefinition.findByPrimaryKey(transaction, new Key(employeeKey));
    if (Seq != null)
    /* throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // .getSeq(), // EO name
    getPrimaryKey(), // EO PK
    "Seq", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_UNIQUE"); // Message name */
    // Note that this is the point at which the value is actually set on the EO cache
    // (during the scope of setAttributeInternal processing). If you don't make this
    // call after you perform your validation, your value will not be set correctly.
    // Also, any declarative validation that you define for this attribute is executed
    // within this method.
    setAttributeInternal(SEQ, value);
    } // end SetSeq
    I am sorry if I have confused you. I really did not mean to do it.
    Thanks,
    Ali

  • Unable to call the RFC from the WD java Program

    Hi All,
    I have a table and three buttons Create, Edit, Save in the layout.
    If no record available in the R3 the the end user will click on create and then he will click on save so that the insert RFC will be called accordingly and the record will be inserted.My table is limited to 5 records only. If  i enter all the 5 records and Click on submit the record is inserting in the backend , but if i enter less than 5 records im unable to call the RFC what might be the issue. 
    My insert RFC takes one Table node and 4 import parameters i'm passing all of the all the mentioned import parameters.
    Code:-
    View Controller code
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.gmr.ess;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateAPPView).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.math.BigDecimal;
    import java.util.Date;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Collection;
    import java.util.Iterator;
    import com.gmr.ess.wdp.IPrivateAPPView;
    import com.gmr.pck.Zst_Hr_Nominee;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    //@@end
    //@@begin documentation
    //@@end
    public class APPView
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(APPView.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.gmr.ess.wdp.IPrivateAPPView for more details
      private final IPrivateAPPView wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.gmr.ess.wdp.IPrivateAPPView.IContextNode for more details.
      private final IPrivateAPPView.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public APPView(IPrivateAPPView wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
        try{
              IWDMessageManager manager1 = wdComponentAPI.getMessageManager();
              IWDClientUser user = WDClientUser.getLoggedInClientUser();
              String logUser= user.getSAPUser().getUniqueName();
              wdContext.currentContextElement().setUserid(logUser);
              wdThis.wdGetAPPController().executeBapi_Employee_Getdata_Input();//Returns the user id for the employee
              Collection nomineeList = new ArrayList();
              wdThis.wdGetAPPController(). executeZ_Hrfm_Nominee_Disp_Input( );          
              int nomineeTableSize = wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().size();
              for(int i=0;i< nomineeTableSize;i++){          
                IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
                ele.setAddr(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getAddr());
                ele.setDob(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getDob());
                ele.setGuard(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getGuard());
                ele.setName(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getName());
                ele.setPerc(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getPerc());
                ele.setRelat(wdContext.nodeZ_Hrfm_Nominee_Disp_Input().nodeOutput_Nominee().nodeNominee().getNomineeElementAt(i).getRelat());
                nomineeList.add(ele);
              wdContext.nodeDisplay_table_node().bind(nomineeList);
              wdContext.currentContextElement().setEdit_val_attr(true);
              if(nomineeTableSize<=0){
                   wdContext.currentContextElement().setCreateButtonEnable(true);
                   wdContext.currentContextElement().setEditButtonEnable(false);
              else{
                   wdContext.currentContextElement().setCreateButtonEnable(false);
                   wdContext.currentContextElement().setEditButtonEnable(true);
        catch(Exception e){
              wdComponentAPI.getMessageManager().reportException("",true);
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateAPPView wdThis, IPrivateAPPView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        //@@end
      //@@begin javadoc:onActionGetData(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGetData(ServerEvent)
        //$$begin ActionButton(-535519310)
        //wdThis.wdGetAPPController().executeZ_Hrfm_Nominee_Disp_Input();
        //$$end
        //@@end
      //@@begin javadoc:onActionEdit(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionEdit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionEdit(ServerEvent)
       //$$begin ActionButton(-535519310)
       displayTablesize=wdContext.nodeDisplay_table_node().size(); 
       if(displayTablesize<5){
         for(int i=0;i<size-displayTablesize;i++){           
              IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
              wdContext. nodeDisplay_table_node().addElement(ele);               
       operation="MOD"; 
       wdContext.currentContextElement().setTableReadOnly(true);
       wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);                                 
        //$$end
        //@@end
      //@@begin javadoc:onActionCreate(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionCreate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCreate(ServerEvent)
         int month=0,year=0,day=0;
         String month1,day1,year1;   
         try{
              displayTablesize=wdContext.nodeDisplay_table_node().size();
              wdContext.currentContextElement().setEdit_val_attr(false);
              if(wdContext.nodeDisplay_table_node().isEmpty()){                    
                   if(displayTablesize<5){
                        Calendar cal=Calendar.getInstance();
                        month=cal.get(Calendar.MONTH)+1;
                        if(month==1||month==2||month==3||month==4||month==5||month==6||month==7||month==8||month==9){
                             month1="0"+month;
                        else{
                             month1=""+month;                                   
                        day = cal.get(Calendar.DAY_OF_MONTH);
                             if(day==1||day==2||day==3||day==4||day==5||day==6||day==7||day==8||day==9){
                             day1=  "0"+day;
                        else{
                             day1=""+day;
                        year = cal.get(Calendar.YEAR);
                        year1=""+year;
                        String strFormat=day1"."month1"."year1;                    
                        wdContext.currentOutput_NomineeElement().setBegda(strFormat);
                        wdContext.currentOutput_NomineeElement().setEndda("31.12.9999");                         
                        for(int i=0;i<size-displayTablesize;i++){           
                             IPrivateAPPView.IDisplay_table_nodeElement ele = wdContext.nodeDisplay_table_node().createDisplay_table_nodeElement();
                             wdContext. nodeDisplay_table_node().addElement(ele);               
                   operation="INS";
                   wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);                    
              wdContext.currentContextElement().setTableReadOnly(true);          
         catch(NullPointerException npe){
              wdComponentAPI.getMessageManager().reportException("No Data Available",true);
        //@@end
      //@@begin javadoc:onActionSaveData(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionSaveData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSaveData(ServerEvent)
         float percentage=0;
         float dupePercentage=0;
         boolean isTest = false;
         Collection DispTList =      new ArrayList();
         IWDMessageManager manager1 = wdComponentAPI.getMessageManager();
         try{
              displayTablesize = wdContext.nodeDisplay_table_node().size();
              //for(int     i=1;i<=displayTablesize;i++){
              for(int     i=0;i<displayTablesize;i++){
                   BigDecimal share = wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc();
                   String name =  wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName();
                   percentage = share.floatValue();
                   dupePercentage = dupePercentage + percentage;
                   if(name!=null && share!=null){                    
                        Zst_Hr_Nominee nominee = new Zst_Hr_Nominee();
                        nominee.setAddr(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getAddr());
                       manager1.reportSuccess(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getAddr());               
                        nominee.setDob(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getDob());     
                        manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getDob());               
                        nominee.setGuard(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getGuard());     
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getGuard());               
                        nominee.setName(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName());
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getName());                    
                        nominee.setPerc(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc());
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getPerc());
                        nominee.setRelat(wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getRelat());     
                       manager1.reportSuccess(""+wdContext.nodeDisplay_table_node().getDisplay_table_nodeElementAt(i).getRelat());               
                        DispTList.add(nominee);     
                   wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().nodeNominee_ins().bind(DispTList);
              if((dupePercentage)!=100)
              wdComponentAPI.getMessageManager().reportException(
                        "The sum of the share Percentages is not 100. Modify the percentages accordingly",true);
              wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().nodeNominee_ins().bind(DispTList);
              IWDMessageManager manager = wdComponentAPI.getMessageManager();
              String beginDate = wdContext.currentOutput_NomineeElement().getBegda();
              manager.reportSuccess(wdContext.currentOutput_NomineeElement().getBegda());
              String endDate=wdContext.currentOutput_NomineeElement().getEndda();
              manager.reportSuccess(wdContext.currentOutput_NomineeElement().getEndda());
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setBegda(beginDate);
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setEndda(endDate);          
              wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setOperation(operation);
              wdComponentAPI.getMessageManager().reportSuccess(operation);     
              wdThis.wdGetAPPController().executeBapi_Employee_Getdata_Input();
              wdThis.wdGetAPPController().executeZ_Hrfm_Nominee_Ins_Mod_Input();           
              //wdContext.currentContextElement().setTableReadOnly(false);
         catch(Exception e){
              e.getMessage();
        //@@end
    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
      int nomineeTableSize = 0;
      int displayTablesize = 0;
      String operation= null;
      int size=5;
    // float dupePercentage=0;
      //String mod_op="MOD";
      //@@end
    content of obsolete user coding area(s) -
    //@@begin obsolete:javadoc:onActionSave(ServerEvent)
    //  /** Declared validating even
    Component controller code
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.gmr.ess;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateAPP).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.util.Iterator;
    import com.gmr.ess.wdp.IPrivateAPP;
    import com.gmr.pck.Bapi_Employee_Getdata_Input;
    import com.gmr.pck.Bapip0002B;
    import com.gmr.pck.Z_Hrfm_Nominee_Disp_Input;
    import com.gmr.pck.Z_Hrfm_Nominee_Ins_Mod_Input;
    import com.gmr.pck.Zst_Hr_Nominee;
    import com.sap.lcr.api.util.SetProfileConnect;
    import com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    //@@end
    //@@begin documentation
    //@@end
    public class APP
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(APP.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.gmr.ess.wdp.IPrivateAPP for more details
      private final IPrivateAPP wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.gmr.ess.wdp.IPrivateAPP.IContextNode for more details.
      private final IPrivateAPP.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public APP(IPrivateAPP wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
        //$$begin Service Controller(1490375209)
    //    wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().bind(new Z_Hrfm_Nominee_Ins_Mod_Input());
         Z_Hrfm_Nominee_Ins_Mod_Input input = new Z_Hrfm_Nominee_Ins_Mod_Input();
         input.addNominee(new Zst_Hr_Nominee());
         wdContext.nodeZ_Hrfm_Nominee_Ins_Mod_Input().bind(input);
        //$$end
        //$$begin Service Controller(-932523997)
        wdContext.nodeZ_Hrfm_Nominee_Disp_Input().bind(new Z_Hrfm_Nominee_Disp_Input());
        //$$end
        //$$begin Service Controller(-368783613)
        wdContext.nodeBapi_Employee_Getdata_Input().bind(new Bapi_Employee_Getdata_Input());
        //$$end
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoPostProcessing()
    Hook called to handle data retrieval errors before rendering.
    After doModifyView(), the Web Dynpro Framework gets all context data needed
    for rendering by validating the contexts (which in turn calls the supply
    functions and supplying relation roles). In this hook, the application
    should handle the errors which occurred during validation of the contexts.
    Using preorder depth-first traversal, this hook is called for all component
    controllers starting with the current root component.
    Permitted operations:
    - Flushing model queue
    - Creating messages
    - Reading context and model data
    Forbidden operations:
    - Invalidating model data
    - Manipulating the context
    - Firing outbound plugs
    - Creating components
    @param isCurrentRoot true if this is the root of the current request
      //@@end
      public void wdDoPostProcessing(boolean isCurrentRoot)
        //@@begin wdDoPostProcessing()
        //@@end
      //@@begin javadoc:wdDoBeforeNavigation()
    Hook before the navigation phase starts.
    This hook allows you to flush the model queue and handle any
    errors that occur. Firing outbound plugs is allowed in this hook.
    Using preorder depth-first traversal, this hook is called for all component
    controllers starting with the current root component.
    @param isCurrentRoot true if this is the root of the current request
      //@@end
      public void wdDoBeforeNavigation(boolean isCurrentRoot)
        //@@begin wdDoBeforeNavigation()
        //@@end
      //@@begin javadoc:wdDoApplicationStateChange()
    Hook that informs the application about a state change.
    <p>
    This hook is called e.g. to tell the application that will be
    <ul>
    <li>left via a suspend plug and therefore should go into a suspend/sleep
         mode with minimal need of resources. errors that occur. Firing
         outbound plugs is allowed in this hook.
    <li>left due to a timeout and could write it's state to a data base if the
         user comes back later on
    </ul>
    The concrete reason is available via IWDApplicationStateChangeInfo
    <p>
    <b>Important</b>: This hook is called for the top level component only!
    @param stateChangeInfo contains the information about the nature of the state change
    @param stateChangeReturn allows the application to ask for a different state change.
           The framework is allowed to ignore it considering i.e. the current resources situation.
      //@@end
      public void wdDoApplicationStateChange(com.sap.tc.webdynpro.progmodel.api.IWDApplicationStateChangeInfo stateChangeInfo, com.sap.tc.webdynpro.progmodel.api.IWDApplicationStateChangeReturn stateChangeReturn)
        //@@begin wdDoApplicationStateChange()
        //@@end
      //@@begin javadoc:executeBapi_Employee_Getdata_Input()
      /** Declared method. */
      //@@end
      public void executeBapi_Employee_Getdata_Input( )
        //@@begin executeBapi_Employee_Getdata_Input()
        //$$begin Service Controller(1705750894)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
         Iterator itrGetData = null;
                             Bapip0002B out = null;
        try
          wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();
          wdContext.nodeOutput().invalidate();
           itrGetData = wdContext.currentOutputElement().modelObject().getPersonal_Data().iterator();
           while (itrGetData.hasNext()) {
               out = (Bapip0002B) itrGetData.next();
          empNo = out.getPerno();
          wdContext.currentZ_Hrfm_Nominee_Disp_InputElement().setPernr(empNo);
         wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().setPernr(empNo);
    //      manager.reportSuccess(empNo);
         //wdThis.executeZ_Hrfm_Nominee_Disp_Input();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
      //@@begin javadoc:executeZ_Hrfm_Nominee_Disp_Input()
      /** Declared method. */
      //@@end
      public void executeZ_Hrfm_Nominee_Disp_Input( )
        //@@begin executeZ_Hrfm_Nominee_Disp_Input()
        //$$begin Service Controller(-366407911)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentZ_Hrfm_Nominee_Disp_InputElement().modelObject().execute();
          wdContext.nodeOutput_Nominee().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
      //@@begin javadoc:executeZ_Hrfm_Nominee_Ins_Mod_Input()
      /** Declared method. */
      //@@end
      public void executeZ_Hrfm_Nominee_Ins_Mod_Input( )
        //@@begin executeZ_Hrfm_Nominee_Ins_Mod_Input()
        //$$begin Service Controller(1524028406)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentZ_Hrfm_Nominee_Ins_Mod_InputElement().modelObject().execute();
          wdContext.nodeOutput_nominee_ins_mod().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //$$end
        //@@end
    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
      String empNo = null;
      //@@end
    Suman
    Edited by: sumankumar kurimilla on Dec 23, 2008 9:26 AM

    Hi,
    I have checked from RFC side that is working fine only java app its not working can you tell any thing needs to be changed from my application end.
    Please check in Savedata action.
    Regards,
    Suman
    Edited by: sumankumar kurimilla on Dec 23, 2008 11:01 AM

  • Unable to send emails through adobe offline project.

    Hi Experts!!!
                        I am trying to send an email through Adobe Offline Form. I am quoting the code. Plz check what's the problem with the code.
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.lifecyclelettersapplication;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateFormView).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.SendFailedException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import com.lifecyclelettersapplication.wdp.IPrivateFormView;
    //@@end
    //@@begin documentation
    //@@end
    public class FormView
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(FormView.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.lifecyclelettersapplication.wdp.IPrivateFormView for more details
      private final IPrivateFormView wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.lifecyclelettersapplication.wdp.IPrivateFormView.IContextNode for more details.
      private final IPrivateFormView.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public FormView(IPrivateFormView wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
         /* The following lines initialize the context elements;
    Enter your e-mail id in the set From-method
         //wdContext.currentContextElement().setTeststatus(" do in it");
            try{
            wdContext.currentEmailElement().setFrom("[email protected]");
            wdContext.currentEmailElement().setTo("[email protected]");                                            
            wdContext.currentEmailElement().setCc("[email protected]");
            wdContext.currentEmailElement().setBcc("[email protected]");
    //        wdContext.currentEmailElement().setCc(" ");
    //        wdContext.currentEmailElement().setBcc(" ");
            wdContext.currentEmailElement().setSubject("Test Mail By Umang");
            wdContext.currentEmailElement().setBody("You will find the address proof letter in the attachment of this e mail. Please sign this form and send it.");
           catch(Exception e)
             wdContext.currentContextElement().setTeststatus("do in it"+e.getMessage());              
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateFormView wdThis, IPrivateFormView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        //@@end
      //@@begin javadoc:onPlugFromFirstview(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onPlugFromFirstview(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onPlugFromFirstview(ServerEvent)
         wdContext.currentContextElement().setTeststatus("from first view");
         //wdDoInit();
        //@@end
      //@@begin javadoc:onActionBack(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionBack(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionBack(ServerEvent)
        wdThis.wdFirePlugToFirstView();
        //@@end
      //@@begin javadoc:onActionSend(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionSend(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSend(ServerEvent)
         Properties props = new Properties();
              String host = "rmail070.zmail.ril.com";
              props.put("rmail070.zmail.ril.com", host);
              Session session = Session.getInstance(props, null);
              MimeMessage message = new MimeMessage(session);
              Address toAddress = new InternetAddress();
              Address fromAddress = new InternetAddress();
              Address ccAddress = new InternetAddress();
              Address bccAddress = new InternetAddress();
         wdContext.currentContextElement().setTeststatus("1");
              try
                   MimeMultipart multipart = new MimeMultipart();
                   wdContext.currentContextElement().setTeststatus("2");
                   BodyPart messageBodyPart = new MimeBodyPart();
                   if (! wdContext.currentEmailElement().getFrom().equals(""))
                        fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());               
                        message.setFrom(fromAddress);
                   wdContext.currentContextElement().setTeststatus("3");
                   if (! wdContext.currentEmailElement().getTo().equals(""))
                        toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
                        message.setRecipient(Message.RecipientType.TO, toAddress);
                   wdContext.currentContextElement().setTeststatus("4");
                   if (! wdContext.currentEmailElement().getCc().equals(""))
                        ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
                        message.setRecipient(Message.RecipientType.CC, ccAddress);
                   wdContext.currentContextElement().setTeststatus("5");
                   if (! wdContext.currentEmailElement().getBcc().equals(""))
                        bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
                        message.setRecipient(Message.RecipientType.BCC, bccAddress);
                   wdContext.currentContextElement().setTeststatus("6");
                   if (! wdContext.currentEmailElement().getSubject().equals(""))
                        message.setSubject(wdContext.currentEmailElement().getSubject());
                   wdContext.currentContextElement().setTeststatus("7");
                   if (! wdContext.currentEmailElement().getBody().equals(""))
                        messageBodyPart.setText(wdContext.currentEmailElement().getBody());
                   wdContext.currentContextElement().setTeststatus("8");
                   multipart.addBodyPart(messageBodyPart);
                   wdContext.currentContextElement().setTeststatus("10");
    ////               A new part will be added this will be the attachment
                   messageBodyPart = new MimeBodyPart();
    //               String filename = "temp
    webdynpro
    web
    local
    LifeCycleLetters
    Components
    com.lifecyclelettersapplication.LifeCycleLettersApplication
    LifeCycle.pdf";
    //               DataSource source = new FileDataSource(filename);
    //               messageBodyPart.setDataHandler(new DataHandler(source));
    //               messageBodyPart.setFileName(source.getName());                    
    //               messageBodyPart.setHeader("Content-Type","application/pdf");
    //               multipart.addBodyPart(messageBodyPart);
                   message.setContent(multipart);
                   Transport.send(message);
                   wdContext.currentContextElement().setTeststatus("11");
              catch (AddressException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (SendFailedException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (MessagingException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
         catch(Exception e)
                             wdContext.currentContextElement().setTeststatus("action send"+e.getMessage());              
        //@@end
    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
      //@@end

    Hi,
    I think u need to set up the SMTPĀ  So that u can send the email.
    Regards
    Mustafa.

Maybe you are looking for