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(
| IMPORTING | ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| STANDARD TABLE | IT_EAI_PARTNERSX |
| STANDARD TABLE | IT_EAI_PARTNERS |
| EXPORTING | CRMT_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_IND | If set to True, delete the partners not included in |
| | IT_EAI_PARTNERS from the current list of partners |
| - | IT_EAI_PARTNERSX | Parallel structure built by the mapping process, it contains |
| | the action codes, the keys and field names for partners |
| | to create/change/delete |
| - | IT_EAI_PARTNERS | List of values provided by the external application, it |
| | contains the keys and values for the partners to |
| | create/change/delete |
| - | ET_PARTNER_DELETE | List of partners to delete |
| - | ET_PARTNER_CREATE | List of partners to create |
| - | ET_PARTNER_CHANGE | List of partners to change |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| STANDARD TABLE | IT_EAI_PRODUCT_CATEGORIESX |
| STANDARD TABLE | IT_EAI_PRODUCT_CATEGORIES |
| EXPORTING | CRMT_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_IND | If set to True, delete the product categories not included in |
| | IT_EAI_PRODUCT_CATEGORIES from the current list of product |
| | categories |
| - | IT_EAI_PRODUCT_CATEGORIESX | Parallel 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_CATEGORIES | List of values provided by the external application, it |
| | contains the keys and values for the product categories to |
| | create/change/delete |
| - | ET_PCAT_CHANGE | List of product categories to change |
| - | ET_PCAT_CREATE | List of product categories to create |
| - | ET_PCAT_DELETE | List of product categories to delete |
| - | EV_UPDATE_PLANNING | Specific to promotion. Is set to true if the planning data |
| | is to be updated |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | STANDARD TABLE | IT_EAI_PRODUCT_GROUPS |
| STANDARD TABLE | IT_EAI_PRODUCT_GROUPSX |
| ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| EXPORTING | CRMT_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_GROUPS | List of values provided by the external application, it |
| | contains the keys and values for the product groups to |
| | create/change/delete |
| - | IT_EAI_PRODUCT_GROUPSX | Parallel 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_IND | If set to True, delete the product groups not included in |
| | IT_EAI_PRODUCT_GROUPS from the current list of product |
| | groups |
| - | ET_PGRP_CHANGE | List of product groups to change |
| - | ET_PGRP_CREATE | List of product groups to create |
| - | ET_PGRP_DELETE | List of product groups to delete |
| - | EV_UPDATE_PLANNING | Specific to promotion. Is set to true if the planning data |
| | is to be updated |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | STANDARD TABLE | IT_EAI_PRODUCTS |
| STANDARD TABLE | IT_EAI_PRODUCTSX |
| ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| EXPORTING | CRMD_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_PRODUCTS | List of values provided by the external application, it |
| | contains the keys and values for the products to create/ |
| | change/delete |
| - | IT_EAI_PRODUCTSX | Parallel 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_IND | If set to True, delete the products not included in |
| | IT_EAI_PRODUCTS from the current list of products |
| - | ET_PROD_CHANGE | List of products to change |
| - | ET_PROD_CREATE | List of products to create |
| - | ET_PROD_DELETE | List of products to delete |
| - | EV_UPDATE_PLANNING | Specific to promotion. Is set to true if the planning data |
| | is to be updated |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | STANDARD 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_PARTNERS | List of values provided by the external application, it |
| | contains the keys and values for the partners to |
| | create/change/delete |
| - | IT_EAI_PARTNERSX | Parallel 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_IND | If set to True, delete the partners not included in |
| | IT_EAI_PARTNERS from the current list of partners |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_PRODUCTS
Protected ABAP_BOOL CHANGE_PRODUCTS(
| IMPORTING | STANDARD 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_PRODUCTS | List of values provided by the external application, it |
| | contains the keys and values for the products to create/ |
| | change/delete |
| - | IT_EAI_PRODUCTSX | Parallel 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_IND | If set to True, delete the products not included in |
| | IT_EAI_PRODUCTS from the current list of products |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_PRODUCT_CATEGORIES
Protected ABAP_BOOL CHANGE_PRODUCT_CATEGORIES(
| IMPORTING | STANDARD 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_CATEGORIES | List of values provided by the external application, it |
| | contains the keys and values for the product categories to |
| | create/change/delete |
| - | IT_EAI_PRODUCT_CATEGORIESX | Parallel 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_IND | If set to True, delete the product categories not included in |
| | IT_EAI_PRODUCT_CATEGORIES from the current list of product |
| | categories |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_PRODUCT_GROUPS
Protected ABAP_BOOL CHANGE_PRODUCT_GROUPS(
| IMPORTING | STANDARD 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_GROUPSX | Parallel 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_IND | If set to True, delete the product groups not included in |
| | IT_EAI_PRODUCT_GROUPS from the current list of product groups |
| - | IT_EAI_PRODUCT_GROUPS | List of values provided by the external application, it |
| | contains the keys and values for the product groups to |
| | create/change/delete |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_STATUS_PROFILE
Private CHANGE_STATUS_PROFILE(
| IMPORTING | ANY | IS_EAI_ATTRIBUTES |
| CRMT_MKTPL_EAI_CHG_FLD | IT_EAI_ATTRIBUTESX |
)
Change the Status profile
Parameters
| - | IS_EAI_ATTRIBUTES | Attributes, structure that contains the new values |
| - | IT_EAI_ATTRIBUTESX | Parallel structure, indicates which values to change |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_SYSTEM_STATUS
Private CHANGE_SYSTEM_STATUS(
| IMPORTING | ANY | IS_EAI_ATTRIBUTES |
| CRMT_MKTPL_EAI_CHG_FLD | IT_EAI_ATTRIBUTESX |
)
Change the System Status
Parameters
| - | IS_EAI_ATTRIBUTES | Attributes, structure that contains the new values |
| - | IT_EAI_ATTRIBUTESX | Parallel structure, indicates which values to change |
Exceptions
| ________________________________________________________________________ |
|---|
CHANGE_USER_STATUS
Private CHANGE_USER_STATUS(
| IMPORTING | ANY | IS_EAI_ATTRIBUTES |
| CRMT_MKTPL_EAI_CHG_FLD | IT_EAI_ATTRIBUTESX |
)
Change the User Status
Parameters
| - | IS_EAI_ATTRIBUTES | Attributes, structure that contains the new values |
| - | IT_EAI_ATTRIBUTESX | Parallel structure, indicates which values to change |
Exceptions
| ________________________________________________________________________ |
|---|
DETERMINE_ACTION_FOR_CHANGE
Protected CRMOST_ACTION_CODE DETERMINE_ACTION_FOR_CHANGE(
| IMPORTING | CRMOST_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_CODE | Action to perform on the element |
| - | IV_ELEMENT_IS_IN_MKTOBJECT | Indicates 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(
| IMPORTING | CRMT_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_ID | External ID of marketing object |
Exceptions
| ________________________________________________________________________ |
|---|
IS_FIELDNAME_FOR_PLANNING
Protected ABAP_BOOL IS_FIELDNAME_FOR_PLANNING(
| IMPORTING | FIELDNAME | 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_FIELDNAME | Field name to validate |
| ________________________________________________________________________ |
|---|
TREAT_ACTION_CODE_FOR_PROD_DIM
Protected TREAT_ACTION_CODE_FOR_PROD_DIM(
| IMPORTING | ANY | 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 |
| EXPORTING | ABAP_BOOL | EV_UPDATE_PLANNING |
| CHANGING | STANDARD 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(
| IMPORTING | CL_CRM_MKTGS_ASG_COLLECTION | IR_ASG_BLOCK_COLL |
| STANDARD TABLE | IT_EAI_ENTRIES |
| ANY | IV_ASG_BLOCK_KEY |
| ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| CHANGING | STANDARD 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_COLL | Reference to the current list of entries in the Marketing object |
| - | IT_EAI_ENTRIES | List of entries to create/change/delete |
| - | IV_ASG_BLOCK_KEY | Access key to read entries in the list of entries |
| - | IV_COMPLETE_TRANS_IND | Complete transmission indicator |
| - | CT_ENTRIES_TO_DELETE | List of entries to delete from the current Marketing object |
| ________________________________________________________________________ |
|---|
TREAT_INDICATOR_FOR_PARTNERS
Private TREAT_INDICATOR_FOR_PARTNERS(
| IMPORTING | CRMT_MKTPL_PARTNER | IT_CURRENT_PARTNERS |
| STANDARD TABLE | IT_EAI_PARTNERS |
| ABAP_BOOL | IV_COMPLETE_TRANS_IND |
| CHANGING | CRMT_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_PARTNERS | Current list of partners |
| - | IT_EAI_PARTNERS | List of partners to create/change/delete |
| - | IV_COMPLETE_TRANS_IND | Complete transmission indicator |
| - | CT_PARTNER_DELETE | List of partners to delete |
| ________________________________________________________________________ |
|---|
TREAT_PARTNER_LISTS
Protected TREAT_PARTNER_LISTS(
| IMPORTING | CRMT_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_CHANGE | List of partners to change |
| - | IT_PARTNER_CREATE | List of partners to create |
| - | IT_PARTNER_DELETE | List of partners to delete |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | CRMT_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_CHANGE | List of product categories to change |
| - | IT_PCAT_CREATE | List of product categories to create |
| - | IT_PCAT_DELETE | List of product categories to delete |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | CRMT_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_CHANGE | List of product groups to change |
| - | IT_PGRP_CREATE | List of product groups to create |
| - | IT_PGRP_DELETE | List of product groups to delete |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | CRMD_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_CHANGE | List of products to change |
| - | IT_PROD_CREATE | List of products to create |
| - | IT_PROD_DELETE | List of products to delete |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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(
| IMPORTING | ANY | 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_ATTRIBUTES | Attributes, structure that contains the new values |
| - | IT_EAI_ATTRIBUTESX | Parallel structure, indicates which values to change |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed 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 )