CL_CRM_MKTGS_ASG_ITEM - MKTGS OL: Generic Assignment Item
CL_GUI_FRONTEND_SERVICES - Frontend Services TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
>>> Development Documentation generated by DocuGenerator v2.0 (only available in English => NO TRANSLATION!!!) <<<
General Class Description
This is the abstract super class for the object layer assignment items
It contains the generic handling of the assignment item
-> to be redefined by each specific assignment
=> call the SET_ATTRIBUTES in case of create_mode = new (do not implemented this logic twice!)
__________________________________________________________
Class Info
| Name: | CL_CRM_MKTGS_ASG_ITEM |
| Instantiation: | Public |
Superclass
Implemented Interfaces
None
Friend Classes
CL_CRM_MKTGS_ASG_COLLECTION
CL_CRM_MKTGS_ASG_PERSISTENCY
CL_CRM_MKTGS_OL_EVENT_MANAGER
Subclasses
CL_CRM_MKTGS_ASSIGN_CD_PS_ITEM
CL_CRM_MKTGS_ASSIGN_CD_TG_ITEM
CL_CRM_MKTGS_COND_ASSIGN_ITEM
CL_CRM_MKTGS_COST_ASSIGN_ITEM
CL_CRM_MKTGS_DATE_ITEM
CL_CRM_MKTGS_FREEG_ITEM
CL_CRM_MKTGS_KFP_ITEM2
CL_CRM_MKTGS_NOTE_ITEM
CL_CRM_MKTGS_PARTNER_ITEM
CL_CRM_MKTGS_PAR_SET_ITEM
CL_CRM_MKTGS_PCAT_ITEM
CL_CRM_MKTGS_PERS_MSG_ITEM
CL_CRM_MKTGS_PGRP_ITEM
CL_CRM_MKTGS_PROD_ITEM
CL_CRM_MKTGS_PRSEG_ITEM
CL_CRM_MKTGS_PTREBATE_ITEM
CL_CRM_MKTGS_READONLYLINK_ITEM
CL_CRM_MKTGS_SOFTLINK_ITEM
CL_CRM_MKTGS_STATUS_ITEM
CL_CRM_MKTGS_TEMPLATE_ITEM
CL_CRM_MKTGS_TEXT_ITEM
CL_CRM_MKTGS_TGR_ITEM
CL_CRM_MKTGS_TIER_ITEM
CL_CRM_MKTGS_TSPEX_ITEM
CL_CRM_MKTPL_ASG_ITEM
CL_CRM_MKTPL_CAU_SEG_ITEM
CL_CRM_MKTPL_SKM_ITEM
CL_CRM_MKTPPG_HDR_PPG_ITEM
CL_CRM_MKTPPG_PPG_GDLPR_ITEM
CL_CRM_MKTPPG_PPG_PSGLV_ITEM
__________________________________________________________
Methods
ADD_MESSAGE_SYMSG
Protected ADD_MESSAGE_SYMSG(
| IMPORTING | FIELDNAME | IV_ATTRIBUTE_NAME |
| ABAP_BOOL | IV_KEEP_DEFAULT_LOG_TYPE | |
| CRM_MKTGS_MESSAGE_LOG_TYPE | IV_LOG_TYPE |
)
This method adds a message to the message log and adds all relevantassignment information
Additionally, it saves the check information into a buffer if the message is thrown
during check and the assignment item is not marked as 'check always'
Parameters
| - | IV_ATTRIBUTE_NAME | Name of the attribute (optional) |
| - | IV_KEEP_DEFAULT_LOG_TYPE | Flag which ensures that the default log type of the message handler is not changed |
| - | IV_LOG_TYPE | Relevant log type for the message (optional) |
| ________________________________________________________________________ |
|---|
APPEND_ASSIGNMENT_COLLECTION
Protected APPEND_ASSIGNMENT_COLLECTION(
| IMPORTING | CL_CRM_MKTGS_ASG_COLLECTION | IR_ASSIGNMENT_COLLECTION |
)
This method appends the sub assignment collection to the internal sub assignment table
Exceptions
| - | CX_CRM_MKTGS_DUPLICATE_KEY | This exception occurs if the to be appended assignmnt collections exists already |
| ________________________________________________________________________ |
|---|
CHECK
Redefined Public ABAP_BOOL CHECK(
| IMPORTING | CRM_MKTGS_CHECK_MODE_EXPLICIT | IV_CHECK_MODE |
)
| ________________________________________________________________________ |
|---|
CHECK_BEFORE_DELETE
Public ABAP_BOOL CHECK_BEFORE_DELETE( )
This method checks whether a delete is possible
Returns
Success flag, which is true if the deletion is possible
| ________________________________________________________________________ |
|---|
CHECK_BEFORE_SAVE
Public ABAP_BOOL CHECK_BEFORE_SAVE(
| IMPORTING | ABAP_BOOL | IV_SHOW_MESSAGES |
)
| ________________________________________________________________________ |
|---|
CONSTRUCTOR
Public CONSTRUCTOR(
| IMPORTING | CL_CRM_MKTGS_ASG_COLLECTION | IR_ASSIGNMENT_COLLECTION |
| ANY | IS_ATTRIBUTES | |
| CRM_MKTGS_CREATE_MODE | IV_CREATE_MODE | |
| ABAP_BOOL | IV_IGNORE_STATUS |
)
This contstructor
- sets the necessary member attributes
- appends itself to the parent assignment collection
- sets the according object state
- creates the sub assignment collection (if defined)
| - | IS_ATTRIBUTES | The attributes of the assignment item |
| - | IV_CREATE_MODE | The type of creation: |
| - loading -> cl_crm_mktgs_constants=>create_mode_loading | ||
| - copying -> cl_crm_mktgs_constants=>create_mode_copying | ||
| - new -> cl_crm_mktgs_constants=>create_mode_new | ||
| - | IV_IGNORE_STATUS | Is set to true, if statuswhich prevent changes should not be considered |
| Finally, it is checked whether the main object could be locked | ||
| - | IR_PARENT_ASSIGNMENT_COLLECTI | The parent assignment collection |
Exceptions
| - | CX_CRM_MKTGS_CARDINALITY | This exception occurs when a cardinality violation occurs |
| - | CX_CRM_MKTGS_DUPLICATE_KEY | This exception occurs when a duplicate key is passed |
| - | CX_CRM_MKTGS_INVALID_KEY | This exception occurs when an invalid key is passed |
| - | CX_CRM_MKTGS_NO_CHANGE_MODE | This exception occurs when the assignment collection is not changeable |
| ________________________________________________________________________ |
|---|
CONVERT_MESSAGE_SYMSG
Protected CRMS_MKTGS_MESSAGE_BASIC CONVERT_MESSAGE_SYMSG(
| IMPORTING | FIELDNAME | IV_ATTRIBUTE_NAME |
)
| ________________________________________________________________________ |
|---|
COPY
Public CL_CRM_MKTGS_ASG_ITEM COPY(
| IMPORTING | CL_CRM_MKTGS_ASG_COLLECTION | IR_ASSIGNMENT_COLLECTION |
)
This method creates a copy of itself and appends it to the passed assignment collection
| ________________________________________________________________________ |
|---|
CREATE_ASSIGNMENT_COLLECTIONS
Protected CREATE_ASSIGNMENT_COLLECTIONS(
| IMPORTING | CRM_MKTGS_CREATE_MODE | IV_CREATE_MODE |
)
This method creates the sub assignment collections
| ________________________________________________________________________ |
|---|
DELETE
Public DELETE(
| IMPORTING | ABAP_BOOL | IV_NO_CHECK |
)
This method deletes all assignment items
Parameters
| - | IV_NO_CHECK | Is set to true, if the assignments should be deleted without any checks |
Exceptions
| - | CX_CRM_MKTGS_FUNCTION_FAILED | This exception occurs if the deletion fails |
| ________________________________________________________________________ |
|---|
FILL_EXTERNAL_ATTRIBUTES
Protected FILL_EXTERNAL_ATTRIBUTES( )
This method fills the external attributes
-> to be redefined if external attributes are provided
=> in this case call the SET_ATTRIBUTES_REF at the end
| ________________________________________________________________________ |
|---|
FREE
Redefined Public FREE( )
This method frees all member attributes once the assignment item isno longer needed
and should be deleted by the garbage collector
| ________________________________________________________________________ |
|---|
GET_ASSIGNMENT_TYPE
Public CRM_MKTGS_ASSIGNMENT_TYPE GET_ASSIGNMENT_TYPE( )
This method returns the assignment type
Returns
Assignment type
| ________________________________________________________________________ |
|---|
GET_ATTRIBUTES
Public GET_ATTRIBUTES(
| IMPORTING | ABAP_BOOL | IV_GET_EXTERNAL_ATTRIBUTES |
| EXPORTING | ANY | ES_ATTRIBUTES |
)
This method returns the attributes of the assignment item
Parameters
| - | IV_GET_EXTERNAL_ATTRIBUTES | Is set to true,if the external attributes of the assignment items are requested |
| -> performance critical !!! |
| ________________________________________________________________________ |
|---|
GET_ATTRIBUTES_DB
Protected GET_ATTRIBUTES_DB(
| EXPORTING | ANY | ES_ATTRIBUTES |
)
This method returns the db attributes of the assignment item
These attributes represents the last db state
| ________________________________________________________________________ |
|---|
GET_BUSINESS_KEY
Public STRING GET_BUSINESS_KEY( )
Get the business key value
Returns
Business key
| ________________________________________________________________________ |
|---|
GET_CHECK_STATE
Public GET_CHECK_STATE(
| IMPORTING | CRM_MKTGS_CHECK_MODE_EXPLICIT | IV_CHECK_MODE |
| EXPORTING | CRMT_MKTGS_MESSAGE_BASIC | ET_ITEM_MESSAGES |
| ABAP_BOOL | EV_ITEM_HAS_ERRORS | |
| ABAP_BOOL | EV_ITEM_IS_CHECKED |
)
This method return the buffered check state if exists
Parameters
| - | IV_CHECK_MODE | Passes the explicit check mode to the sub assignments |
| - CL_CRM_MKTGS_CONSTANTS=>CHECK_MODE_EXPLICIT_STANDARD:no explicit mode, the values of the customizing are taken into account | ||
| - CL_CRM_MKTGS_CONSTANTS=>CHECK_MODE_EXPLICIT_FULL:all checks are performed (ignore customizing settings) | ||
| - CL_CRM_MKTGS_CONSTANTS=>CHECK_MODE_EXPLICIT_MINIMUM:only changed items are checked (ignore customizing settings) | ||
| - | EV_ITEM_HAS_ERRORS | True if the last check has failed |
| - | EV_ITEM_IS-CHECKED | True if the item is already checked |
| - | EV_ITEM_MESSAGES | Table with check messagesfrom the last check |
| ________________________________________________________________________ |
|---|
GET_FIELD_ATTRIBUTES
Public CRMT_MKTGS_FIELD_ATTRIBUTE GET_FIELD_ATTRIBUTES( )
This method returns the standard field attributes for the assignment collection
which are not item specific
Returns
Table of field attributes
| ________________________________________________________________________ |
|---|
GET_META_DATA
Public CRMS_MKTGS_ASG_METADATA GET_META_DATA( )
This method returns the meta data of the assignment
Returns
Meta data structure
| ________________________________________________________________________ |
|---|
GET_OBJECT_STATE
Public CRM_MKTGS_OBJECT_STATE GET_OBJECT_STATE( )
This method returns the object state of the assignment item
Returns
Object state:
- Archived -> cl_crm_mktgs_constants->object_state_archived
- Created -> cl_crm_mktgs_constants->object_state_created
- Deleted -> cl_crm_mktgs_constants->object_state_deleted
- Archived -> cl_crm_mktgs_constants->object_state_freed
- Archived -> cl_crm_mktgs_constants->object_state_loaded
- To be deleted -> cl_crm_mktgs_constants->object_state_to_be_deleted
- Updated -> cl_crm_mktgs_constants->object_state_updated
| ________________________________________________________________________ |
|---|
GET_PARENT_ASG_COLLECTION
Public CL_CRM_MKTGS_ASG_COLLECTION GET_PARENT_ASG_COLLECTION()
This method returns the parent assignment collection
Returns
Parent assignment collection
| ________________________________________________________________________ |
|---|
GET_PARENT_COLLECTION
Redefined PublicCL_CRM_MKTGS_GEN_COLLECTION GET_PARENT_COLLECTION( )
This method returns the parent assignment collection
Returns
Parent assignment collection
| ________________________________________________________________________ |
|---|
GET_PARENT_OBJECT
Public CL_CRM_MKTGS_OBJ_ITEM GET_PARENT_OBJECT( )
This method returns the parent object
Returns
Parent object
| ________________________________________________________________________ |
|---|
GET_SUB_ASSIGNMENT_COLLECTION
Public CL_CRM_MKTGS_ASG_COLLECTIONGET_SUB_ASSIGNMENT_COLLECTION(
| IMPORTING | CRM_MKTGS_ASSIGNMENT_TYPE | IV_ASSIGNMENT_TYPE |
)
This method returns the requested aus assignment collection
Returns
Sub assignment collection
Parameters
| - | IV_ASSIGNMENT_TYPE | Requested assignment type |
| ________________________________________________________________________ |
|---|
IS_BUSINESS_KEY_CHANGEABLE
Protected ABAP_BOOL IS_BUSINESS_KEY_CHANGEABLE(
| IMPORTING | ABAP_BOOL | IV_SHOW_MESSAGE |
)
This method checks whether the business key is changeable
The default implementation returns only true if the item
is changeable and is not saved yet
Returns
Success flag, if changeable
| ________________________________________________________________________ |
|---|
IS_CHANGEABLE
Public ABAP_BOOL IS_CHANGEABLE(
| IMPORTING | ABAP_BOOL | IV_SHOW_MESSAGE |
| ABAP_BOOL | IV_IGNORE_STATUS |
)
This method checks if the assignment item can be changed
First, it is checked whether the object state allows changes
and if yes it askes the parent assignment collection for the same
Returns
Success flag, if the assignment item can be changed
Parameters
| - | IV_SHOW_MESSAGE | Is set to true, if a message should be shown in case of not changeable |
| - | IV_IGNORE_STATUS | Is set to true, if statuswhich prevent changes should not be considered |
| Finally, it is checked whether the main object could be locked |
| ________________________________________________________________________ |
|---|
IS_DUPLICATE
Public ABAP_BOOL IS_DUPLICATE( )
This method checks if the assignment item is a duplicate
This means, there exists already an assignment with the same business key
Returns
Flag, if this assignment item is a duplicate
| ________________________________________________________________________ |
|---|
NOTE_FOR_VERSIONING
Public NOTE_FOR_VERSIONING(
| IMPORTING | CRM_MKTGS_VERSION_NO | IV_VERSION_NO |
)
| ________________________________________________________________________ |
|---|
ON_PARENT_OBJECT_MOVE
Public ON_PARENT_OBJECT_MOVE(
| IMPORTING | CL_CRM_MKTGS_OBJ_ITEM | IR_PARENT_OBJECT_OLD |
| CL_CRM_MKTGS_OBJ_ITEM | IR_PARENT_OBJECT_NEW |
)
This method does the prcessing which is needed after the parent object has been moved to another parent
- it updates the project key information and marks the item for database update
| ________________________________________________________________________ |
|---|
REFRESH
Public REFRESH( )
This method refreshs the external attributes and all the sub assignment collections
| ________________________________________________________________________ |
|---|
REFRESH_ATTRIBUTE_DB
Protected REFRESH_ATTRIBUTE_DB( )
This method refreshs the db attributes with the existing attributes
and sets the object_state to loaded again
This method is called after a successful save
| ________________________________________________________________________ |
|---|
RESET_ASSIGNMENT_COLLECTIONS
Protected RESET_ASSIGNMENT_COLLECTIONS( )
This method resets the sub assignment collections
| ________________________________________________________________________ |
|---|
RESET_CHECK_STATE
Protected RESET_CHECK_STATE( )
| ________________________________________________________________________ |
|---|
SET_ATTRIBUTES
Public SET_ATTRIBUTES(
| IMPORTING | ANY | IS_ATTRIBUTES |
)
This method sets the attributes of the assignment item
It contains only the generic handling
-> to be redefined if external attributes are provided
=> in this case call the SET_ATTRIBUTES of the super class at the end
Parameters
| - | IS_ATTRIBUTES | Attribute structure with thenew attributes |
| ________________________________________________________________________ |
|---|
SET_ATTRIBUTES_REF
Protected SET_ATTRIBUTES_REF(
| IMPORTING | ANY | IS_ATTRIBUTES |
)
This method sets the attributes data references directly without any checks
To be used at the end of the FILL_EXTERNAL_ATTRIBUTES in order to save these values
Parameters
| - | IS_ATTRIBUTES | Attribute structure |
| ________________________________________________________________________ |
|---|
SET_BUSINESS_KEY
Redefined Public SET_BUSINESS_KEY(
| IMPORTING | STRING | IV_BUSINESS_KEY |
)
Set the new business key
Parameters
| - | IV_BUSINESS_KEY | Contains the new business key |
Exceptions
| - | CX_CRM_MKTGS_DUPLICATE_KEY | This exception occurs when a duplicate key is passed |
| ________________________________________________________________________ |
|---|
SET_OBJECT_STATE
Protected ABAP_BOOL SET_OBJECT_STATE(
| IMPORTING | CHAR10 | IV_OBJECT_STATE |
)
This method sets the object state of the assignment item
Returns
Failed flag, if object state cannot be set
Parameters
| - | IV_OBJECT_STATE | Object state: |
| - Loaded -> cl_crm_mktgs_constants->object_state_loaded | ||
| - Created -> cl_crm_mktgs_constants->object_state_created | ||
| - To Be Created -> cl_crm_mktgs_constants->object_state_to_be_created | ||
| - Updated -> cl_crm_mktgs_constants->object_state_updated | ||
| - To Be deleted -> cl_crm_mktgs_constants->object_state_to_be_deleted | ||
| - Deleted -> cl_crm_mktgs_constants->object_state_deleted | ||
| - Archived -> cl_crm_mktgs_constants->object_state_archived | ||
| - Freed -> cl_crm_mktgs_constants->object_state_freed |
PERFORM Short Reference General Material Data
This documentation is copyright by SAP AG.
Length: 37600 Date: 20120526 Time: 110906 triton ( 271 ms )






