SAP® Documentation

Single view

CL_CRM_MKTPL_CPG_FUNDS_ITEM - CPG Fund Assignment Item

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

>>> Development Documentation generated by DocuGenerator v2.0 (only available in English => NO TRANSLATION!!!) <<<

General Class Description

This class implements the assignment item for the fund assocation to a campaign

__________________________________________________________

Class Info

Name:CL_CRM_MKTPL_CPG_FUNDS_ITEM
Instantiation:Public

Superclass

CL_CRM_MKTPL_FUNDS_ITEM

Implemented Interfaces

None

Friend Classes

CL_CRM_MKTPL_CPG_FUNDS_COLL

Subclasses

None

__________________________________________________________

Methods

CHECK

Redefined Public ABAP_BOOL CHECK(

IMPORTINGCRM_MKTGS_CHECK_MODE_EXPLICIT IV_CHECK_MODE

)

This method checks the attributes and resets the check buffer indicators

Returns

True, if the check returns errors

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_ASSOCIATION

Redefined Protected ABAP_BOOL CHECK_ASSOCIATION(

IMPORTINGABAP_BOOL IV_SHOW_MESSAGE
ABAP_BOOL IV_IGNORE_OBJECT_STATE
ANY IS_ATTRIBUTES

)

This method checks the fund association level attributes
It is checked whethr the association is unique (business key)
If not, an error message is raised

Returns

True, if the check returns errors

Parameters

- IV_SHOW_MESSAGEShow message indicator
- IV_IGNORE_OBJECT_STATEIgnore object state
- IS_ATTRIBUTESCurrent attributes

________________________________________________________________________

CHECK_BEFORE_DELETE

Redefined Public ABAP_BOOL CHECK_BEFORE_DELETE( )

This method prevents the deletion of fund assignments once
- they have been saved and
- the campaign is released

Returns

True, if delete is possible

________________________________________________________________________

CHECK_FUND

Redefined Protected ABAP_BOOL CHECK_FUND(

IMPORTINGABAP_BOOL IV_SHOW_MESSAGE
ANY IS_ATTRIBUTES

)

This method checks the assigned fund
- Is the fund information valid
- Is the fund valid for fund determination

Returns

True in case of errors

Parameters

- IV_SHOW_MESSAGEShow message indicator
- IS_ATTRIBUTESCurrent attributes

________________________________________________________________________

CHECK_MKTSPEND

Redefined Protected ABAP_BOOL CHECK_MKTSPEND(

IMPORTINGABAP_BOOL IV_SHOW_MESSAGE
ANY IS_ATTRIBUTES

)

This method checks the marketing spend attribute
The following checks are performed:
- Does the marketing spend exist
- Does an expense type mapping exist

Returns

True, if the check returns errors

Parameters

- IV_SHOW_MESSAGEShow message indicator
- IS_ATTRIBUTESCurrent attributes

________________________________________________________________________

CONSTRUCTOR

Public CONSTRUCTOR(

IMPORTINGABAP_BOOL IV_IGNORE_STATUS
CRM_MKTGS_CREATE_MODE IV_CREATE_MODE
ANY IS_ATTRIBUTES
CL_CRM_MKTGS_ASG_COLLECTION IR_ASSIGNMENT_COLLECTION

)

This method is the constructor of the fund assignment item class
It is called when laoding, creating or copying objects
When creating new assignment items, the SET_ATTRIBUTES is called

Parameters

- IV_IGNORE_STATUSIs set to true, if status which prevent changes should not be considered
 Finally, it is checked whether the main object could be locked
- 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
- IS_ATTRIBUTESThe attributes of the assignment item
- IR_ASSIGNMENT_COLLECTIONThe parent assignment 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
-CX_CRM_MKTGS_NO_CHANGE_MODEThis exception occurs when the assignment collection is not changeable

________________________________________________________________________

DELETE

Redefined Public DELETE(

IMPORTINGABAP_BOOL IV_NO_CHECK

)

This method triggers the adjustment of the distribution rates in case of deletion

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

________________________________________________________________________

FILL_EXTERNAL_ATTRIBUTES

Redefined Protected FILL_EXTERNAL_ATTRIBUTES( )

