CL_CRM_MKTPL_EAI_CHANGE - Common Change Class

Vendor Master (General Section)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

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

General Class Description

Common Change Class

__________________________________________________________

Class Info

Name:CL_CRM_MKTPL_EAI_CHANGE
Instantiation:Public

Superclass

CL_CRM_MKTPL_EAI

Implemented Interfaces

None

Friend Classes

None

Subclasses

CL_CRM_MKTPL_EAI_CHANGE_TPM

__________________________________________________________

Methods

BUILD_PARTNER_LISTS

Protected BUILD_PARTNER_LISTS(

IMPORTINGABAP_BOOL IV_COMPLETE_TRANS_IND
STANDARD TABLE IT_EAI_PARTNERSX
STANDARD TABLE IT_EAI_PARTNERS
EXPORTINGCRMT_MKTPL_PARTNER ET_PARTNER_DELETE
CRMT_MKTPL_PARTNER ET_PARTNER_CREATE
CRMT_MKTPL_PARTNER ET_PARTNER_CHANGE

)

Build the list of partners to add, change and delete:
- Based on the complete transmission indicator, determine if partners need
to be deleted
- Based on action codes, determine if partners need to be deleted, created
or changed

Parameters

- IV_COMPLETE_TRANS_INDIf set to True, delete the partners not included in
 IT_EAI_PARTNERS from the current list of partners
- IT_EAI_PARTNERSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for partners
 to create/change/delete
- IT_EAI_PARTNERSList of values provided by the external application, it
 contains the keys and values for the partners to
 create/change/delete
- ET_PARTNER_DELETEList of partners to delete
- ET_PARTNER_CREATEList of partners to create
- ET_PARTNER_CHANGEList of partners to change

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of partners
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of the list of partners

________________________________________________________________________

BUILD_PRODUCT_CATEGORY_LISTS

Protected BUILD_PRODUCT_CATEGORY_LISTS(

IMPORTINGABAP_BOOL IV_COMPLETE_TRANS_IND
STANDARD TABLE IT_EAI_PRODUCT_CATEGORIESX
STANDARD TABLE IT_EAI_PRODUCT_CATEGORIES
EXPORTINGCRMT_MKTPL_TPM_PCAT ET_PCAT_CHANGE
CRMT_MKTPL_TPM_PCAT ET_PCAT_CREATE
CRMT_MKTPL_TPM_PCAT ET_PCAT_DELETE
ABAP_BOOL EV_UPDATE_PLANNING

)

Build the list of product categories to add, change and delete:
- Based on the complete transmission indicator, determine if product categories need
to be deleted
- Based on action codes, determine if product categories need to be deleted, created
or changed

Parameters

- IV_COMPLETE_TRANS_INDIf set to True, delete the product categories not included in
 IT_EAI_PRODUCT_CATEGORIES from the current list of product
 categories
- IT_EAI_PRODUCT_CATEGORIESXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for product
 categories to create/change/delete
- IT_EAI_PRODUCT_CATEGORIESList of values provided by the external application, it
 contains the keys and values for the product categories to
 create/change/delete
- ET_PCAT_CHANGEList of product categories to change
- ET_PCAT_CREATEList of product categories to create
- ET_PCAT_DELETEList of product categories to delete
- EV_UPDATE_PLANNINGSpecific to promotion. Is set to true if the planning data
 is to be updated

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product categories
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of the list of product categories

________________________________________________________________________

BUILD_PRODUCT_GROUP_LISTS

Protected BUILD_PRODUCT_GROUP_LISTS(

IMPORTINGSTANDARD TABLE IT_EAI_PRODUCT_GROUPS
STANDARD TABLE IT_EAI_PRODUCT_GROUPSX
ABAP_BOOL IV_COMPLETE_TRANS_IND
EXPORTINGCRMT_MKTPL_TPM_PGRP ET_PGRP_CHANGE
CRMT_MKTPL_TPM_PGRP ET_PGRP_CREATE
CRMT_MKTPL_TPM_PGRP ET_PGRP_DELETE
ABAP_BOOL EV_UPDATE_PLANNING

)

