Ansicht
Dokumentation

CRM_CMG_BPCHG - BAdI: Reassign Business Partners in Linked Objects

CRM_CMG_BPCHG - BAdI: Reassign Business Partners in Linked Objects

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) can be used in the component Case Management to reassign business partners in linked transactions for a case.

When a user changes the partner in a specific partner function in a case and then saves the case, the system identifies the case transactions that are not closed and have the same partner function or partner function category. If such a transaction exists, a new partner is assigned. You can use this BAdI to influence how business partners are reassigned in linked transactions of a case.

This BAdI definition contains the following methods:

  • GET_PARTNER_FCT_TO_CHANGE: Returns the list of partner functions to be considered for reassignment in linked transactions. If a business partner with the partner functions contained in this method is changed in a case, the PPF action CRM_CMG_CHGBP is triggered.
  • GET_OBJECT_TYPE_TO_CHANGE: Returns the list of business transaction object types to process for changes to business partners. Business partners are changed in transactions if the transaction has one of the business transaction object types returned by this method.
  • PROCESS_BPCHG_IN_CASE: Can be used for additional processing during the PPF action CRM_CMG_CHGBP, for example, to change the processor attribute of the case when the partner function Person Responsible is changed. It receives the case and the table of changed partners. It returns:
  • Error messages to be included in the PPF log

  • Messages to be included in an e-mail sent to the user who changed the business partners in the case

  • Status of report processing (successful or not)

  • CHECK_BEFORE_BPCHG_FOR_TX: Can be used to decide whether to update specific, open dependent transactions for the case. It receives the current transaction being processed, and the table of changed partners. It returns:
  • Messages to be included in the PPF log

  • Messages to be included in an e-mail sent to the user who changed the business partners in the case

  • Status of report processing (successful or not)

In the delivered PPF action definition, the parameter Processing Time is set to Processing using selection report and it is the recommended value for this parameter. To run this action in a background job, use transaction SM36 to define the job and SM37 to select the report SPPFP for the PPF action CRM_CMG_CHGBP.

Note: If you set the parameter Processing Time to Processing when saving document, the processing time needed to save the case varies depending on how many transactions are attached to the case. The greater the number of the transactions, the longer it takes to save the case.

You must include the action CRM_CMG_CHGBP, which is the BAdI implementation of BADI definition EXEC_METHODCALL_PPF with the filter CRM_CMG_ACTION_CHGBP, in the action profile for the case. The action profile is determined when you create the case type. This action is included as an example in the demo case action profile CRM_CMG_DEMO.

The demo delivery contains an additional BAdI definition called COMPLETE_PROC_PPFfor which an implementation has been included. You can find it under the BAdI implementation CRM_CMG_COMPL_BPCHG.

The action profile CRM_CMG_DEMOis used as its filter, and the action name is CRM_CMG_CHGBP. The BAdI is executed after an action has been scheduled and ensures that the action is not evaluated again once it has been scheduled. If you change the action name or the action profile, ensure that this BAdI is implemented for your specific action profile and action name.

Without this BAdI implementation, business partners may not be reassigned. This can occur if the scheduled condition is evaluated again before the action is executed and if the condition is not fulfilled.

An implementation is provided and contains the coding for the methods GET_PARTNER_FCT_TO_CHANGE and GET_OBJECT_TYPE_TO_CHANGE:

  • GET_PARTNER_FCT_TO_CHANGE includes only the partner functions with the categories:
  • Sold-to (0001)

  • Person responsible (0008)

  • Organization responsible (0034)

  • GET_OBJECT_TYPE_TO_CHANGE includes only the object types:
  • BUS2000125 CRM_ACTIVITY_TASK

  • BUS2000126 CRM_BUSINESS_ACTIVITY

  • BUS2000112 CRM_SERVICE_CONTRACT

  • BUS2000116 CRM_SERVICE_TRANSACTION

Additional Information

If an error occurs during the reassignment of business partners, an email is sent to the user who changed the business partners in the case. Emails are sent using SAPconnect. An email address must already exist (in transaction SU01) for users who process cases.

For more information, in the SAP Library see the component SAPconnect (BC-SRV-COM).

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.






ROGBILLS - Synchronize billing plans   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 8655 Date: 20240523 Time: 164949     sap01-206 ( 169 ms )