CL_CRM_MKTPL_EAI_CREATE - Common Create Class

rdisp/max_wprun_time - Maximum work process run time   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This 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

CL_CRM_MKTPL_EAI

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(

IMPORTINGCRM_MKTGS_GUID IV_PROJECT_GUID
ANY IS_MARKETING_PROJECT

)

________________________________________________________________________

ADD_ATTACHMENTS

Protected ADD_ATTACHMENTS(

IMPORTINGCRM_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_GUIDMarketing Project Guid
- IT_ATTACHMENTSAttachment attributes

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment Note: The resumable
 exception is raised in order to catch all the errors in input.

________________________________________________________________________

ADD_NOTES

Protected ADD_NOTES(

IMPORTINGCRM_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_GUIDMarketing project guid
- IT_NOTESTable of notes

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment Note: The resumable
 exception is raised in order to catch all erroreous input

________________________________________________________________________

ADD_PARTNERS

Protected ADD_PARTNERS(

IMPORTINGCRM_MKTGS_GUID IV_MKTPROJ_GUID
CRMT_MKTPL_PARTNER IT_PARTNERS

)

This method is responsible for adding partners to the marketing project

Parameters

- IV_MKTPROJ_GUIDMarketing project guid
- IT_PARTNERSA table of partners.

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment

________________________________________________________________________

ADD_PRODUCTS

Protected ADD_PRODUCTS(

IMPORTINGCRM_MKTGS_GUID IV_MKTPROJ_GUID
STANDARD TABLE IT_PRODUCTS

)

This method is responsible for adding products to the marketing project

Parameters

- IV_MKTPROJ_GUIDMarketing project guid
- IT_PRODUCTSA table of products.

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment

________________________________________________________________________

ADD_PRODUCT_CATEGORIES

Protected ADD_PRODUCT_CATEGORIES(

IMPORTINGCRM_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_GUIDMarketing project guid
- IT_PRODUCT_CATEGORIESA table of product categories.

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment

________________________________________________________________________

ADD_PRODUCT_GROUPS

Protected ADD_PRODUCT_GROUPS(

IMPORTINGCRM_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_GUIDMarketing project guid
- IT_PRODUCT_GROUPSA table of product groups.

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed to create assignment

________________________________________________________________________

CREATE

Public CREATE(

IMPORTINGABAP_BOOL IV_RECURSIVE_CALL
STANDARD TABLE IT_MARKETING_PROJECTS
EXPORTINGCRMT_MKTPL_EAI_LOG ET_MESSAGE_LOG

)

Entry point to create a marketing project.

Parameters

- IV_RECURSIVE_CALLFlag 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_PROJECTSTable 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_LOGTable of messages raised during the creation of the marketing projects.

________________________________________________________________________

CREATE_MARKETING_PROJECT

Protected CRM_MKTGS_GUID CREATE_MARKETING_PROJECT(

IMPORTINGCRMS_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_ATTRMarketing project attributes

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDFailed 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(

IMPORTINGANY 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_PROJECTAttributes of trade promotion.

Exceptions

- CX_CRM_MKTPL_EAI_FAILEDRaised 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(

IMPORTINGSTANDARD TABLE IT_ORIGINAL_INPUT
CRMT_MKTGS_ITEM_MSG IT_ERRONEOUS_OBJECTS
EXPORTINGSTANDARD 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_INPUTOriginal input of marketing objects
- IT_ERRONEOUS_OBJECTSTable of erroneous objects that have failed the check before save
- ET_SECOND_ATTEMPT_INPUTNew 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 )