Build the list of product groups to add, change and delete:
- Based on the complete transmission indicator, determine if product groups need
to be deleted
- Based on action codes, determine if product groups need to be deleted, created
or changed

Parameters

- IT_EAI_PRODUCT_GROUPSList of values provided by the external application, it
 contains the keys and values for the product groups to
 create/change/delete
- IT_EAI_PRODUCT_GROUPSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for product
 groups to create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the product groups not included in
 IT_EAI_PRODUCT_GROUPS from the current list of product
 groups
- ET_PGRP_CHANGEList of product groups to change
- ET_PGRP_CREATEList of product groups to create
- ET_PGRP_DELETEList of product groups to delete
- EV_UPDATE_PLANNINGSpecific to promotion. Is set to true if the planning data
 is to be updated

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product groups
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of the list of product groups

________________________________________________________________________

BUILD_PRODUCT_LISTS

Protected BUILD_PRODUCT_LISTS(

IMPORTINGSTANDARD TABLE IT_EAI_PRODUCTS
STANDARD TABLE IT_EAI_PRODUCTSX
ABAP_BOOL IV_COMPLETE_TRANS_IND
EXPORTINGCRMD_MKTPL_PROD_DT ET_PROD_CHANGE
CRMD_MKTPL_PROD_DT ET_PROD_CREATE
CRMD_MKTPL_PROD_DT ET_PROD_DELETE
ABAP_BOOL EV_UPDATE_PLANNING

)

Build the list of products to add, change and delete:
- Based on the complete transmission indicator, determine if products need to be deleted
- Based on action codes, determine if products need to be deleted, created or changed

Parameters

- IT_EAI_PRODUCTSList of values provided by the external application, it
 contains the keys and values for the products to create/
 change/delete
- IT_EAI_PRODUCTSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for products to
 create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the products not included in
 IT_EAI_PRODUCTS from the current list of products
- ET_PROD_CHANGEList of products to change
- ET_PROD_CREATEList of products to create
- ET_PROD_DELETEList of products to delete
- EV_UPDATE_PLANNINGSpecific to promotion. Is set to true if the planning data
 is to be updated

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of products
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of the list of products

________________________________________________________________________

CHANGE_PARTNERS

Protected CHANGE_PARTNERS(

IMPORTINGSTANDARD TABLE IT_EAI_PARTNERS
STANDARD TABLE IT_EAI_PARTNERSX
ABAP_BOOL IV_COMPLETE_TRANS_IND

)

Perform the changes to the assignment block Partners:
- First, call the method to determine the partners to create/change/delete
- Second, apply the changes to the current list of partners. Partners can be created,
changed and/or deleted

Parameters

- IT_EAI_PARTNERSList of values provided by the external application, it
 contains the keys and values for the partners to
 create/change/delete
- IT_EAI_PARTNERSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for partners
 to create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the partners not included in
 IT_EAI_PARTNERS from the current list of partners

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of partners

________________________________________________________________________

CHANGE_PRODUCTS

Protected ABAP_BOOL CHANGE_PRODUCTS(

IMPORTINGSTANDARD TABLE IT_EAI_PRODUCTS
STANDARD TABLE IT_EAI_PRODUCTSX
ABAP_BOOL IV_COMPLETE_TRANS_IND

)

Perform the changes to the assignment block Product:
- First, call the method to determine the products to create/change/delete
- Second, apply the changes to the current list of products. Products can be created
changed and/or deleted

Returns

RV_UPDATE_PLANNING Specific to promotion. Is set to true if the planning data
is to be updated

Parameters

- IT_EAI_PRODUCTSList of values provided by the external application, it
 contains the keys and values for the products to create/
 change/delete
- IT_EAI_PRODUCTSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for products
 to create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the products not included in
 IT_EAI_PRODUCTS from the current list of products

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of products

________________________________________________________________________

CHANGE_PRODUCT_CATEGORIES

Protected ABAP_BOOL CHANGE_PRODUCT_CATEGORIES(

IMPORTINGSTANDARD TABLE IT_EAI_PRODUCT_CATEGORIES
STANDARD TABLE IT_EAI_PRODUCT_CATEGORIESX
ABAP_BOOL IV_COMPLETE_TRANS_IND

)

