Ansicht
Dokumentation

CRM_MKTPL_VALI - BAdI: Define Validation for Campaign Type

CRM_MKTPL_VALI - BAdI: Define Validation for Campaign Type

RFUMSV00 - Advance Return for Tax on Sales/Purchases   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

Use

You can use this filter-dependent BAdI to define additional checks and copy details for marketing projects . The BAdI uses the filter type CRM_MKTPL_CAMPTYPE to filter by the marketing project type that was defined in the implementation. If you implement this BAdI for a particular type, the system uses the methods you defined for that type when creating customer orders.

This BAdI contains the following methods:

,,VALIDATE - Validation of marketing parameters.

,,You use this method to set up additional checks for validation. You can use this method, for example, for the validation of stock source trade promotions that are determined using campaign determination. The system uses this method to compare the vendor in the sales order with the vendor in marketing during trade promotion validation.

,,The following parameters are used:

,,-,,FLT_VAL: Filter value that represents the marketing project type defined in CRM_MKTPL_CAMPTYPE. The filter value determines which validation method is called.

,,-,,IT_CHECK_PARAM: Name of the table that contains the check parameters. The associated type is CRMT_MKTPL_PARAM, that is, a table type with the structure CRMS_MKTPL_PARAM. This includes the field label PARAM_NAME (ID of the parameter to be checked) as well as four value parameters, which you can define.

,,-,,IV_MKTELEM: Marketing element GUID

,,-,,IV_OBJECT_GUID: CRM order object GUID

,,-,,IV_HEADER: Indicator that shows that IV_OBJECT_GUID is a header GUID (and not an item GUID)

,,-,,IV_MANUAL: Indicator that shows whether the campaign was created manually or through campaign determination

,,-,,ET_RETURN: Table of messages

,,This validation method only performs certain checks that need to be performed for a particular type. Standard checks that are carried out for all types of marketing elements are not part of the validation method. These checks are performed using the standard validation function (CRM_MKTPL_VALI_MAN).,,

,,Example for the validation of a stock source trade promotion

,,This example describes how you can use this method in a stock source trade promotion to compare the vendor in the sales order with the vendor in marketing. The BAdI method VALIDATE checks whether the vendor returned in the table IT_CHECK_PARAM exists in the partner assignment in marketing. In this case, IT_CHECK_PARAM can contain the following entries:

,,-,,PARAM_NAME: Vendor

,,-,,VALUE 1: (GUID of business partner with the partner function vendor)

,,If the vendor is not available, a message is entered in the table ET_RETURN and the exception NOT_VALID is assigned. However, if the vendor is available in the partner determination, no further measures are taken.

o,,PARAM_COPY - Copies marketing parameters

,,The system uses this method to copy information from marketing to a sales order. This method is useful when copying the vendor from the marketing element to the sales order item.

,,The following parameters are used:

,,-,,FLT_VAL: Filter value that represents the type defined in CRM_MKTPL_CAMPTYPE. The filter value defines which validation method is called.

,,-,,IT_ORDER_PARAM: Name of the table that contains check parameters

,,-,,IV_MKTELEM: GUID of marketing element

,,-,,IV_MANUAL: Indicator that shows whether the campaign was created manually or through campaign determination

,,-,,ET_MKTELEM_PARAM: Name of the table that contains the parameters of the marketing element

,,This method is called in the function CRM_MKTPL_PARM_COPY after the type has been determined. The campaign type is then transferred to FLT_VAL along with the sales order parameters to be checked.

,,Example for copying data in a stock source trade promotion

This example shows how you can use this method in a stock source trade promotion to copy the vendor from marketing to the sales order. To determine the partner set GUID, the system accesses the partner assignment table CRMD_MKTPL_PAR with the GUID of the marketing element from IV_MKTELEM. The partner set GUID is then transferred to the function COM_PARTNER_GET to call the business partner with the partner function vendor. If the system can call the business partner, ET_MKTELEM is filled with the following information:

,,-,,PARAM_NAME: Vendor

,,-,,VALUE 1: (GUID of business partner with the partner function vendor)






CPI1466 during Backup   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 4763 Date: 20240523 Time: 153204     sap01-206 ( 98 ms )