CL_CRM_MKTGS_ASG_COLLECTION - MKTGS OL: Generic Assignment Collection

BAL Application Log Documentation   Addresses (Business Address Services)  
This 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 collections.
It contains the generic handling of the assignment collection

__________________________________________________________

Class Info

Name:CL_CRM_MKTGS_ASG_COLLECTION
Instantiation:Public

Superclass

CL_CRM_MKTGS_GEN_COLLECTION

Implemented Interfaces

None

Friend Classes

CL_CRM_MKTGS_ASG_HANDLER
CL_CRM_MKTGS_ASG_HANDLER_PERS
CL_CRM_MKTGS_ASG_ITEM
CL_CRM_MKTGS_ASG_PERSISTENCY

Subclasses

CL_CRM_MKTGS_ASSIGN_CD_PS_COLL
CL_CRM_MKTGS_ASSIGN_CD_TG_COLL
CL_CRM_MKTGS_COND_ASSIGN_COLL
CL_CRM_MKTGS_COST_ASSIGN_COLL
CL_CRM_MKTGS_DATE_COLL
CL_CRM_MKTGS_FREEG_COLLECTION
CL_CRM_MKTGS_KFP_COLL
CL_CRM_MKTGS_NOTE_COLL
CL_CRM_MKTGS_PARTNER_COLL
CL_CRM_MKTGS_PAR_SET_COLL
CL_CRM_MKTGS_PCAT_ASSIGN
CL_CRM_MKTGS_PERS_MSG_COLL
CL_CRM_MKTGS_PGRP_ASSIGN
CL_CRM_MKTGS_PROD_ASSIGN
CL_CRM_MKTGS_PRSEG_COLLECTION
CL_CRM_MKTGS_PTREBATE_COLL
CL_CRM_MKTGS_READONLYLINK_COLL
CL_CRM_MKTGS_SOFTLINK_COLL
CL_CRM_MKTGS_STATUS_COLL
CL_CRM_MKTGS_TEMPLATE_COLL
CL_CRM_MKTGS_TEXT_COLL
CL_CRM_MKTGS_TGR_COLL
CL_CRM_MKTGS_TIER_COLL
CL_CRM_MKTGS_TSPEX_COLL
CL_CRM_MKTPL_ASG_COLLECTION
CL_CRM_MKTPL_CAU_SEG_COL
CL_CRM_MKTPL_SKM_COLL
CL_CRM_MKTPPG_HDR_PPG_COLL
CL_CRM_MKTPPG_PPG_GDLPR_ASSIGN

__________________________________________________________

Methods

ADD_MESSAGE_SYMSG

Protected ADD_MESSAGE_SYMSG(

IMPORTINGFIELDNAME 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

Parameters

- IV_ATTRIBUTE_NAMEName of the attribute (optional)
- IV_KEEP_DEFAULT_LOG_TYPEFlag which ensures that the default log type of the message handler is not changed
- IV_LOG_TYPERelevant log type for the message (optional)

________________________________________________________________________

APPEND_ITEM

Redefined Protected APPEND_ITEM(

IMPORTINGCL_CRM_MKTGS_GEN_ITEM IR_ITEM

)

This method appends the item to the collection

Exceptions

- CX_CRM_MKTGS_CARDINALITYThis exception occurs when a cardinality violation occurs
- CX_CRM_MKTGS_DUPLICATE_KEYThis exception occurs when a duplicate key is passed
- CX_CRM_MKTGS_INVALID_KEYThis exception occurs when an invalid key is passed

________________________________________________________________________

BUILD_ITEMS

Protected BUILD_ITEMS( )

This method loads the items from the database in case they are not loaded yet (lazy load)

________________________________________________________________________

CHECK

Public ABAP_BOOL CHECK(

IMPORTINGCRM_MKTGS_CHECK_MODE_EXPLICIT IV_CHECK_MODE

)

This method checks all assignment items

Returns

Failed flag, which is true, if at least one of the checks has failed

Parameters

- IV_CHECK_MODESets the explicit check mode, values
 - 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)

________________________________________________________________________

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(

IMPORTINGABAP_BOOL IV_SHOW_MESSAGES

)

________________________________________________________________________

CLEAR

Redefined Public CLEAR( )

This method should not used for assignment collections
Use the RESET method instead

________________________________________________________________________

CONSTRUCTOR

Public CONSTRUCTOR(

IMPORTINGCL_CRM_MKTGS_GEN_ITEM IR_PARENT_OBJECT
CL_CRM_MKTGS_ASG_PERSISTENCY IR_PERSISTENCY_CONTROLLER
CRMS_MKTGS_ASG_METADATA IS_META_DATA
CRMS_MKTGS_ASG_PERSISTENCY_DAT IS_PERSISTENCY_DATA
CRM_MKTGS_CREATE_MODE IV_CREATE_MODE

)

This contstructor sets the necessary member attributes and creates in case of
a 1:1 cardinality a new assignment item when a new object is created

