Controller references

Hi All,
I have very basic doubts regarding Webdynpro classes and mehods. Im new to ABAP objects also.
1) First of all if I'm writing any program, i should know what are the standard classes and methods available for this scenario, How to find this...
for example when I started working on ALV in webdynpro.. I dnt know what are the classes  available to do this. Once I search forum I came to know what I have to use. But what is the normal way to find?
2) in the following code, "wd_this" represents local controller interface.
"    wd_this->wd_cpuse_select_options( )" means  we want to call this method "wd_cpuse_select_options( )"  from the local controller interface. but if i double click the method, I didnt find this method at all to see its defnition.
data lo_comp_usage type ref to if_wd_component_usage.
lo_comp_usage = wd_this->wd_cpuse_select_options( ).
Is my understanding correct? I'm going through Object oriented concepts also, but I'm not a fast learner. Pls. bear with me.
Warm Regards,
Smitha

Hi,
To determine the classes corresponding to UI elements you can right click on the respective UI element which is added to your rootuilement container and select ' Display UI document'.
Most of the classes in WD follow the naming convention
CL_WD_*
Also interfaces for component controller, view, node etc have term WD in between, you can do a wildcard search for this.
Also when you create a webdynpro component, local class which implement the interface for component controller, view, window are created, that is why you are not able to see methods of wd_this.
To see the methods of wd_this ( component controller ) check interface IF_WD_COMPONENT.
When you create attributes, context nodes, component usages, automatically some default constants will be created in your component controller implementation class
In your case wd_this->wd_cpuse_select_options( ). is nothing but a component controller class constant attribute as you must have used component IF_WD_SELECT_OPTIONS in your comp controller.
I hope that explanation clears your doubt.
For more details you can refer to WD online help.
Regards
Manas Dua