Perform the changes to the assignment block Product Category:
- First, call the method to determine the product cateogories to create/change/delete
- Second, apply the changes to the current list of product categories. Product categories
can be created, changed and/or deleted

Returns

RV_UPDATE_PLANNING Specific to promotion. Is set to true if the planning data
is to be updated

Parameters

- IT_EAI_PRODUCT_CATEGORIESList of values provided by the external application, it
 contains the keys and values for the product categories to
 create/change/delete
- IT_EAI_PRODUCT_CATEGORIESXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for product
 categories to create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the product categories not included in
 IT_EAI_PRODUCT_CATEGORIES from the current list of product
 categories

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product categories

________________________________________________________________________

CHANGE_PRODUCT_GROUPS

Protected ABAP_BOOL CHANGE_PRODUCT_GROUPS(

IMPORTINGSTANDARD TABLE IT_EAI_PRODUCT_GROUPSX
ABAP_BOOL IV_COMPLETE_TRANS_IND
STANDARD TABLE IT_EAI_PRODUCT_GROUPS

)

Perform the changes to the assignment block Product Group:
- First, call the method to determine the product groups to create/change/delete
- Second, apply the changes to the current list of product groups. Product groups
can be created, changed and/or deleted

Returns

RV_UPDATE_PLANNING Specific to promotion. Is set to true if the planning data
is to be updated

Parameters

- IT_EAI_PRODUCT_GROUPSXParallel structure built by the mapping process, it contains
 the action codes, the keys and field names for product group
 to create/change/delete
- IV_COMPLETE_TRANS_INDIf set to True, delete the product groups not included in
 IT_EAI_PRODUCT_GROUPS from the current list of product groups
- IT_EAI_PRODUCT_GROUPSList of values provided by the external application, it
 contains the keys and values for the product groups to
 create/change/delete

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product groups

________________________________________________________________________

CHANGE_STATUS_PROFILE

Private CHANGE_STATUS_PROFILE(

IMPORTINGANY IS_EAI_ATTRIBUTES
CRMT_MKTPL_EAI_CHG_FLD IT_EAI_ATTRIBUTESX

)

Change the Status profile

Parameters

- IS_EAI_ATTRIBUTESAttributes, structure that contains the new values
- IT_EAI_ATTRIBUTESXParallel structure, indicates which values to change

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the status profile

________________________________________________________________________

CHANGE_SYSTEM_STATUS

Private CHANGE_SYSTEM_STATUS(

IMPORTINGANY IS_EAI_ATTRIBUTES
CRMT_MKTPL_EAI_CHG_FLD IT_EAI_ATTRIBUTESX

)

Change the System Status

Parameters

- IS_EAI_ATTRIBUTESAttributes, structure that contains the new values
- IT_EAI_ATTRIBUTESXParallel structure, indicates which values to change

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the system status

________________________________________________________________________

CHANGE_USER_STATUS

Private CHANGE_USER_STATUS(

IMPORTINGANY IS_EAI_ATTRIBUTES
CRMT_MKTPL_EAI_CHG_FLD IT_EAI_ATTRIBUTESX

)

Change the User Status

Parameters

- IS_EAI_ATTRIBUTESAttributes, structure that contains the new values
- IT_EAI_ATTRIBUTESXParallel structure, indicates which values to change

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the user status

________________________________________________________________________

DETERMINE_ACTION_FOR_CHANGE

Protected CRMOST_ACTION_CODE DETERMINE_ACTION_FOR_CHANGE(

IMPORTINGCRMOST_ACTION_CODE IV_ACTION_CODE
ABAP_BOOL IV_ELEMENT_IS_IN_MKTOBJECT

)

Determine the action to execute in the list of elements:
- Add the element to the current list of elements
- Change the element within current the list of elements
- Delete the element from current the list of elements
- No action but check if the element exists in the current list of elements
There are six action codes. The same action code domain will be reused to return four
possible actions out of these six action codes:
- 01 'Create' will remain 01 Create
- 02 'Change' will remain 02 Change
- 03 'Delete' will remain 03 Delete
- 04 'Save' can become 01 Create or 02 Change
- 05 'Remove' will become 03 Delete or 06 No Action
- 06 'No Action' will remain 06 No Action