Parameters

- IR_PARENT_OBJECTThe parent object
- IR_PERSISTENCY_CONTROLLERThe persistency controller reference
- IS_META_DATAThe meta data of the assignment
- IS_PERSISTENCY_DATAThe persistency data which is needed for fetching data
- IV_CREATE_MODEThe 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

________________________________________________________________________

COPY

Public COPY(

IMPORTINGCL_CRM_MKTGS_ASG_COLLECTION IR_NEW_ASSIGNMENT_COLLECTION

)

This method copies all assignment items to the new assignment collection

- ÎR_NEW_ASSIGNMENT_COLLECTIONThe assignment collections where the new assignment items has to be copied to

________________________________________________________________________

CREATE_ITEM

Public CL_CRM_MKTGS_ASG_ITEM CREATE_ITEM(

IMPORTINGANY IS_ATTRIBUTES

)

This method creates a new assignment item
This is only possible if the assignment collection is changeable
Furthermore, it set the parent item as changed in case it is not ondatabase yet

________________________________________________________________________

DELETE

Public DELETE(

IMPORTINGABAP_BOOL IV_NO_CHECK

)

This method deletes all assignment items

Parameters

- IV_NO_CHECKIs set to true, if the assignments should be deleted without any checks

Exceptions

- CX_CRM_MKTGS_FUNCTION_FAILEDThis exception occurs if the deletion fails

________________________________________________________________________

DELETE_ITEM

Public DELETE_ITEM(

IMPORTINGCRM_MKTGS_GUID IV_GUID

)

This method delete an assignment items

Parameters

- IV_GUIDThe guid of the to be deleted assignment item

Exceptions

- CX_CRM_MKTGS_FUNCTION_FAILEDThis exception occurs if the deletion fails

________________________________________________________________________

FREE

Redefined Public FREE( )

This method frees all member attributes once the assignment collection is no longer needed
and should be deleted by the garbage collector

________________________________________________________________________

GET_ALL_ATTRIBUTES

Public GET_ALL_ATTRIBUTES(

IMPORTINGABAP_BOOL IV_GET_EXTERNAL_ATTRIBUTES
EXPORTINGINDEX TABLE ET_ATTRIBUTES

)

This method returns the attributes of all assignment items as a table

Parameters

- IV_GET_EXTERNAL_ATTRIBUTESIs set to true,if the external attributes of the assignment items are requested
 -> performance critical !!!
- ET_ATTRIBUTESAttribute table

________________________________________________________________________

GET_ASSIGNMENT_TYPE

Public CRM_MKTGS_ASSIGNMENT_TYPE GET_ASSIGNMENT_TYPE( )

This method returns the assignment type

Returns

Assignment type

________________________________________________________________________

GET_BUSINESS_KEYS

Redefined Public CRMT_MKTGS_GEN_ITEM_BUS_KEYS GET_BUSINESS_KEYS( )

________________________________________________________________________

GET_CROSS_CHECK_COLLECTION

Public CL_CRM_MKTGS_CCA_COLLECTION GET_CROSS_CHECK_COLLECTION()

This method returns the cross check collection

Returns

Cross check collection; not bound if not available

________________________________________________________________________

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_FIELD_ATTRIBUTES_REF

Protected CRMT_MKTGS_FIELD_ATTRIBUTE GET_FIELD_ATTRIBUTES_REF(

IMPORTINGCRM_MKTGS_ATTRIBUTE_STRUCTURE IV_ATTRIBUTE_STRUCTURE

)

________________________________________________________________________

GET_ITEMS_BY_ATTRIBUTE

Public CL_CRM_MKTGS_GEN_COLLECTION GET_ITEMS_BY_ATTRIBUTE(

IMPORTINGFIELDNAME IV_ATTRIBUTE_NAME
STRING IV_VALUE

)

This method returns all assignment items which have the requested attribute value

Returns

Collection of found assignment items

Parameters

- IV_ATTRIBUTE_NAMERequested attribute name
- IV_VALUERequested attribute value

________________________________________________________________________

GET_ITEM_BY_BUSINESS_KEY

Redefined Public CL_CRM_MKTGS_GEN_ITEM GET_ITEM_BY_BUSINESS_KEY(

IMPORTINGSTRING IV_BUSINESS_KEY

)

This method returns the assignment item for the requested business key.
The business key is a field in the assignment attribute structure which
defines each assignment item uniquely but is not the GUID. So any rather
business related key can be defined as the business key in the object layer
meta data customizing.

Returns

Assignment item reference or INITIAL if not item for the specified key could be found.

________________________________________________________________________

GET_ITEM_BY_GUID

Redefined Public CL_CRM_MKTGS_GEN_ITEM GET_ITEM_BY_GUID(

IMPORTINGCRM_MKTGS_GUID IV_GUID

)

This method returns the assignment item for the requested guid

Returns

Assignment item reference or INITIAL if the item was not found.