Similar Messages

  • View controller reference

    Hi
    How do I obtain the view controller reference of a different view to the one I'm in?
    For example, My window is made of of two views, MAIN and DETAILS.  I wish to check the mandatory fields in MAIN and DETAILS from a method on the component controller.
    Therefore, how would I obtain the references?  Do I need to set up attributes on the component controller and then populate them in the WDDOINIT of each view?
    Cheers
    Ian

    Hi Ian,
    Create a component controller method check_mandatory_fields
    The following should the parameter interface of the method.
    I_VIEW_CONTROLLER     Importing     Type ref to IF_WD_VIEW_CONTROLLER
    In this method, call cl_wd_dynamic_tool=>check_mandatory_attr_on_view to do the validation.
    In main view, when you want to validate the records, do the following.
      DATA: lo_view_controller TYPE REF TO if_wd_view_controller.
      lo_view_controller ?= wd_this->wd_get_api( ).
      wd_comp_controller->check_mandatory_fields(
        EXPORTING
          i_view_controller = lo_view_controller ).
    These validation can be done at view level. So in detaild view, when you want to validate do the same as mentioned above.
    Regards,
    Sravan varagani

  • Unable to create FXMLLoader controller reference: 'no suitable constructor'

    Greetings,
    I am in my first couple of days experimenting with JavaFX.
    I am trying to create a reference to my controller class from within my application start routine. All the posts that I have seen on this call for code such as the following:
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MyFXML.fxml")); But in my NetBeans IDE editor this code signals the error 'no suitable constructor found for FXMLLoader(java.net.URL)'
    The FXMLLoader Class documentation clearly includes a FXMLLoader(java.net.URL) constructor. However, when I navigate to the source code from NetBeans, this constructor doesn't show: the only options are FXMLLoader() and FXMLLoader(Charset arg0).
    I am using NetBeans 7.1.2 ee version. I was using JavaFX 2.0, then downloaded the JavaFX 2.2 SDK (beta) to see if this would make a difference -- it hasn't.
    Any ideas would be much appreciated.

    Hi,
    My guess would be that NetBeans is still picking up the JavaFX 2.0 jars instead of JavaFX 2.2
    I would suggest playing with your project's properties: look at the library dependencies, and at the platform.
    If it's using a Default_JavaFX_Platform then check where it picks up JavaFX (click on "manage platform" and look in the JavaFX tab).
    Sometimes NetBeans is confused and will pick up the SDK 2.2 with the runtime 2.0 - so really check all the paths!
    Hopes this helps,
    -- daniel
    Edited by: daniel on Jun 13, 2012 6:18 AM

  • Cisco 526 Wireless Express Mobility Controller

    We have just purchased at UC520, 526 Controller and a LAP521 controller. We got the UC520 up and running in 15 mins, but the 526 does not include very much documentation. We can not get it to find the 521 AP on the network nor will it go to layer 2 mode. I don't want to setup layer 3 routing for a 4 PC office. During the setup the only option it gives is layer 3 and the documentation says it will do layer 2? Can anyone give me any assistance?

    The controller reference between layer2 and layer3 is a little misleading. Having the WLC (WLAN Controller) in layer2 mode means that it uses layer 2 frame headers to place the LWAPP information in. With the WLC in layer3 mode, the WLC places the LWAPP header in the IP packet header instead of on the layer 2 frame header. The newer AP's support only understanding the layer3 mode of placing LWAPP info in the layer3 packet header. In either mode, you can still configure your network with only one VLAN/subnet, which sounds like your goal. To summarize, the WLC's mode of layer2 vs layer3 only references where the LWAPP header is placed in either the frame or the packet and in no way correspondes to how you design the vlan's/subnet's of your network.

  • How to get rid of the Exceptions

    When I tried to open the client i.e User interface which is MainMenuApp received NO_PERMISSION CORBA exception while attempting to get an initial reference to the mvcf_ControllerFactory from the FactoryFinder. Software defect that should be addressed is that the UI did not recover after catching the exception and required a restart of the UI to connect.
    The problem is that cleanWorkspace() in CorbaAdapter doesn't have any failover logic in it at all. The adapter is assumed to be good and if it is not cleanWorkspace() attempts to use a factory that doesn't exist. This throws an uncaught NullPointerException that blows out to MainMenuApp where it is interpreted as a fatal exception and prevents the main menu from starting. So please help me in writing the failover logic in CorbaAdapter
    The code for cleanWorkspace is
    * Cleans up the entire logical positions workspace.
    * @throws AdapterException UserError or Error occured
    public synchronized void cleanWorkspace() throws AdapterException
    cut_ContextInitData cid = getContextInitData();
    cid.clientId = "*";
    MVC2CleanWorkspaceCmd cmd = new MVC2CleanWorkspaceCmd(cid);
    execute(cmd);
    I am giving the whole logic of Corba Adapter. This might help:
    package com.ge.trans.tms.comm;
    import java.util.*;
    import org.omg.CORBA.CompletionStatus;
    import com.beasys.Tobj.FactoryFinder;
    import com.ge.trans.tms.ui.util.ExceptionHandler;
    import com.ge.trans.tms.util.Log;
    import com.ge.trans.tms.util.StringUtils;
    import com.ge.trans.tms.forms.mainmenu.Globals;
    import pds.cut_IDLCommon.cut_ContextInitData;
    import pds.cut_IDLCommon.cut_ValidationResult;
    import pds.cut_IDLContainers.cut_KeyValuePair;
    import pds.cut_IDLContainers.cut_KeyValueSequenceHolder;
    import pds.cut_IDLContainers.cut_StringSeqSeqHolder;
    import pds.cut_IDLContainers.cut_StringSequenceHolder;
    import pds.cut_IDLExceptions.cut_Error;
    import pds.cut_IDLExceptions.cut_InternalError;
    import pds.cut_IDLExceptions.cut_UserError;
    import pds.cut_IDLExceptions.cut_ModelNotFoundError;
    import pds.cut_IDLExceptions.cut_DBDeadlockError;
    import pds.mvct.mvct_ParentTableInfo;
    import com.ge.trans.tms.util.BM;
    import pds.mvcs_ControllerFactory;
    import pds.mvcs_ControllerFactoryHelper;
    import pds.mvcs_ControllerProxy;
    * Title: CorbaAdapter Description: This class provides a generic, 100% java
    * interface for its clients (UI for example) to create, query, and modify
    * remote data models. The methods in this class foward client requests through
    * calls on generated Java/Corba client stubs with disregard to the server-side
    * controller/model objects location or language implementation. This is
    * currently the only portal for the clients to communicate with the
    * server-side model/controller framework. Therefore, this class should mirror
    * the complete model/controller interface as provide in the mvcs_Controller
    * idl. This class provides constructors that hide all Corba initialization and
    * messaging implementation from its clients.
    public class CorbaAdapter extends AbstractAdapter
    protected String factoryDomainSuffix = "MVC";
    private mvcs_ControllerFactory factory;
    private mvcs_ControllerProxy controller;
    public synchronized mvcs_ControllerProxy getController()
    return controller;
    protected String getFactoryDomainSuffix() {
    return _factoryDomainSuffix;
    * Constructor Initializes the connection and generic factory finder. This
    * constructor should be used when the cleint does not want to immediately
    * create a new handle (controller) to a new or existing model. <p>
    * Preconditions: none
    * @param domain
    * @param listener <p>
    * Postconditions: If domain is null, then
    * AdapterConstants.DEFAULT_DOMAIN will be used as the domain name. If
    * listener is null, neither the caller or any other client will
    * receive error messages
    public CorbaAdapter(
    String domain,
    MessageListener listener,
    ConnectionListener connectionListener,
    boolean uniqueConnection ) throws AdapterException
    this(domain, listener, connectionListener, uniqueConnection, true);
    public CorbaAdapter(
    String domain,
    MessageListener listener,
    ConnectionListener connectionListener,
    boolean uniqueConnection,
    boolean geoAdapter ) throws AdapterException
    super( listener );
    setDomain( domain );
    _geoPartitioned = geoAdapter;
    //flag to stop retrying after failure to find factory
    this.uniqueConnection = uniqueConnection;
    String param = System.getProperty(AdapterConstants.POOLED_CONNECTION);
    if((param != null) && (param.equals("true"))) {
    this.pooledConnection = true;
    initialize();
    protected Connection makeConnection() throws Exception
    Connection connection = null;
    if( !pooledConnection )
    connection = (CorbaConnection)ConnectionFactory.getDefaultConnection(
    new ConnectionListener[] { this, additionalConnectionListener } );
    else
    String tempDomain = "";
    if(domain.equals("LOGICAL_POSITION")) {
    tempDomain = "MVC_LOGICAL_POSITION";
    } else {
    tempDomain = domain;
    connection = (CorbaConnection)
    PooledConnectionFactory.instance().getPooledConnection(tempDomain);
    if(connection != null) {
    connection.addConnectionListeners(
    new ConnectionListener[] { this, additionalConnectionListener } );
    return connection;
    * clients should never call this method as this is a the destructor for
    * this class and should only be called by the system before the garbage
    * collector sweeps away this object NOTE: there is no guarantee when the
    * system will call this method, so if a resource is in short supply,
    * manage that resource another way
    protected void finalize()
    if(Log.isEnterEnabled())Log.enter( CorbaAdapter.class, "Entering finalize..." );
    // cannot enusre all clients call cleanup fromt their code
    // so do this is defensive programming
    cleanup();
    if(Log.isLeaveEnabled())Log.leave( CorbaAdapter.class, "Leaving finalize..." );
    /** This should only be called when the adapter knows that it's
    * current connection has been repaired and the adapater's current
    * workspace (remote stub) needs to be initialized using the new connection
    * (IOR for new server).
    * This method should only be called from another which has a lock on the
    * current connection. Currently this method is only called from
    * verifyConnectionStatus().
    private boolean convertController()
    if ( controller == null ) {
    Log.error(CorbaAdapter.class, "convertController()",
    "CONVERT_CONTROLLER CALLED WITH CONTROLLER == NULL",
    new Exception("Fix Me"));
    MVC2ConvertControllerCmd cmd = new MVC2ConvertControllerCmd();
    execute(cmd);
    return (((String) cmd.getReturnValue()).equals(AdapterConstants.SUCCESS));
    * Initializes an existing adapter to a new controller/model.
    * @return AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String setController()
    AbstractCmd cmd = new MVC2SetControllerCmd();
    execute(cmd);
    Log.debug (getClass (), "returning from set controller :"+(String) cmd.getReturnValue());
    return ((String) cmd.getReturnValue());
    * Initializes an existing adapter to a new controller/existing model using
    * the current domain name and user data <p>
    * Preconditions:
    * @param domainName must represent a valid domain name
    * @param businessKey must represent a valid business key of an existing
    * model in the database. <p>
    * Postconditions: If the adapter has a initailized controller it is
    * uninitialized notifies registered MessageListener if businessKey
    * does not represent a valid model that already exists in the
    * database. notifies registered UIIFatalMessageListener of all fatal
    * server errors
    * @return Description of the Return Value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String setController(Map businessKey)
    AbstractCmd cmd = new MVC2SetControllerCmd(businessKey);
    execute(cmd);
    Log.debug (getClass (), "returning from set controller bus key:"+(String) cmd.getReturnValue());
    return ((String) cmd.getReturnValue());
    private boolean clientInitialized()
    return clientInitialized( true );
    private boolean clientInitialized( boolean remoteStub )
    forceConnectionChange = false;
    if(getController()==null)
    Log.info(CorbaAdapter.class,
    "clientInitialized()",
    "(getController()==null):'"+(getController()==null)+"'");
    // obtain lock on used by this adapter and its' connection
    // before checking any values that could be changed by a shared
    // connection in another thread
    synchronized( this.adapterConnectionMonitor )
    if( !this.connectionRepaired && !this.connectionBroken )
    if( !healthyConnection )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "healthyConnection:'"+healthyConnection+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_CONNECTION'");
    fireFatalErrorHandler( AdapterConstants.NULL_CONNECTION );
    return false;
    else if( !healthyRemoteFactory )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "healthyRemoteFactory:'"+healthyRemoteFactory+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_REMOTE_FACTORY'");
    fireFatalErrorHandler( AdapterConstants.NULL_REMOTE_FACTORY );
    return false;
    else if( remoteStub && !healthyRemoteStub )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "remoteStub:'"+remoteStub+"' "+
    "healthyRemoteStub:'"+healthyRemoteStub+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_REMOTE_STUB'");
    fireFatalErrorHandler( AdapterConstants.NULL_REMOTE_STUB );
    return false;
    return true;
    } // release lock on used by this adapter and its' connection
    * This method should be called when the client has finished working with
    * the controller. <p>
    * Preconditions: controller (domain specific remote stub) must be
    * initialized. <p>
    * Postconditions: Cleans up any session state and removes the client's
    * workspace from existence. After this method is called, the client will
    * no longer be able to make calls on the controller without obtaining
    * another controller reference and re-initializing. Any changes made by
    * the client since calling commitChanges() are lost (i.e., the client is
    * responsible for calling commitChanges() before exiting).
    * @return AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String exit()
    AbstractCmd cmd = new MVC2ExitCmd();
    execute(cmd);
    String returnValue = (String) cmd.getReturnValue();
    if(returnValue.equals(AdapterConstants.SUCCESS))
    controller = null;
    healthyRemoteStub = false;
    return returnValue;
    * Reports whether adapters controller is currently initialized
    * @return The active value
    public synchronized boolean isActive()
    // obtain lock used by this adapter so that another method can NOT be
    // called on this adapter instance from another thread at the same
    // time
    synchronized( this.adapterConnectionMonitor )
    return ( controller != null );
    * Preconditions: the controller is initialized Postconditions: Returns the
    * domain name from the model we are controlling. <p>
    * notifies registered UIIFatalMessageListener of all fatal server errors
    * @return The domainName value or AdapterConstants.ERROR
    public synchronized String getDomainName() // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetDomainNameCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller is initialized Postconditions: Returns a
    * "user context," set by the user of this controller and otherwise not
    * used by the mvc2 framework. Context is data only kept in the controller
    * (if at all) and not the model. <p>
    * notifies registered UIIFatalMessageListener of all fatal server errors
    * @return The context value or AdapterConstants.ERROR
    public synchronized String getContext() // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetContextCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller is initialized
    * @param value saved as a "user context," set by the user of this
    * controller and used by domain or customer derived controllers. <p>
    * notifies registered UIIFatalMessageListener of all fatal server
    * errors
    * @return AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String setContext( String value )
    AbstractCmd cmd = new MVC2SetContextCmd(value);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Sets a key on the server.
    * @param property key to set
    * @param value value
    * @return String retruned by service provider or Adapter.ERROR
    public synchronized String setValue( String key, String value )
    AbstractCmd cmd = new MVC2SetValueCmd(key, value);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized
    * @param property is a valid property of the model <p>
    * Postconditions: notifies registered UIMessageListeners if property
    * is not valid notifies registered UIIFatalMessageListener(s) of any
    * fatal server errors
    * @return The value value
    * @returns the current value of the specified property or
    * AdapterConstants.ERROR
    public synchronized String getValue( String property ) // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetValueCmd(property);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and propertyValueMap
    * is not null All properties given is propertyValueMap are valid
    * properties of the model.
    * Postconditions: All values for the properties in the map are added to
    * the map.
    * @param propertyValueMap each KeyValuePair element will have its value
    * set based on its key notifies registered UIMessageListeners if any
    * property given in the map is not a valid property of the model. If
    * this happens, the map is unchanged. notifies registered
    * UIIFatalMessageListener(s) of any fatal server errors
    * @return The values value
    * @returns AdapterConstants.SUCCESS or
    * AdapterConstants.ERROR
    public synchronized String getValues( Map propertyValueMap )
    AbstractCmd cmd = new MVC2GetValuesCmd(propertyValueMap);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: controller has been initialized and propertyValueMap is
    * not null <p>
    * Postconditions: All properties and their associated values are added to
    * the propertyValueMap. Prior contents of the map are NOT erased.
    * @param propertyValueMap will be cleared then filled with KeyValuePair
    * object references notifies registered UIIFatalMessageListener(s) of
    * any fatal server errors <p>
    * @return The allValues value
    * @returns AdapterConstants.SUCCESS or
    * AdapterConstants.ERROR NOTE: The actual definition of what "all
    * values" mean is left to the designers of the UI and the Controller
    * but should reflect what is in the models' metamodel
    public synchronized String getAllValues( Map propertyValueMap )
    AbstractCmd cmd = new MVC2GetAllValuesCmd(propertyValueMap);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Invoke a method on controller.
    * @param method Method to invoke on controller
    * @param values input/output values sent and returned from controller
    * @return String from service on success or AdapterConstrants.ERROR
    public synchronized String invokeMethod( String method, List values )
    AbstractCmd cmd = new MVC2InvokeMethodCmd(method, values);
    execute(cmd);
    return (String) cmd.getReturnValue();
    * Preconditions: the controller has been initialized Postconditions:
    * Validates the state of the model for committing, copies the transient
    * model to the persistent model, and commits it to the database. <p>
    * reports a user error(s) to registered MessageListener s if the state of
    * the model is not a valid one for commiting. reports all fatal server
    * errors to registered UIIFatalMessageListener s <p>
    * @return Description of the Return Value
    * @returns AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String commitChanges()
    AbstractCmd cmd = new MVC2CommitChangesCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized. Postconditions:
    * Aborts all changes to the model since commitChanges() was last called.
    * <p>
    * reports all fatal server errors to registered UIIFatalMessageListener s
    * <p>
    * @return Description of the Return Value
    * @returns AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String abortChanges()
    AbstractCmd cmd = new MVC2AbortChangesCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and columnName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param columnName is a valid column in the table of the model.
    * @param rowNum is a valid row in the table of the model.
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: <p>
    * asserts columnName or rowNum have valid values for the table asserts
    * the information in parents is valid and complete; reports to
    * registered MessageListener s if the table is not a table of the
    * model
    * @return The tableValue value
    * @todo talk to Kelly because an invalid table name should
    * not be a user error but a programming error reports all fatal server
    * errors to registered UIIFatalMessageListener s <p>
    * @returns the value of the table element located in the
    * specified column at the specified row or AdapterConstants.ERROR
    public synchronized String getTableValue(
    String tableName,
    String columnName,
    int rowNum,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetTableValueCmd(tableName, columnName, rowNum, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * @param tableId The new tableValue value
    * @param columnName The new tableValue value
    * @param row The new tableValue value
    * @param value The new tableValue value
    * @return Description of the Return Value
    * @see setTableValue(String tableName, String columnName,
    * int rowNum, String value, ParentTableInfo[] parents) for method
    * contract
    public synchronized String setTableValue(
    String tableId,
    String columnName,
    int row,
    String value )
    return setTableValue( tableId, columnName, row, value,
    ( ( ParentTableInfo[] ) null ) );
    * Preconditions: asserts the controller has been initialized and
    * columnName is not null
    * @param tableName must be a valid table of the model.
    * @param columnName is a valid column in the table of the model.
    * @param rowNum is a valid row in the table of the model.
    * @param value is a valid value of the tables column and row (cell)
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: Sets the value of the table cell located in the
    * specified column at the specified rowNum to the new value. <p>
    * asserts both the columnName or rowNum have valid values for the
    * table asserts the information in parents is valid and complete
    * reports to registered MessageListener s if the table is not a table
    * of the model and if the value is not a valid value for the cell of
    * the table reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns the value that the table cell is set to or
    * AdapterConstants.ERROR
    public synchronized String setTableValue(
    String tableName,
    String columnName,
    int rowNum,
    String value,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2SetTableValueCmd(tableName, columnName,
    rowNum, value, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and tableName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: <p>
    * asserts the information in parents argument is valid and complete.
    * reports to registered MessageListener s if table is not a valid
    * table reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return The numberOfRows value
    * @returns the number of rows in the table if successful, else -1
    public synchronized int getNumberOfRows(
    String tableName,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetNumberOfRowsCmd(tableName, parents);
    execute(cmd);
    Object returnValue = cmd.getReturnValue();
    if(returnValue.equals(AdapterConstants.ERROR))
    return -1;
    return ((Integer) cmd.getReturnValue()).intValue();
    * Preconditions: the controller has been initialized and tableName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param rowPosition represents the (zero-based) position where you want
    * the new row <p>
    * Postconditions: Adds one row to the table at the specified position.
    * <p>
    * asserts that the rowPosition is within range to add to the table
    * asserts that the information in parents is valid and complete.
    * reports to registered MessageListener s if table is not a valid
    * table and if it is not valid to add the row to the specified
    * position reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns the new row number of the inserted row if
    * successful, else -1
    public synchronized int addRow(
    String tableName,
    int rowPosition,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2AddRowCmd(tableName, rowPosition, parents);
    execute(cmd);
    return ((Integer) cmd.getReturnValue()).intValue();
    * Preconditions: the controller has been initialized, tableName is not
    * null, and rowsToDelete is not null or empty
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param rowsToDelete all rows specified in this container must exist in
    * the table 'tableName' <p>
    * Postconditions: Deletes all rows specified in rowsToDelete from the
    * table. <p>
    * asserts all row indexes in rowsToDelete are valid asserts the
    * information in parents argument is valid and complete reports to
    * registered MessageListener s if the 'tableName' is not a valid table
    * of the model and if it is not valid to delete the rows at the
    * specified positions reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String deleteRows(
    String tableName,
    int[] rowsToDelete,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2DeleteRowsCmd(tableName, rowsToDelete, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * This method retrieves all values for a specified row. The value in each
    * column is retrieved and stored in the row container. The row container
    * is column ordered. Prior contents in the row container are lost as the
    * container is initialized within this method. <p>
    * Preconditions: the controller has been initialized and the container
    * 'row' is not null
    * @param tableName must be a valid table of the model.
    * @param rowPosition represents a valid row in the table.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param row container which will be filled with the specified
    * table rows values <p>
    * Postconditions: asserts that rowPosition is valid (i.e not out of
    * range) asserts the information in parents argument is valid and
    * complete asserts that the container row is a valid as an
    * input/output parameter (i.e. not null) reports to registered
    * MessageListener s if tableName is not a valid table of the model
    * reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return The row value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    * <p>
    * NOTE: All columns and all rows have zero-based indices.
    public synchronized String getRow(
    String tableName,
    int rowPosition,
    List row,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetRowCmd(tableName, rowPosition, row, paren

    Please can u answer it fast

  • How to set mandatory a InputField in standard Web Dynpro component?

    Hi guys.
    A very weird thing is happening. I am trying to validate that a non-mandatory STANDARD input field (COST_ASSIGNMENT) does not to be empty. This input field belongs to GENERAL_DATA_VIEW, FITE_VC_GENERAL_DATA WD component. The entry fields at screen belong to this GENERAL_DATA_VIEW, but navigation is allocated in buttons that belong to another component (LAYOUT_VIEW in the FITV_FPM WD component). All the views and components are standard and they seem to be in the same screen from user's point of view. I was able to put my own code at WDDOAFTERACTION method in LAYOUT_VIEW to raise an error message.
    Incredibly, my error text message appears in the MESSAGEAREA, and the UI components from GENERAL_DATA_VIEW are rightly still in the screen waiting for user answer since I set CANCEL_NAVIGATION = 'X', but the UI components from LAYOUT_VIEW (the buttons with navigate functions) changed like they had accepted my entry in spite of I set the code in this view. In fact, below my error text displayed, there is other (success) text which communicates "Standing approval for business trips exists" with a green tick.
    The success text should not be displayed since I raised an error message, even after (I think so) the system created the success message.  I suspect that the standard positive message with the green tick indicates that my error is being taking into acccount by the system to be displayed but the LAYOUT_VIEW UI components dont stop navigation and the data is wrongly saved from the code where the success message was generated.
    I think there would be another way to define an standard inputfield mandatory, but I dont know how to do it. Do you know that? I really appreciate all help. Thanks

    hi,
    just make the input feild as mandatory in properties and use the following code.
    data:
    lo_view_controller type ref to if_wd_view_controller,
    lo_dyn type ref to cl_wd_dynamic_tool.
    Create Object
    create object lo_dyn.
    data lt_messages type lo_dyn->t_check_result_message_tab.
    Get view controller reference
    lo_view_controller = wd_this->wd_get_api( ).
    Call Method to verify the element has the value or not
    call method cl_wd_dynamic_tool=>check_mandatory_attr_on_view
    exporting
    view_controller = lo_view_controller
    display_messages = ABAP_TRUE
    importing
    messages = lt_messages .
    endmethod.
    Regards,
    Kranthi

  • Duplicate check: access ID of current business partner

    Hello,
    we're using BADI ADDRESS_SEARCH to perform duplicate check of business partners in CRM 7.0.
    Some relevant address fields are passed to method ADDRESS_SEARCH (e.g. city, country, ...), however, not the partner ID or the GUID of the business partner.
    Is there any chance to access the currently processed business partner from inside the BADI method? The former (CRM 4.0, 5.0) BDT function modules "BUPMEMORY" don't work any more.
    The thing is that we need to control the duplicate check based on several BP attributes like grouping, BP role, and so on.
    Kindly consider that we're not in the IC (interaction center) but in the CRM web client (role SALESPRO)
    Many thanks for any help & kind regards
    Wolfgang

    Hi,
    One way is to enhance the custom controller of the BP_HEAD component, add a new attribute e.g., BP No or GUID and set its value on submitorenter event or save event and inside the BADI retrieve the custom controller reference to fetch the BP No or GUID.
    Regards
    Prasenjit

  • Dynamic embedding of view in used component

    Hi All,
    I have a scenario were i have to provide print functionality to all the views of an existing web dynpro component. This component has around 20 views. I have developed a new component for the print functionality were i am using BSP to fire the CTRL+P function.
    But the problem is how do i get the view at runtime in my print component.....?
    I tried passing the view controller reference to the print component through context binding, but i am unable to embed the view through the reference in to the print component view container element.
    Is there any way i can acheive this....???
    Any help will be appreciated..!
    Regards,
    Runal

    hi Runal ,
    have a look at this video presntation for dynamic embedding of views :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/5cb731e7-0b01-0010-1792-fbe5f55e39d2
    or
    I wud suggest u to procced like this :
    1 In design time , insert all ur views inside ur tansparent container
    2 * initially set all ur view to invisible* , for this :
    Re: Making UI elements visible at runtime based on events.
    a) make a context attribute of type WDUI_VISIBILITY
    b) bind this attribute wid ur view
    c) set the view to invisible by setting the context attribute to '01' using set_attribute method
       DATA lo_nd_cn_visiblesuper TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_visiblesuper TYPE REF TO if_wd_context_element.
        DATA ls_cn_visiblesuper TYPE wd_this->element_cn_visiblesuper.
        DATA lv_ca_visible LIKE ls_cn_visiblesuper-ca_visible.
    *   navigate from <CONTEXT> to <CN_VISIBLESUPER> via lead selection
        lo_nd_cn_visiblesuper = wd_context->get_child_node( name = wd_this->wdctx_cn_visiblesuper ).
    *   get element via lead selection
        lo_el_cn_visiblesuper = lo_nd_cn_visiblesuper->get_element(  ).
    *   get single attribute
        lo_el_cn_visiblesuper->set_attribute(
          EXPORTING
            name =  `CA_VISIBLE`
            value = '01').
    // context attribute CA_VISIBLE under node cn_visible set to invisible
    3 nw based pn ur condition , whn u wanted to do dynamic embedding , at tht time make ur view visible inside ur appropriate method
    this wud do
    rgds,
    amit

  • How to set field "third party" in the Web Adi, General Ledger - Journals?

    Hello,
    We are trying to find how to set the field "Third Party" in the template WebAdi, and validate data and also can display in the form of general ledger journals.
    thanks for the collaboration.

    hi,
    just make the input feild as mandatory in properties and use the following code.
    data:
    lo_view_controller type ref to if_wd_view_controller,
    lo_dyn type ref to cl_wd_dynamic_tool.
    Create Object
    create object lo_dyn.
    data lt_messages type lo_dyn->t_check_result_message_tab.
    Get view controller reference
    lo_view_controller = wd_this->wd_get_api( ).
    Call Method to verify the element has the value or not
    call method cl_wd_dynamic_tool=>check_mandatory_attr_on_view
    exporting
    view_controller = lo_view_controller
    display_messages = ABAP_TRUE
    importing
    messages = lt_messages .
    endmethod.
    Regards,
    Kranthi

  • WD Message Manager - collect messages

    Hi All,
    we work with 2 WD-applications reporting their message in the messagearea of WD-application#1
    How can I report messages without losing existing messages?
    I found note 940762 in this forum saying that it is possible to collect message using the parameter is_permanent or/and scope_permantent_msg.
    example:
      CALL METHOD lr_message_manager->report_exception
        EXPORTING
          message_object           = lr_exc_core
        IS_PERMANENT             = ABAP_FALSE
          SCOPE_PERMANENT_MSG      = 0.
    Can anyone describe the differences between the 2 options?
    What else can I do to collect messages?
    Thanks, Martin

    Hi Martin,
    if you just use IS_PERMANENT, you have to remove your messages, when they should not be displayed anymore. If you set scope_permanent_msg e.g. to if_wd_message_manager=>co_msg_scope_controller and you set a controller reference, the message will be removed, when the controller is deleted.
    Regards, Regina

  • Error in Component Api  Method

    Hi ,
    I getting a error in component Api method.
    Error : The method WDGetContext() is undefined for the type IPrivateDCFAppView
    SO, any body help me out in this regard why this one is happening.
    Thanks,
    William

    Hi,
    Are you trying to access the component controller's context from your view? check if you have added the component controller reference in the "properties" tab of the view.
    Regards,
    Poojith MV

  • UML and Service Locators

    I was wondering how much detail you should include when using...
    Servlet Controller to and EJB Controller to specific EJBs. You would probably want to use a Service Locator, but diagramming dependencies between the servlet controller to the ejb requires three dependencies with a service locator (1 from servlet controller to service locator and another from servlet controller to the ejb controller and finally from the service locator to the ejb controller.
    Now if the EJB controller references 3 other EJBs the dependencies would get rather "messy" in the diagram. Would people advise showing them all or simply showing a dependency simply from the controller to the service locator and one from the controller to the ejbs? In essense removing the dependency to from the locator to the individual ejbs as it may be implied.
    Thanks,
    Mark

    The answer to your question lies in the level of abstraction you are interested in while showing the dependencies. If you wish to depict a view in which one or two dependencies are not relevant, then you could elide them. You could, possibly, use multiple diagrams to depict the dependencies, if you feel that one diagram is getting complicated.
    Ironluca

  • Wd_this and if_componentcontroller ?

    hi friends...
    I am new to WDA, can you explain me the followings...
    l_node = wd_context->get_child_node( wd_this->wdctx_node_1 ).
    and
    l_node = wd_context->get_child_node( name = if_componentcontroller =>wdctx_node_1 ).
    i hope both statements are same purpose to get the child node within the root node...
    and wdctx_node_1 is the constant which holding the node name.
    in the first statement,  wd_this->wdctx_node_1 what this mean ? here wd_this means what ?
    in the second statement,  if_componentcontroller =>wdctx_node_1 what this mean ? here if_componentcontroller means what ?
    and why we are using -> symbol in 1st statement and => symbol in 2nd statement ?
    what is the difference between both...?
    kindly explain me in detail...
    By
    Deva

    Hi ,
    Here the wd_this refers that it is pointing or refreing to the present controller reference .
    eg: when you find the code using the wd_this which means it is pointing or refering to that particular view or to that context or so on....  which means this or self refrence concept in classes.
    Next coming to the concept of  if_componentcontroller which means that it is the refrence of the component controller  but both the peice of code serves the same purpose .
    here -> symbol refers that it is an instance method of this controller.
    and => refers that it is the static method of that controller or context .
    in your webdynrpo component open the method where u have written the code and in the application tool bar you can find the button called Display controller interface there you can find the code and find the difference of these two kinds .
    GoodDay .
    Regards,
    Sana.

  • How to check if a view is in a edit/create/delete mode ?

    Hello Experts,
    I have a custom requirement where I have to check the mode of the view. I have some custom logic placed in ON_NEW_FOCUS event handler method of a context node class ZCL_CLASS00004U_CN02. Now I want to execute a piece of code only in the create/edit mode.
    Can someone pls help me how to achieve this ? Pls help me out I am new to Web UI.

    Hi,
    You have to create an attribute(in attributes tab) in your context node class like the following.
    OWNER     Instance Attribute     Public     Type Ref To     CL_BSP_WD_CONTROLLER
    In the create_(context_node) method of the context controller class CL_ ...... _ CTXT,
    Set view controller reference to your context node 
    context_node->owner = owner.
    Now in the ON_NEW_FOCUS method of the context node class, you can access the controller like this.
    DATA: lr_controller  TYPE REF TO (give view controller class name here).
    * Get view controller
      lr_controller ?= owner.
    * Determine collection that shall be displayed
      IF lr_controller->view_group_context IS NOT BOUND.
      ELSEIF lr_controller->view_group_context->is_view_in_display_mode( lr_controller ) = abap_true.
      ENDIF.
    Regards,
    Leon
    Edited by: Leon Limson on Feb 24, 2012 5:23 AM

  • Close FPM Application

    Hi Experts!
    I have a FPM application and i need to close it automaticly. Is it possible to close the FPM Application and the corresponding window by a method?
    Thanks
    Jan

    Hi,
    You can use the followign code to raise FPM event -
    wd_this->mr_fpm->raise_event_by_id( iv_event_id = cl_fpm_event=>gc_event_close )
    here wd_this is controller reference
    and mr_fpm is FPm reference.
    Regards
    manas dua

Maybe you are looking for