Webdynpro WD API

Doing programming in webdynpro need a lots of WD_xxx
where can i find this WD API

// This file has been generated by the Web Dynpro Code Generator.
// DO NOT MODIFY! CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
package com.sap.tc.webdynpro.tutorials.viewcomposition.maincomp.wdp;
import com.sap.tc.webdynpro.progmodel.api.*;
import com.sap.tc.webdynpro.progmodel.gci.*;
import com.sap.tc.webdynpro.progmodel.context.*;
import com.sap.tc.webdynpro.services.exceptions.WDRuntimeException;
/** Interface that is provided to application class. */
public interface IPrivateCompControlView {
   * Event Handler identifiers.
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_DISPLAY_RIGHT_IMAGE_COMP_INSTANCE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionDisplayRightImageCompInstance", "CompControlView", "com.sap.tc.webdynpro.tutorials.viewcomposition.maincomp.MainComp");
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_DELETE_LEFT_COMP_INSTANCE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionDeleteLeftCompInstance", "CompControlView", "com.sap.tc.webdynpro.tutorials.viewcomposition.maincomp.MainComp");
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_LEAVE_RIGHT_COMP_INTERFACE_VIEW = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionLeaveRightCompInterfaceView", "CompControlView", "com.sap.tc.webdynpro.tutorials.viewcomposition.maincomp.MainComp");
  /** Event handler constant. */
  public static IWDEventHandlerId WD_EVENTHANDLER_ON_ACTION_CREATE_LEFT_IMAGE_COMPONENT_INSTANCE = new com.sap.tc.webdynpro.progmodel.gci.impl.GCIEventHandlerId("onActionCreateLeftImageComponentInstance", "CompControlView", "com.sap.tc.webdynpro.tutorials.viewcomposition.maincomp.MainComp");
   * Provides access to the generic API of this controller.
  IWDViewController wdGetAPI();
   * Interface for the node 'Context'.
   * singleton = true, cardinality = _1_1, selection = _1_1
  public static class IContextNode extends Node
    private InternalCompControlView gen_delegate;
    IContextNode(InternalCompControlView delegate, IGCINodeInfo nodeInfo, Node parent) {
      super(nodeInfo, parent);
      gen_delegate = delegate;
    protected com.sap.tc.webdynpro.progmodel.context.Node createNode(IGCINodeInfo nodeInfo, com.sap.tc.webdynpro.progmodel.context.Node parentNode, com.sap.tc.webdynpro.progmodel.context.NodeElement parentElement) {
      if (nodeInfo == gen_delegate.infoContext)
        return new IPrivateCompControlView.IContextNode(gen_delegate, nodeInfo, parentNode);
      return super.createNode(nodeInfo, parentNode, parentElement);
    protected com.sap.tc.webdynpro.progmodel.context.NodeElement doCreateElement(IGCINodeInfo nodeInfo, Object reference) {
      if (nodeInfo == gen_delegate.infoContext) {
        return new IPrivateCompControlView.IContextElement(gen_delegate, nodeInfo);
      return super.doCreateElement(nodeInfo, reference);
    // ---- typed accessors --------------------------------------------------
     * Provides access to the generic context API as described by IWDContext.
    public IWDContext wdGetAPI() {
      return getContext();
     * Creates a new element for this node. The element is <b>not</b> bound
     * to the node. Use {@link #bind(IContextElement)} or
     * {@link IWDNode#bind(Collection)} to bind it or {@link IWDNode#addElement(IWDNodeElement)}
     * to add it to the node.
     * @return an element for this node
    public IPrivateCompControlView.IContextElement createContextElement() {
      return (IPrivateCompControlView.IContextElement)createElement();
     * Binds a single IContextElement to the node.
     * @param element a node element for this node
    public void bind(IPrivateCompControlView.IContextElement element) {
      bind(element == null ? java.util.Collections.EMPTY_LIST : java.util.Collections.singletonList(element));
     * Returns the element at the lead selection.
     * @return the element at the lead selection or <code>null</code> if the
     *         lead selection is not set
    public IPrivateCompControlView.IContextElement currentContextElement() {
      return (IPrivateCompControlView.IContextElement) getCurrentElement();
    // ---- hooks ------------------------------------------------------------
    // ---- child nodes ------------------------------------------------------------
   * Interface for the elements of the node Context.
  public static class IContextElement extends com.sap.tc.webdynpro.progmodel.context.NodeElement
    private InternalCompControlView gen_delegate;
    public IContextElement(InternalCompControlView delegate, com.sap.tc.webdynpro.progmodel.gci.IGCINodeInfo info) {
      super(info);
      gen_delegate = delegate;
   * Returns the context root node.
   * @return the context root node.
  IContextNode wdGetContext();
  /** Fires outbound plug. */
  void wdFirePlugShowRightCompOut( java.lang.String name );
  /** Fires outbound plug. */
  void wdFirePlugShowLeftCompOut( java.lang.String name );
  /** Fires outbound plug. */
  void wdFirePlugShowEmptyView( );
  /** Declared event handler. */
  void onActionDisplayRightImageCompInstance(IWDCustomEvent wdEvent );
  /** Declared event handler. */
  void onActionDeleteLeftCompInstance(IWDCustomEvent wdEvent );
  /** Declared event handler. */
  void onActionLeaveRightCompInterfaceView(IWDCustomEvent wdEvent );
  /** Declared event handler. */
  void onActionCreateLeftImageComponentInstance(IWDCustomEvent wdEvent );
  /** Gets component usage. */
  IWDComponentUsage wdGetLeftImageCompInstComponentUsage();
  /** Gets action 'DisplayRightImageComponentInstance'. */
  IWDAction wdGetDisplayRightImageComponentInstanceAction();
  /** Gets action 'DeleteLeftCompInstance'. */
  IWDAction wdGetDeleteLeftCompInstanceAction();
  /** Gets action 'LeaveRightCompInterfaceView'. */
  IWDAction wdGetLeaveRightCompInterfaceViewAction();
  /** Gets action 'CreateLeftImageComponentInstance'. */
  IWDAction wdGetCreateLeftImageComponentInstanceAction();
  /** Enumeration of all available action event handlers. */
  public final class WDActionEventHandler extends com.sap.tc.webdynpro.progmodel.gci.GCIActionEventHandlerEnum
    public static final WDActionEventHandler DISPLAY_RIGHT_IMAGE_COMPONENT_INSTANCE = new WDActionEventHandler("onActionDisplayRightImageCompInstance", true, NO_PARAMETERS);
    public static final WDActionEventHandler DELETE_LEFT_COMP_INSTANCE = new WDActionEventHandler("onActionDeleteLeftCompInstance", true, NO_PARAMETERS);
    public static final WDActionEventHandler LEAVE_RIGHT_COMP_INTERFACE_VIEW = new WDActionEventHandler("onActionLeaveRightCompInterfaceView", true, NO_PARAMETERS);
    public static final WDActionEventHandler CREATE_LEFT_IMAGE_COMPONENT_INSTANCE = new WDActionEventHandler("onActionCreateLeftImageComponentInstance", true, NO_PARAMETERS);
    private WDActionEventHandler(String value, boolean isValidating, Object[] declaredParameters) {
      super(value, isValidating, declaredParameters);
   * Creates a new action for this controller.
   * @param eventHandler is the action's event handler with an appropriate signature
   * @param text is the text displayed in the UI element triggering this action
  IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);
   * Creates a new action with the given name for this controller.
   * @param eventHandler is the action's event handler with an appropriate signature
   * @param name is the action's name
   * @param text is the text displayed in the UI element triggering this action
  IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);
i expecting some like this :
everytime in IPrivatexxxView
import com.sap.tc.webdynpro.progmodel.api.*;
import com.sap.tc.webdynpro.progmodel.gci.*;
import com.sap.tc.webdynpro.progmodel.context.*;
import com.sap.tc.webdynpro.services.exceptions.WDRuntimeException;
when i search in help cannot find this above api....
pls help

Similar Messages

  • Where to find 'com.sap.tc.webdynpro.repository.api' file in EP server

    Hi All,
    I am getting below exception while deploying a custom component in sand-box server.
    Failed to deploy application freescale.com/c_uwl for deployment state listener com.sap.tc.webdynpro.serverimpl.wdc.repository.RepositoryContainerHook.
    [EXCEPTION]
    com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to deploy the file '/usr/sap/RIA/JC30/j2ee/cluster/server0/./temp/webdynpro/public/freescale.com/c_uwl/webdynpro/ComponentInterfaces/com.sap.netweaver.bc.uwl.ui.UWLCustomDetail/UWLCustomDetail.xml' into the database. Reason: Development Object 'sap.com/tckmcbc.uwl.ui~wd_ui' contains already same repository content. Hint: fully qualified name of the repository VMO must be globally unique.
            at com.sap.tc.webdynpro.repository.deploy.RepositoryUpdateManager.checkVMOsExistInOtherDC(RepositoryUpdateManager.java:504)
            at com.sap.tc.webdynpro.repository.deploy.RepositoryUpdateManager.deployRepositoryContent(RepositoryUpdateManager.java:98)
            at com.sap.tc.webdynpro.serverimpl.wdc.repository.RepositoryContainerHook.onDeploy(RepositoryContainerHook.java:232)
    It seems it is using checkVMOsExistInOtherDC method from RepositoryUpdateManager.java file.
    I want to remove this method from that java file.
    Can any one please tell me at which location in server i can find that RepositoryUpdateManager.java file.
    Or from where i can find 'com.sap.tc.webdynpro.repository.api'  file, so that i can trace that jave file.
    Regards,
    Sambaran Chakraborty

    Jiandong,
    Add the required jar webdynprobasesvrc.jar file from follwoing path and check if the imports are added correctly.
    C:\Program Files\SAP\IDE\CE\eclipse\plugins\com.sap.tc_.wd_.basesrvc_1.0.0.071030103936\lib
    Chintan

  • How to use the com.sap.tc.webdynpro.progmodel.api.IWDView?

    hi,
       In every view, the "com.sap.tc.webdynpro.progmodel.api.IWDView view" is the parameter of the mothed wdDoModifyView(). I wonder, if we can make type com.sap.tc.webdynpro.progmodel.api.IWDView parameter in other methods which are designed by ourself. Thank you!

    Hi Daniel,
    This method wdDoModifyView will be raised every time the view is changed or refreshed (i.e. button pressed, drop down selected). This should cover all cases where you need IWDView, personally I can't think of another case where you need this parameter.
    As far as I know it is not possible but even if it is it's not recommended.
    But perhaps I'm wrong, I'll be happy to hear more opinions from more experienced SDNers...
    Roy

  • How toadd com.sap.tc.webdynpro.programmodel.api.IWDNode returntype tomethod

    Hi,
    can u tell me how to create supply function???
    i just gone through the PDF(Advanced Input Help - The Object Value Selector (OVS))
    In that he created supplufunction and 4 methods
    1)getOVSInputNode-com.sap.tc.webdynpro.programmodel.api.IWDNode
    2)getOVSListener-com.sap.tc.webdynpro.programmodel.api.IWDOVSContextNotificationlistener
    3)getOVSOutputtNode-com.sap.tc.webdynpro.programmodel.api.IWDNode
    4)SwithchOVSListener-String
    Can u plz tell me how to get these return types and how to create supply function just by clicking new in methods tab

    Hi Padma
    Follow These Steps of Implementing <i>Object Value Selector</i>
    <u><b>Component Controller</b></u>
    Create the Following Contexts in Component Controller
    Node1(Name,Location)
    Node2(Name,Age,Location)
    Source(Name,Age,Location)
    /*All are Type String*/
    Add the Following Code in Component Controller
    public void wdDoInit()
        //@@begin wdDoInit()
        String name[] = {"Arun","Boopathi","Bala"};
        String age[] = {"24","22","24"};
        String location[] = {"Erode","Gobi","Gingee"};
        IPublicOVS_Model_Comp.ISourceElement ele;
        for(int i=0;i<name.length;i++)
             ele = wdContext.nodeSource().createSourceElement();
             ele.setName(name<i>);
             ele.setAge(age<i>);
             ele.setLocation(location<i>);
             wdContext.nodeSource().addElement(ele);
        //@@end
    <b>Create a inner Class called ovslist between the begin and others in the Component controller which is found at the end of the code. If you created somewhere the coding will be lost. After creating the class type app and pres ctrl space you will be shown the list of api's with apply input values, on querry and apply result</b>
    //@@begin others
      public class ovslist implements IWDOVSContextNotificationListener
           /* (non-Javadoc)
          * @see com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener#applyInputValues(com.sap.tc.webdynpro.progmodel.api.IWDNodeElement, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement)
         public void applyInputValues(IWDNodeElement applicationNodeElement,IWDNodeElement queryInputNodeElement)
              // TODO Auto-generated method stub
              queryInputNodeElement.setAttributeValue("Name",applicationNodeElement.getAttributeAsText("Name"));
              queryInputNodeElement.setAttributeValue("Location",applicationNodeElement.getAttributeAsText("Location"));
         /* (non-Javadoc)
          * @see com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener#onQuery(com.sap.tc.webdynpro.progmodel.api.IWDNodeElement, com.sap.tc.webdynpro.progmodel.api.IWDNode)
         public void onQuery(IWDNodeElement queryInputNodeElement,IWDNode queryOutputNode)
              // TODO Auto-generated method stub
              IPublicOVS_Model_Comp.INode1Element input = (IPublicOVS_Model_Comp.INode1Element)queryInputNodeElement;
              IPublicOVS_Model_Comp.INode2Node output = (IPublicOVS_Model_Comp.INode2Node)queryOutputNode;
              String str_name = queryInputNodeElement.getAttributeAsText("Name");
              String str_location = queryInputNodeElement.getAttributeAsText("Location");
              String name_str = " ";
              String location_str = " ";
              String age_str = " ";
              boolean one,two;
              for(int i=0;i<wdContext.nodeSource().size();i++)
                   one = two = true;
                   name_str = wdContext.nodeSource().getSourceElementAt(i).getName();
                   location_str = wdContext.nodeSource().getSourceElementAt(i).getLocation();
                   age_str = wdContext.nodeSource().getSourceElementAt(i).getAge();
                   if(str_name.length()!=0)
                        one = str_name.matches(name_str);
                   if(str_location.length()!=0)
                        two = str_location.matches(location_str);
                   if(one && two)
                        IPublicOVS_Model_Comp.INode2Element ele = output.createNode2Element();
                        ele.setName(wdContext.nodeSource().getSourceElementAt(i).getName());
                        ele.setAge(wdContext.nodeSource().getSourceElementAt(i).getAge());
                        ele.setLocation(wdContext.nodeSource().getSourceElementAt(i).getLocation());
                        wdContext.nodeNode2().addElement(ele);
         /* (non-Javadoc)
          * @see com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener#applyResult(com.sap.tc.webdynpro.progmodel.api.IWDNodeElement, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement)
         public void applyResult(IWDNodeElement applicationNodeElement,IWDNodeElement queryOutputNodeElement)
              // TODO Auto-generated method stub
              IPrivateOVS_Model_View.IView_DisplayElement disp = (IPrivateOVS_Model_View.IView_DisplayElement)applicationNodeElement;
              IPublicOVS_Model_Comp.INode2Element out = (IPublicOVS_Model_Comp.INode2Element)queryOutputNodeElement;
              disp.setAttributeValue("Name",out.getAttributeAsText("Name"));
              disp.setAttributeValue("Age",out.getAttributeAsText("Age"));
              disp.setAttributeValue("Location",out.getAttributeAsText("Location"));     
      //@@end
    <b>Create a method ovslistener with the return type , while creating the method chosse return type in that select java native type and click browse,you will be showned a window Java Native Type Selection in that type IWDovscontextnotificationlistener and select that return type displayed click ok</b>.
    public com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener ovs_listener( )
        //@@begin ovs_listener()
        ovslist ovslist_obj = new ovslist();
        return ovslist_obj;
        //@@end
    <u><b>View Controller</b></u>
    Create the Following Context
    View_Display(Name,Age.Location)  /* All are type String only */
    Create the UI Elements for the Name age location
    public void wdDoInit()
        //@@begin wdDoInit()
        IWDAttributeInfo info[] = {wdContext.nodeView_Display().getNodeInfo().getAttribute("Name"),wdContext.nodeView_Display().getNodeInfo().getAttribute("Location")};
        IWDOVSContextNotificationListener obj = wdThis.wdGetOVS_Model_CompController().ovs_listener();
        WDValueServices.addOVSExtension(" ",info,wdThis.wdGetOVS_Model_CompController().wdGetContext().nodeNode1(),wdThis.wdGetOVS_Model_CompController().wdGetContext().nodeNode2(),obj);
        //@@end
    public static void wdDoModifyView(IPrivateOVS_Model_View wdThis, IPrivateOVS_Model_View.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        IWDAttributeInfo name = wdThis.wdGetOVS_Model_CompController().wdGetContext().nodeNode1().getNodeInfo().getAttribute("Name");
        name.getModifiableSimpleType().setFieldLabel("Name");
        IWDAttributeInfo location =wdThis.wdGetOVS_Model_CompController().wdGetContext().nodeNode1().getNodeInfo().getAttribute("Location");
        location.getModifiableSimpleType().setFieldLabel("Location");
        //@@end
    <b>Let me know You Understand My Code or Not
    Regards
    Chandran</b>

  • How to get a "com.sap.tc.webdynpro.progmodel.api.IWDView" object

    hi,everybody,
         As we all know, there is a com.sap.tc.webdynpro.progmodel.api.IWDView object in wdDoModifyView() parameters.We can use the IWDView object in the method or after the method.But in my project, I want to use the IWDView object before wdDoModifyView() method.I don't know how to create a IWDView object. Would you please help me.Thank you!

    Hi daniel,
                   wdModifyView is called by framework while rendering the view &  IWDView is used for it. Before wdDoModifyView its not possible according to me , may be u can check with armin.
    Hi Manoj,
                   First of all, even if u declare a variable , u can't initializae it before weDoModifyView. Apart from that its always suggested , not to access the IWDView outside the wdModifyView . i think that's why wdDoModifyView is static & called everytime ,u do anything with the view.
    regards
    Sumit

  • How to read "Customixed Information" in UME using WebDynpro Java APIs

    Dear All
    In our Portal UME we have defined 3 custom fields that appear in the "Customized Information"
    tab in the standard Portal "Identity Mangagement" application ie:
    krb5principalname :
    How can I retrieve the custom fields and values using WebDynpro APIs?
    I have the following basic code to retrieve the standard user session information, but
    do not know how to extend it to extract the values of the custom fields.
    Full points will be awarded to whoever answers question with suggestion that works.
    Many thanks in advance
    Mike

    Hi Mike,
    Following code is for just one custom attribute <custom attribute>
                                  String namespaces[] = umeUser.getAttributeNamespaces();
                                  String ns = null;
                                  for (int i = 0; i < namespaces.length; i++) {
                                       if (i > 0)
                                            ns = namespaces[ i ];
                                       String attrNames[] = umeUser.getAttributeNames(ns);
                                       if (ns != null){                                   
                                   if(ns.equals("<name-space>")){     
                                       for (int j = 0; j < attrNames.length; j++) {
                                            if(attrNames[j].equals("<custom attribute>")){                                        
                                                 Object attr[] = umeUser.getAttribute(ns, attrNames[j]);
                                                 for (int k = 0; k < attr.length; k++){
                                                      if(!(null == attr[k])|| !(attr[k].toString().length() == 0)){                                                  
                                                           //attr[k].toString() has the custom attribute value
                                                      break;
                                            }else
                                                 continue;               
                                   }else
                                       continue;
    Where <name-space> is the same value you set in config tool or on portal UME configuration.
    Config Tool: Global Service Configuration>services->com.sap.security.core.ume.service>ume.virtual_groups.user_attribute.namespace
    Portal
    System Administration>System Configuration>UME configuration> User Admin UI tab>
    Custom attributes of the user profile
    Administrator-Managed Custom Attributes: add ;<name-space>:<custom-attribute>
    Hope this helps

  • Webdynpro Java API Connection to MDM 7.1

    Hello,
    I have created several Webdynpro Java Applications to Connect to the MDM Repository and update/delete Records. To connect to the Repository ,I used the UserSession Context with which the userid/password is specified to connect to the Repository.
    Now , if in future the password changes, I have to modify it in the UserSession Context Object each time . So is there a way ,we just update the password in one central location/file and the Webdynpro Java Application picks it up from there.
    Any help would be highly Appreciated.

    Sure
    Thanks for the SAP Note, its a direct solution from SAP.
    However I didnt have much time to implement it so found a workaround.
    In my project we use MDM WD Configurations as well.
    So I created a dummy ItemDetails WD Configuration( whose project uses the Destination is configured to use PROPAGATION)
    line 1 : Created an emty RepositoryBean object : _repositoryBean = new RepositoryBean()
    line 2 : wdThis.wdGetUC_ItemDetailsInterface().setConfiguration("<MDM WD PROJECT>", "<MDM WD CONFIG>"); //could be any config : resultset search ID
    line 3 : (UserSessionContext)_repositoryBean.getUserSessionContext()
    And viola I got it without any more coding

  • Issues in using KM APIs in Webdynpro

    we have an issue.
    We have an application written in servlets to retrieve KM attributes.
    We are now trying to embed it with webdynpro. We just extracted what we require from servlet code and used it in WebDynpro.
    But from the errors it is showing what we understood is that the objects are not supported by WebDynpro or may be they are deprecated.
    So what we want to know is that
    Whether we will be able to call the servlet itself from webdynpro
    Where we will get later versions of KM APIs and how to use it.
    Whether the approach we take is wrong
    This is our action part
    public void onActionon_retrieve(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionon_retrieve(ServerEvent)
         IUser serviceUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
                             //IUser serviceuser = WPUMFactory.getUserFactory().getEP5User(request.getUser());
                             ResourceContext c = new ResourceContext(serviceUser);
                             // Retrieve a resource from the KM repository framework
                             IResource r = ResourceFactory.getInstance().getResource(RID.getRID("/documents"), c);
                             // read some information from the IResource and print it on the
                             // servlet request
                             //s.append("<b>Access RID</b>: "r.getAccessRID().toString()"<br>");
                        //     s.append("<b>Display Name</b>: "r.getDisplayName(true)"<br>");
                        //     s.append("<b>Properties list</b>: "r.getProperties().toString()"<br>");
                        //     s.append("<b>Current user</b>: "r.getContext().getUser().getDisplayName()"<br>");
                        String s = r.getproperties.toString();
        //@@end
    Can anyone please help us on what to do?
    Thanks
    gayathri.

    Hi Gayatri
    Did you get a chance to complete the above mentioned task.If so please suggest me too, since I do have a simillar task for me to complete.
    Thanks
    Bala

  • Database connection in a WebDynpro Application - urgent

    Hi
    I am facing a problem with database connection. I am trying to develop a normal webdynpro application.
    I want to retrieve data from a table and show it.
    But my query is not giving the expected output. It is not even raising errors.
    Please give me an answer
    Thanks & regards
    Aparnna

    Connection con=null;
      Statement st=null;
      ResultSet rs=null;
    public void wdDoInit()
        //@@begin wdDoInit()
    try
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      con = DriverManager.getConnection("jdbc:odbc:erdsn","root","enteg123");
      st=con.createStatement();
        catch(Exception e){
        //@@end
    public void onActiononClickLogin(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActiononClickLogin(ServerEvent)
         String desig=null;
    try{
    rs = st.executeQuery("select *  from Login where Empid like uid and Pword like pw");
        if(rs.next()){
               desig=rs.getString("Designation");
         wdComponentAPI.getComponent().getMessageManager().reportSuccess(desig);
        if(desig.equalsIgnoreCase("Employee")){
              wdThis.wdFirePlugEmpOutPlug();
         else
         wdComponentAPI.getComponent().getMessageManager().reportWarning("Invalid input!");
          }catch(Exception e){

  • Weird Problem in WebDynpro

    Hi gurus!!
    I created a WD project:
    - created a model with reference to a ZBAPI
    - created a Component
    - created a Custom Controller with 2 nodes: one to the INPUT class of the model, and the other to the OUTPUT class of the model
    - created a View Main
    - created a View Result
    - bind the context of view Main to the INPUT node of the custom controller
    - bind the context of view Result to the OUTPUT node of the custom controller
    - At the end I have 2 views of the same component related to the same custom controller, and this custom controller related to both the INPUT and OUTPUT classes of the main model
    - added the fields to the corresponding views
    - on the view Main:
      public void wdDoInit()
        //@@begin wdDoInit()
        Bapi_header_getdetail = new Zbapi_Wty_Header_Getdetail_Input();
        wdContext.nodeInput().bind(Bapi_header_getdetail);
        //@@end
    - added a button to the view Main, and on the action:
      public void onActionBuscar(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionBuscar(ServerEvent)
       try {
       Bapi_header_getdetail.execute();
       wdThis.wdFirePlugToResult();
       } catch (Exception ex) {
          ex.printStackTrace();
        //@@end
    - added a viewset to the Main window, and embedded both views to the viewset.
    - created the inbound and outbound plugs to the corresponding views
    - created a project, deploy and run
    I execute the app, push the button, but no values are displayed on the results view.
    I verified the bapi, it's getting executed and is returning the values correctly, but still they're not getting displayed. I made sure of that, because I have the bapi create a text file on the server with the values it found, so I know for sure it's getting executed correctly.
    I wonder if there's some step I might have missed.
    The BAPI has 2 import parameters, and a Z structure as an export parameter.
    Does anyone have a clue what might be the error!?
    Thanx
    Jesus

    Hi Jesus,
    I think BAPI is not executing properly. Check the size of Output Node.
    Try this.
    public void onActionBuscar(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionBuscar(ServerEvent)
    try {
    wdContext.currentZbapi_Wty_Header_Getdetail_InputElement().modelObject().execute();
    wdContext.nodeOutput().invalidate();
    wdComponentAPI.getMessageManager().reportSuccess("Output Node Size : "+wdContext. nodeOutput().size());
    wdThis.wdFirePlugToResult();
    } catch (Exception ex) {
    ex.printStackTrace();
    //@@end
    populating a table with bapi
    Regards,
    Mithu

  • Error While Deploying Webdynpro Application.

    Dear Experts,
    While deploying web dynpro application having webservice based Model, I am getting following errors-
    <b>'SERVICEID' not defined for model class 'Request_ZHRESS_STATION_REQUISITION'</b>
    I have checked model structure where I can see that this attribute "SERVICE ID" is there and properly configured with the Model. It's also generating with the autocompeletion facility while writing the code. This attribute is used to pass the parameter to Model for its execution.
    Please Help! to resolev this problem as I am not able to proceed ahead in my project.
    Thanks in advance!
    Regards,
    Roshan

    Hi Roshan,
    Reimport the bapi once again.
    In the diagram view do the context mapping properly between
    1>     component controller and used model (Bapi Model)
    2>      views and component controller.
    According to context structure.
    Bapi_Employee_Getdata_Input
    |--- Output
    | -
    Personal_Data(under Output node )
    |--- Employee_Id
    Take a method say “GetEmployeeDetailsByNo” inside component controller with parameter “empid” of type string.
    Use this implementation.
    public void GetEmployeeDetailsByNo( java.lang.String empid )
    //@@begin GetEmployeeDetailsByNo()
    IWDMessageManager msg = wdComponentAPI.getMessageManager();
    try {
    Bapi_Employee_Getdata_Input input = new Bapi_Employee_Getdata_Input();
    input.setEmployee_Id(empid);
    wdContext.nodeBapi_Employee_Getdata_Input().bind(input);
    wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();
    wdContext.nodePersonal_Data().invalidate();
    } catch (Exception e) {
    // TODO Auto-generated catch block
    msg.reportSuccess(e.getMessage());
    e.printStackTrace();
    //@@end
    Now go to the view and bind the Model node (Bapi_Employee_Getdata_Input
    ) in the view layout.
    And inside “on action” event of “Search”button uses this code.
    public void onActionGoEmpSearch(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionGoEmpSearch(ServerEvent)
    wdThis.wdGetEmployeeCompController().GetEmployeeDetailsByNo(wdContext.currentBapi_Employee_Getdata_InputElement().getEmployee_Id());
    //@@end
    public void wdDoInit()
    //@@begin wdDoInit()
    Bapi_Employee_Getdata_Input bapiInput = new Bapi_Employee_Getdata_Input();
    wdContext.nodeBapi_Employee_Getdata_Input().bind(bapiInput);
    //@@end
    Use the code according to your BAPI name.
    Regards,
    Mithu

  • Error while Uploading the docs into KM using webdynpro for java

    In My view I have create a context node(ctx_va_FileData) with value attribute (ctx_va_FileResource) of type ,Resource.
    Select the Simple Type, navigate to Dictionaries u2192 Local Dictionary u2192com.sap.ide.webdynpro.uielementdefinitions and select Resource.
    In View part of Layout :Create one u201CFileUpload u201C UI with Create one LinkToAction IU element and assign u201CaUploadFileinto_KMu201D action to this action
    Coding Part in Web Dynpro java
    Step 1:
    Go to the wdDoInit() method and paste the following code
    public void wdDoInit()
    //@@begin wdDoInit()
    try {
    IPrivateUploadFile_KMView.ICtx_vn_FileDataElement element = wdContext.createCtx_vn_FileDataElement();
    if (element != null)
    wdContext.nodeCtx_vn_FileData().bind(element);
    }catch (Exception e) {
    wdComponentAPI.getMessageManager().reportSuccess("Error: " + e.getCause().toString());
    //@@end
    Go to the onActionaUploadFileinto_KM and paste the following code
    public void onActionaUploadFileinto_KM(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionaUploadFileinto_KM(ServerEvent)
    msgMgr = wdComponentAPI.getMessageManager();
    IPrivateUploadFile_KMView.ICtx_vn_FileDataElement element =
    wdcontext.currentCtx_vn_FileDataElement();
    IWDResource resource = element.getCtx_va_FileResource();
    if(resource!=null){
    try {
    //To get the Current User
    IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
    com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
    com.sapportals.portal.security.usermanagement.IUser ep5User =
    WPUMFactory.getUserFactory().getEP5User(sapUser);
    ResourceContext resourseContext = new ResourceContext(ep5User);
    //Portal KM Path
    RID pathRID = RID.getRID("/documents/SDN"); //Root Directory
    IResourceFactory resourseFactory =
    com.sapportals.wcm.repository.ResourceFactory.getInstance();
    ICollection collection = (ICollection)resourseFactory.getResource(pathRID,
    resourseContext);
    //Read the File
    InputStream stream = resource.read(true);
    String resourceName = resource.getResourceName();
    String resourceExtn = resource.getResourceType().getFileExtension();
    //KM Content
    Content cont = new Content(stream,"application/octet-stream",-1,"UTF-16");
    //create a file in above mentioned path in KM
    com.sapportals.wcm.repository.IResource new_resource =
    (com.sapportals.wcm.repository.IResource)collection.
    createResource(resourceName, null, cont);
    //Get the File length
    long contentLen = new_resource.getContent().getContentLength();
    //If no data in file
    if(contentLen <= 0){
    msgMgr.reportException("No data in file" , true);
    }else {
    msgMgr.reportMessage(IMessageUploadFile_KMComp.SF__UPLOAD,
    new Object[] {resourceName},true);
    } catch (NotSupportedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (AccessDeniedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (WDUMException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (ResourceException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (ContentException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (UserManagementException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }else
    msgMgr.reportException("No file Selected ,Browse the file!",true);
    element.setCtx_va_FileResource(null);
    }//End of Action
    But in the  onActionaUploadFileinto_KM  part  IUser is deprecated and i m stuck at that point.
    Plz provide me the solution and is there ant alternative solution for this and MY Portal is EP6 Nwds version is 7.0.9

    Hi Sukalyan,
    Have you checked the below links?
    These will give you step by step implementation procedure.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a099a3bd-17ef-2b10-e6ac-9c1ea42af0e9?quicklink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/WDJava/KmuploadusingWebdynproapplication
    Regards,
    Sandip

  • Error while previewing deployed webdynpro application.

    Hi,
    I am a newcomer to the EP environment. After installing the server and configuring NWDS, I created a simple webdynpro application. I was able to successfully deploy it to the portal but when I try to preview it I got the following error. Please shed some light on this. I am working on EP 6.0.
    An error has occurred:
    "Failed to process the request."
    Please contact your system administrator.
    Hide details
    Web Dynpro client:
    HTML Client
    Web Dynpro client capabilities:
    User agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322), version: null, DOM version: null, client type: msie6, client type profile: ie6, ActiveX: enabled, Cookies: enabled, Frames: enabled, Java applets: enabled, JavaScript: enabled, Tables: enabled, VB Script: enabled
    Web Dynpro runtime:
    Vendor: SAP, Build ID: 6.4009.00.0000.20041104173322.0000 (release=630_REL, buildtime=2004-11-18:22:17:10[UTC], changelist=298578, host=PWDFM027)
    Web Dynpro code generators of DC local/Test_WD:
    SapDictionaryGenerationCore: 6.4019.00.0000.20061005103449.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:17:59[UTC], changelist=419709, host=PWDFM026.wdf.sap.corp)
    SapMetamodelWebDynpro: 6.4019.00.0000.20061005104005.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:23:05[UTC], changelist=419717, host=PWDFM026.wdf.sap.corp)
    SapMetamodelCore: 6.4019.00.0000.20061005103956.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:11:19[UTC], changelist=419716, host=PWDFM026.wdf.sap.corp)
    SapWebDynproGenerationTemplates: 6.4019.00.0000.20061005104024.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:50:52[UTC], changelist=419718, host=PWDFM026)
    SapWebDynproGenerationCTemplates: 6.4019.00.0000.20061005104024.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:50:52[UTC], changelist=419718, host=PWDFM026)
    SapGenerationFrameworkCore: 6.4019.00.0000.20050818152155.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:10:28[UTC], changelist=363812, host=PWDFM026.wdf.sap.corp)
    SapIdeWebDynproCheckLayer: 6.4019.00.0000.20061005104123.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:27:18[UTC], changelist=419723, host=PWDFM026.wdf.sap.corp)
    SapMetamodelDictionary: 6.4019.00.0000.20060119123716.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:15:01[UTC], changelist=385561, host=PWDFM026.wdf.sap.corp)
    SapMetamodelCommon: 6.4019.00.0000.20061005103956.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:11:28[UTC], changelist=419716, host=PWDFM026.wdf.sap.corp)
    SapWebDynproGenerationCore: 6.4019.00.0000.20061005104123.0000 (release=630_VAL_REL, buildtime=2006-10-26:20:27:47[UTC], changelist=419723, host=PWDFM026.wdf.sap.corp)
    SapDictionaryGenerationTemplates: (unknown)
    Web Dynpro code generators of DC sap.com/tcwddispwda:
    No information available
    Web Dynpro code generators of DC sap.com/tcwdcorecomp:
    No information available
    J2EE Engine:
    No information available
    Java VM:
    Java HotSpot(TM) Server VM, version: 1.4.2_05-b04, vendor: Sun Microsystems Inc.
    Operating system:
    Windows 2000, version: 5.0, architecture: x86
    Error stacktrace:
    java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/progmodel/api/IWDEventHandlerId
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
         at java.lang.Class.getConstructors(Class.java:865)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:68)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingInterfaceView.<init>(DelegatingInterfaceView.java:44)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:131)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:374)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:593)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

    Hi,
    In NWDS, have you depoyed this application? while deploying does it throw any error??or successfully getting deployed? for deploying the application please choose deploy and Run option.This will deploy as well as run your application.
    Regards,
    Ameya
    Message was edited by:
            Ameya Pimpalgaonkar

  • Java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/adsproxy/types/p1/RpDa

    Hi All,
    I have created and deployed an EJB application in CE7.1,I am using this jars "_webdynpro_pdfobject.jar",for read the xml data in pdf ,For that time i am getting following errors",
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/adsproxy/types/p1/RpDataat com.sap.tc.webdynpro.pdfobject.api.WDPDFObjectFactory.getPDFObject(WDPDFObjectFactory.java:43)
    Plz anyone suggest
    Regards,
    Vinoth Raja.V

    Well, first of all, you should not use a Web Dynpro API in an EJB app. Web Dynpro is a UI technology, EJB implements the business logic.
    Furthermore, the PDFObject API has been deprecated. For more information and guidance, please refer to its [javadoc|http://help.sap.com/javadocs/nwce/current/wdr/com/sap/tc/webdynpro/pdfobject/api/package-summary.html].
    HTH!
    \-- Vladimir
    P.S.: Please read the [Rules|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], in particular regarding cross-posting.

  • How to call keys CTRL+P in WebDynpro Java

    Hi,
    I'm trying to print a html document into Web Dynpro but for me it's very difficult cause is a dinamically content with a lot of text. So I would like  when a push the button print call the keys CTRL+P. It's possible?
    Thanks and sorry for my English!

    It's possible and how?
    This the solution.... One hour after I find the solution.
    public void onActionPrint(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrintEncuestaPDF(ServerEvent)
        try{
              Robot robot = new Robot();
              //CTRL+P
              robot.keyPress(KeyEvent.VK_CONTROL );
              robot.keyPress(KeyEvent.VK_P );
              robot.keyRelease(KeyEvent.VK_CONTROL );
              robot.keyRelease(KeyEvent.VK_P );
              //Alt+U
              robot.keyPress(KeyEvent.VK_ALT );
              robot.keyPress(KeyEvent.VK_U );
              robot.keyRelease(KeyEvent.VK_ALT );
              robot.keyRelease(KeyEvent.VK_U );
              //ENTER
              robot.keyPress(KeyEvent.VK_ENTER);
              robot.keyRelease(KeyEvent.VK_ENTER );
    catch(Exception e){  }
    Thanks

Maybe you are looking for