Returns

ing RV_ACTION_FOR_CHANGE Indicates if a element need to be added, changed or deleted
This parameter is empty when an error is detected

Parameters

- IV_ACTION_CODEAction to perform on the element
- IV_ELEMENT_IS_IN_MKTOBJECTIndicates if the element exists already in the marketing object

________________________________________________________________________

FREE

Redefined Protected FREE( )

Clear member attributes of classes

________________________________________________________________________

INITIALIZE_CLASS_ATTRIBUTES

Protected INITIALIZE_CLASS_ATTRIBUTES(

IMPORTINGCRMT_MKTPL_EXTID IV_EXTERNAL_ID

)

This method loads a marketing object and sets it to change mode.
The following class attributes are initialized:
- MR_OL_MKT_PROJECT
- MV_MKT_PROJECT_GUID

Parameters

- IV_EXTERNAL_IDExternal ID of marketing object

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDUnable to load or change the trade promotion
- CX_CRM_MKTPL_EAI_LOCKUnable to set the trade promotion to edit mode

________________________________________________________________________

IS_FIELDNAME_FOR_PLANNING

Protected ABAP_BOOL IS_FIELDNAME_FOR_PLANNING(

IMPORTINGFIELDNAME IV_FIELDNAME

)

Indicates if the change of planning data is requested by the external application

Returns

RV_FIELDNAME_FOR_PLANNING The default implementation returns False

Parameters

- IV_FIELDNAMEField name to validate

________________________________________________________________________

TREAT_ACTION_CODE_FOR_PROD_DIM

Protected TREAT_ACTION_CODE_FOR_PROD_DIM(

IMPORTINGANY IS_CURRENT_ENTRY
ANY IS_EAI_ENTRYX
STANDARD TABLE IT_EAI_ENTRIES
CRMOST_ACTION_CODE IV_ACTION_FOR_CHANGE
FIELDNAME IV_EAI_KEY_NAME
ANY IV_EAI_KEY_VALUE
EXPORTINGABAP_BOOL EV_UPDATE_PLANNING
CHANGINGSTANDARD TABLE CT_ENTRIES_TO_DELETE
STANDARD TABLE CT_ENTRIES_TO_CREATE
STANDARD TABLE CT_ENTRIES_TO_CHANGE

)

Build a list of entries to create, change and/or delete

________________________________________________________________________

TREAT_COMPLETE_TRANS_INDICATOR

Protected TREAT_COMPLETE_TRANS_INDICATOR(

IMPORTINGCL_CRM_MKTGS_ASG_COLLECTION IR_ASG_BLOCK_COLL
STANDARD TABLE IT_EAI_ENTRIES
ANY IV_ASG_BLOCK_KEY
ABAP_BOOL IV_COMPLETE_TRANS_IND
CHANGINGSTANDARD TABLE CT_ENTRIES_TO_DELETE

)

This method builds the list of entries to delete based on the complete transmission indicator.
If the complete transmission indicator is set to true, delete all the entries that are not
included in IT_EAI_ENTRIES from the current Marketing object.

Parameters

- IR_ASG_BLOCK_COLLReference to the current list of entries in the Marketing object
- IT_EAI_ENTRIESList of entries to create/change/delete
- IV_ASG_BLOCK_KEYAccess key to read entries in the list of entries
- IV_COMPLETE_TRANS_INDComplete transmission indicator
- CT_ENTRIES_TO_DELETEList of entries to delete from the current Marketing object

________________________________________________________________________

TREAT_INDICATOR_FOR_PARTNERS

Private TREAT_INDICATOR_FOR_PARTNERS(

IMPORTINGCRMT_MKTPL_PARTNER IT_CURRENT_PARTNERS
STANDARD TABLE IT_EAI_PARTNERS
ABAP_BOOL IV_COMPLETE_TRANS_IND
CHANGINGCRMT_MKTPL_PARTNER CT_PARTNER_DELETE

)

