CL_EXM_IM_WRBX_ENTITY - Sample Implementation for BAdI Definition WRBX_ENTITY

Vendor Master (General Section)   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Functionality

Class CL_EXM_IM_WRBX_ENTITY shows the implementation of the factory methods of the BAdI WRBX_ENTITY.

A factory method denotes a method that creates an object and returns it to the caller of the method.As already mentioned in the documentation for the BAdI, classes that are dependent on the entity typehave to be created to provide the necessary data from the tables that belong to the entity type. For the most part, this data is a key field and a description field for a database table.

The implementation example shows the implementation for the entity "store". From a technical point ofview, an object of entity type "store" is a database entry in table T001W in which field VLFKZ contains the value A.

The class implementation for "store" is the same as is already implemented by SAP for the entity type"store" (with the corresponding key C_ENTITY_TYPE_SITE_STORE, definition in the interface IF_WRB_CONSTANTS).

The sample implementation of the BAdI shows how the methods are implemented. The class implementations can vary depending on the entity type.

Relationships

The following classes can be used for the entity "store":

  • An entity type-specific iView "MyStores" is created from the iView "My<Entities>" . The suitable class for the backend functions isCL_WRB_MYSITE, as it implements interface IF_WRB_MYENTITYand reads the data from tableT001W. To use the class for stores, the constructor with the value IF_WRB_CONSTANTS=>C_SITE_TYPE_STORE for the parameter PI_SITE_TYPEhas to be called.
The task of BAdI method CREATE_MYENTITY_INSTANCE is to return an instance of class CL_WRB_MYSITE.The object instance created is returned by the factory class CL_WRB_ENTITY_FACTORY and is required in the RFC-enabled function modules of the function group WRB_ENTITY.
  • An entity type-specific iView "Store Single Search" is created from the iView"<Entity>Single Search" . The suitable class for the backendfunctions is CL_WRB_SITE_SEARCH, as it implements the interface IF_WRB_ENTITY_SEARCHand reads the data from table T001W. To use the class for stores, the constructor with the value C_SITE_TYPE_STORE for the parameter PI_SITE_TYPE is called.
The task of the BAdI method CREATE_ENTITY_SEARCH_INSTANCE is to return an instance of class CL_WRB_SITE_SEARCH.The object instance created is returned by the factory class CL_WRB_ENTITY_FACTORY and is required in the RFC-enabled function modules of the function group WRB_ENTITY.

Example

Notes

Further information

For more information, see the technical documentation for the modules in function group WRB_ENTITY, the documentation for the BAdI WRBX_ENTITY and the documentation for the interfaces and classes used.


Vendor Master (General Section)   General Data in Customer Master  
This documentation is copyright by SAP AG.


Length: 3160 Date: 20120526 Time: 122504     triton ( 145 ms )