________________________________________________________________________

GET_ITEM_BY_INDEX

Redefined Public CL_CRM_MKTGS_GEN_ITEM GET_ITEM_BY_INDEX(

IMPORTINGI IV_INDEX

)

This method returns the assignment item for the requested index

Returns

Assignment item reference or INITIAL if the specified index is invalid.

________________________________________________________________________

GET_ITEM_COUNT

Redefined Public I GET_ITEM_COUNT( )

Get the number of assignment items in the assignment collection

Returns

Number of items

________________________________________________________________________

GET_MESSAGE_HANDLER

Public CL_CRM_MKTGS_MSG_HANDLER GET_MESSAGE_HANDLER( )

This method returns the message handler reference

Returns

Message handler reference

________________________________________________________________________

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_PARENT_ASG_ITEM

Public CL_CRM_MKTGS_ASG_ITEM GET_PARENT_ASG_ITEM( )

This method returns the parent assignment in case of sub assignments

Returns

Parent assignment; not bound if no parent assignment is available

________________________________________________________________________

GET_PARENT_OBJECT

Public CL_CRM_MKTGS_OBJ_ITEM GET_PARENT_OBJECT( )

This method returns the parent object

Returns

Parent object

________________________________________________________________________

GET_PERSISTENCY_CONTROLLER

Public CL_CRM_MKTGS_ASG_PERSISTENCY GET_PERSISTENCY_CONTROLLER()

This method returns the persistency controller reference

Returns

Persistency controller reference

________________________________________________________________________

INITIALIZE

Public INITIALIZE(

IMPORTINGABAP_BOOL IV_FIRST_TIME

)

This method initializes the assignment collection

________________________________________________________________________

IS_CHANGEABLE

Public ABAP_BOOL IS_CHANGEABLE(

IMPORTINGABAP_BOOL IV_IGNORE_STATUS
ABAP_BOOL IV_SHOW_MESSAGE

)

This method checks if the assignment collection can be changed
Here, the main object is asked for this

Returns

Success flag, if the assignment collection can be changed

Parameters

- IV_IGNORE_STATUSIs set to true, if statuswhich prevent changes should not be considered
 Finally, it is checked whether the main object could be locked
- IV_SHOW_MESSAGEIs set to true, if a message should be shown in case of not changeable

________________________________________________________________________

IS_LOADED

Public ABAP_BOOL IS_LOADED( )

This method returns an indicator whether the collection is already loaded

Returns

Success flag, if the assignment collection is loaded

________________________________________________________________________

LOAD

Public LOAD( )

________________________________________________________________________

NOTE_FOR_VERSIONING

Public NOTE_FOR_VERSIONING(

IMPORTINGCRM_MKTGS_VERSION_NO IV_VERSION_NO

)

________________________________________________________________________

ON_PARENT_OBJECT_MOVE

Public ON_PARENT_OBJECT_MOVE(

IMPORTINGCL_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 delegates this change to its items

________________________________________________________________________

REFRESH

Public REFRESH( )

This method
- resets the collection in display mode
- refreshs the external attributes of each item in edit mode

________________________________________________________________________

REMOVE_ITEM

Redefined Protected REMOVE_ITEM(

IMPORTINGCL_CRM_MKTGS_GEN_ITEM IR_ITEM

)

This method removes the item from the collection

Exceptions

- CX_CRM_MKTGS_CARDINALITYThis exception occurs when a cardinality violation occurrs

________________________________________________________________________

RESET

Protected RESET( )

This method resets the assignment collection and the sub assignments collections

________________________________________________________________________

RESOLVE_CROSS_CHECKS

Public RESOLVE_CROSS_CHECKS( )

This method triggers the resolving of the cross check errors

________________________________________________________________________

SEARCH_ITEMS

Public CL_CRM_MKTGS_GEN_COLLECTION SEARCH_ITEMS(

IMPORTINGCRMT_MKTGS_QUERY_ATTRIBUTES IT_SEARCH_PARAMS

)

________________________________________________________________________

SEARCH_ITEMS_BY_STRUCTURE

Public CL_CRM_MKTGS_GEN_COLLECTIONSEARCH_ITEMS_BY_STRUCTURE(

IMPORTINGANY IS_ATTRIBUTES

)

This method returns all assignment items which have the requested attribute values.
All non initial attribute values will be considered and there will be a match as soon as
all search criteria match.

Returns

Collection of found assignment items

Parameters

- IS_ATTRIBUTESThe search attribute structure. Must be the same type as the
 attribute structure of the assignment item

________________________________________________________________________

SET_ITEMS_BUILT_FLAG

Protected SET_ITEMS_BUILT_FLAG(

IMPORTINGABAP_BOOL IV_ITEMS_BUILT

)

This methods sets the item build flag if the loading of the items is triggered from persistency class



Fill RESBD Structure from EBP Component Structure   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.


Length: 38258 Date: 20120526 Time: 110635     triton ( 349 ms )