This method builds the list of partners to delete based on the complete transmission indicator.
If the complete transmission indicator is set to true, delete all the partners that
are not included in IT_EAI_PARTNERS from the current marketing object.

Parameters

- IT_CURRENT_PARTNERSCurrent list of partners
- IT_EAI_PARTNERSList of partners to create/change/delete
- IV_COMPLETE_TRANS_INDComplete transmission indicator
- CT_PARTNER_DELETEList of partners to delete

________________________________________________________________________

TREAT_PARTNER_LISTS

Protected TREAT_PARTNER_LISTS(

IMPORTINGCRMT_MKTPL_PARTNER IT_PARTNER_CHANGE
CRMT_MKTPL_PARTNER IT_PARTNER_CREATE
CRMT_MKTPL_PARTNER IT_PARTNER_DELETE

)

Apply the changes to the current list of partners. Partners can be added, changed and/or deleted.

Parameters

- IT_PARTNER_CHANGEList of partners to change
- IT_PARTNER_CREATEList of partners to create
- IT_PARTNER_DELETEList of partners to delete

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of partners
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of partners to add/change/delete

________________________________________________________________________

TREAT_PRODUCT_CATEGORY_LISTS

Protected TREAT_PRODUCT_CATEGORY_LISTS(

IMPORTINGCRMT_MKTPL_TPM_PCAT IT_PCAT_CHANGE
CRMT_MKTPL_TPM_PCAT IT_PCAT_CREATE
CRMT_MKTPL_TPM_PCAT IT_PCAT_DELETE

)

Apply the changes to the current list of product categories. Product categories can be added,
changed and/or deleted.

Parameters

- IT_PCAT_CHANGEList of product categories to change
- IT_PCAT_CREATEList of product categories to create
- IT_PCAT_DELETEList of product categories to delete

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product categories
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of product categories
 to add/change/delete

________________________________________________________________________

TREAT_PRODUCT_GROUP_LISTS

Protected TREAT_PRODUCT_GROUP_LISTS(

IMPORTINGCRMT_MKTPL_TPM_PGRP IT_PGRP_CHANGE
CRMT_MKTPL_TPM_PGRP IT_PGRP_CREATE
CRMT_MKTPL_TPM_PGRP IT_PGRP_DELETE

)

Apply the changes to the current list of product groups. Product groups can be added,
changed and/or deleted.

Parameters

- IT_PGRP_CHANGEList of product groups to change
- IT_PGRP_CREATEList of product groups to create
- IT_PGRP_DELETEList of product groups to delete

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of product groups
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of product groups
 to add/change/delete

________________________________________________________________________

TREAT_PRODUCT_LISTS

Protected TREAT_PRODUCT_LISTS(

IMPORTINGCRMD_MKTPL_PROD_DT IT_PROD_CHANGE
CRMD_MKTPL_PROD_DT IT_PROD_CREATE
CRMD_MKTPL_PROD_DT IT_PROD_DELETE

)

Apply the changes to the current list of products. Products can be added, changed and/or
deleted.

Parameters

- IT_PROD_CHANGEList of products to change
- IT_PROD_CREATEList of products to create
- IT_PROD_DELETEList of products to delete

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the list of products
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the processing of products to add/change/delete

________________________________________________________________________

TREAT_STATUSES

Protected TREAT_STATUSES(

IMPORTINGANY IS_EAI_ATTRIBUTES
CRMT_MKTPL_EAI_CHG_FLD IT_EAI_ATTRIBUTESX

)

Change fields related to statuses: Status profile, System status, User status

Parameters

- IS_EAI_ATTRIBUTESAttributes, structure that contains the new values
- IT_EAI_ATTRIBUTESXParallel structure, indicates which values to change

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to change the status
 Resumable exception is raised to continue processing back into this method
 The expected result is to continue the changes to status profile, user status
 and/or system status.



BAL_S_LOG - Application Log: Log header data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.


Length: 57729 Date: 20120526 Time: 113100     triton ( 353 ms )