This method determines the external (non-db) attributes for campaign specific attributes
These are
- the marketing spend attributes and
- the fund attributes

________________________________________________________________________

FILL_EXT_FUND_ATTRIBUTES

Protected FILL_EXT_FUND_ATTRIBUTES(

CHANGINGCRMS_MKTPL_FUNDS_CPG CS_ATTRIBUTES

)

This method determines the external fund attributes
These are
- type
- product category
- budget
- available-to-reserve
- created by/on
- person responsible
- reserved
- settled
- pre-reserved
- marketing organization
- sales organization, division, distribution channel
- product id/description

Parameters

- CS_ATTRIBUTESCurrent attributes

________________________________________________________________________

FILL_EXT_MKTSPEND_ATTRIBUTES

Protected FILL_EXT_MKTSPEND_ATTRIBUTES(

CHANGINGCRMS_MKTPL_FUNDS_CPG CS_ATTRIBUTES

)

This method determines the external marketing spend attributes
These are
- marketing spend text
- related expense type (text) from mapping

Parameters

- CS_ATTRIBUTESCurrent attributes

________________________________________________________________________

GET_FIELD_ATTRIBUTES

Redefined Public CRMT_MKTGS_FIELD_ATTRIBUTE GET_FIELD_ATTRIBUTES( )

This method returns the field attributes of the fund association assignment item
Fund ID is always changeable,
marketing spends only for fund association level marketing spend and
distribution rate only if the fund association is not unique

Returns

Field attributes

________________________________________________________________________

GET_FMI_PROFILE

Public CRMC_MKTPL_FMPRF GET_FMI_PROFILE( )

This method returns the current funds management integration profile

Returns

Funds management integration profile

________________________________________________________________________

GET_FUNDS_OF_ASSOC_LEVEL

Public CL_CRM_MKTGS_GEN_COLLECTION GET_FUNDS_OF_ASSOC_LEVEL(

IMPORTINGABAP_BOOL IV_REMOVE_CURRENT_ITEM
CRMS_MKTPL_FUNDS_CPG IS_ATTRIBUTES

)

This method returns the funds of the same association level as the passed fund assignment item

Returns

Collection of fund assignment items

Parameters

- IV_REMOVE_CURRENT_ITEMDo not return the current item in the result collection
- IS_ATTRIBUTESCurrent attributes

________________________________________________________________________

IS_MKTSPEND_ASSOC_LEVEL_ACTIVE

Public ABAP_BOOL IS_MKTSPEND_ASSOC_LEVEL_ACTIVE( )

This method checks if the marketing spend association level is active

Returns

True, if the marketing spend association level is active

________________________________________________________________________

IS_UNIQUE

Protected ABAP_BOOL IS_UNIQUE(

IMPORTINGCRMS_MKTPL_FUNDS_CPG IS_ATTRIBUTES

)

Checks whether the fund accociation is unique

Returns

true, if unique

Parameters

- IS_ATTRIBUTESCurrent attributes

________________________________________________________________________

SET_ATTRIBUTES

Redefined Public SET_ATTRIBUTES(

IMPORTINGANY IS_ATTRIBUTES

)

This method sets the attributes and adjusts the distribution rate thereafter

Parameters

- IS_ATTRIBUTESAttributes to be set

________________________________________________________________________

SET_DISTR_RATE

Redefined Protected SET_DISTR_RATE(

IMPORTINGANY IS_ATTRIBUTES_OLD
CHANGINGANY CS_ATTRIBUTES_NEW

)

This methods set the distribution rate attribute

Parameters

- IS_ATTRIBUTES_OLDold attributes
- CS_ATTRIBUTES_NEWnew attributes

________________________________________________________________________

SET_MKTSPEND

Redefined Protected SET_MKTSPEND(

IMPORTINGANY IS_ATTRIBUTES_OLD
CHANGINGANY CS_ATTRIBUTES_NEW

)

This methods set the marketing spend attribute
- if the association level is marketing spend
- if yes it deletes the expense type information if needed

Parameters

- IS_ATTRIBUTES_OLDold attributes
- CS_ATTRIBUTES_NEWnew attributes






PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 23504 Date: 20190627 Time: 055415     sap01-206 ( 49 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.