CL_CRM_MKTPL_EAI_CREATE - Common Create Class
rdisp/max_wprun_time - Maximum work process run time RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
>>> Development Documentation generated by DocuGenerator v2.0 (only available in English => NO TRANSLATION!!!) <<<
General Class Description
Common Create Class
__________________________________________________________
Class Info
| Name: | CL_CRM_MKTPL_EAI_CREATE |
| Instantiation: | Public |
Superclass
Implemented Interfaces
None
Friend Classes
None
Subclasses
CL_CRM_MKTPL_EAI_CREATE_AGR
CL_CRM_MKTPL_EAI_CREATE_TPM
__________________________________________________________
Methods
ADD_ASSIGNMENT_BLOCKS
Protected Abstract ADD_ASSIGNMENT_BLOCKS(
| IMPORTING | CRM_MKTGS_GUID | IV_PROJECT_GUID |
| ANY | IS_MARKETING_PROJECT |
)
| ________________________________________________________________________ |
|---|
ADD_ATTACHMENTS
Protected ADD_ATTACHMENTS(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| CRMT_MKTPL_EAI_ATTACHMENTS | IT_ATTACHMENTS |
)
This method will take care of adding files and urls (attachments) to the promotion.
Parameters
| - | IV_MKTPROJ_GUID | Marketing Project Guid |
| - | IT_ATTACHMENTS | Attachment attributes |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment Note: The resumable |
| exception is raised in order to catch all the errors in input. |
| ________________________________________________________________________ |
|---|
ADD_NOTES
Protected ADD_NOTES(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| CRMT_MKTPL_EAI_NOTE | IT_NOTES |
)
This method is responsible for adding notes to the marketing project
Parameters
| - | IV_MKTPROJ_GUID | Marketing project guid |
| - | IT_NOTES | Table of notes |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment Note: The resumable |
| exception is raised in order to catch all erroreous input |
| ________________________________________________________________________ |
|---|
ADD_PARTNERS
Protected ADD_PARTNERS(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| CRMT_MKTPL_PARTNER | IT_PARTNERS |
)
This method is responsible for adding partners to the marketing project
Parameters
| - | IV_MKTPROJ_GUID | Marketing project guid |
| - | IT_PARTNERS | A table of partners. |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment |
| ________________________________________________________________________ |
|---|
ADD_PRODUCTS
Protected ADD_PRODUCTS(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| STANDARD TABLE | IT_PRODUCTS |
)
This method is responsible for adding products to the marketing project
Parameters
| - | IV_MKTPROJ_GUID | Marketing project guid |
| - | IT_PRODUCTS | A table of products. |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment |
| ________________________________________________________________________ |
|---|
ADD_PRODUCT_CATEGORIES
Protected ADD_PRODUCT_CATEGORIES(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| STANDARD TABLE | IT_PRODUCT_CATEGORIES |
)
This method is responsible for adding product categories to the marketing project
Parameters
| - | IV_MKTPROJ_GUID | Marketing project guid |
| - | IT_PRODUCT_CATEGORIES | A table of product categories. |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment |
| ________________________________________________________________________ |
|---|
ADD_PRODUCT_GROUPS
Protected ADD_PRODUCT_GROUPS(
| IMPORTING | CRM_MKTGS_GUID | IV_MKTPROJ_GUID |
| STANDARD TABLE | IT_PRODUCT_GROUPS |
)
This method is responsible for adding product groups to the marketing project
Parameters
| - | IV_MKTPROJ_GUID | Marketing project guid |
| - | IT_PRODUCT_GROUPS | A table of product groups. |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create assignment |
| ________________________________________________________________________ |
|---|
CREATE
Public CREATE(
| IMPORTING | ABAP_BOOL | IV_RECURSIVE_CALL |
| STANDARD TABLE | IT_MARKETING_PROJECTS | |
| EXPORTING | CRMT_MKTPL_EAI_LOG | ET_MESSAGE_LOG |
)
Entry point to create a marketing project.
Parameters
| - | IV_RECURSIVE_CALL | Flag for recursive call. Should never be set by an external caller. |
| It will be set by this method when we try a second attempt after removing | ||
| objects that have errors for creation. | ||
| - | IT_MARKETING_PROJECTS | Table of marketing projects to create. |
| It has to be an EAI structure (e.g. CRMT_MKTPL_EAI_TPM or CRMT_MKTPL_EAI_AGR). | ||
| - | ET_MESSAGE_LOG | Table of messages raised during the creation of the marketing projects. |
| ________________________________________________________________________ |
|---|
CREATE_MARKETING_PROJECT
Protected CRM_MKTGS_GUID CREATE_MARKETING_PROJECT(
| IMPORTING | CRMS_MKTPL_EAI_HEADER_ATTR | IS_MKTPROJ_ATTR |
)
Create Marketing Project by calling the appropriate appl_base method element_create( )
Returns
RV_MKTPROJ_GUID Returns the guid of the created marketing object
Parameters
| - | IS_MKTPROJ_ATTR | Marketing project attributes |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Failed to create marketing project. One of the possible |
| cause is that the external ID is already used by another | ||
| marketing project. |
| ________________________________________________________________________ |
|---|
CREATE_SINGLE
Protected CRM_MKTGS_EXTERNAL_ID CREATE_SINGLE(
| IMPORTING | ANY | IS_MARKETING_PROJECT |
)
This method is responsible for creating a single marketing project.
Note: This method will create a marketing project, but will not save it.
The save process has to be handled by the caller.
Note: This method deals with a special EAI exception class called
CX_CRM_MKTPL_EAI_FAILED. Before an exception is raised, a proposed message
is sent to the exception class. This is done so that the exception class
actually holds valuable information about what has just occurred.
In the catching of this exception, the extraction of this message is
done via add_message_from_exception( ) which will get the error message
from the exception class and add it to the EAI log.
Returns
RV_PROJECT_EXTERNAL_ID External ID of the created Trade Promotion.
Parameters
| - | IS_MARKETING_PROJECT | Attributes of trade promotion. |
Exceptions
| - | CX_CRM_MKTPL_EAI_FAILED | Raised if an error occurs during creation. |
| ________________________________________________________________________ |
|---|
GET_OBJECT_TYPE_TO_CREATE
Protected Abstract CRM_MKTGS_OBJECT_TYPE GET_OBJECT_TYPE_TO_CREATE( )
| ________________________________________________________________________ |
|---|
PREPARE_RECURSIVE_ATTEMPT
Protected PREPARE_RECURSIVE_ATTEMPT(
| IMPORTING | STANDARD TABLE | IT_ORIGINAL_INPUT |
| CRMT_MKTGS_ITEM_MSG | IT_ERRONEOUS_OBJECTS | |
| EXPORTING | STANDARD TABLE | ET_SECOND_ATTEMPT_INPUT |
)
This method is responsible for creating a new input for a recursive call to create tpm's or agr's.
It will remove the erroneous objects from the original input and create an error free input
for the new call.
NOTE: This method will reuse the IDs generated in the first attempt to avoid wasting too many
numbers of the number range used by the auto-naming BAdI.
Parameters
| - | IT_ORIGINAL_INPUT | Original input of marketing objects |
| - | IT_ERRONEOUS_OBJECTS | Table of erroneous objects that have failed the check before save |
| - | ET_SECOND_ATTEMPT_INPUT | New input of marketing objects with erroneous objects removed |
BAL_S_LOG - Application Log: Log header data Vendor Master (General Section)
This documentation is copyright by SAP AG.
Length: 18637 Date: 20120526 Time: 113148 triton ( 157 ms )






