C4C Utilities – Activate BADI in Guided Procedure for Move-in

 

The objective here is to implement the BADI for the call to create Business Partner and Contract Account.

Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the topic.

In general, all service calls have an associated Function Module in ERP, and they have a pre-BADI and a post-BADI, where it is possible to change data before processing, or change the data after processing before it is returned to C4C. For some of those there are also ‘skip’ flags – to suppress the execution of the standard logic completely and implement our own logic.

The function module used for creating the Business Partner and the Contract Account is COD_UTLITIES_MDT_MVI_CREATE.

 

Open the function module using transaction SE37 and double click on the ‘Call BADI line’.


 

In (1) is the name of the Enhancement Spot, and there is two methods available here (2). In order to implement the Enhancement Spot click on the small icon in the red box (3).

This will create an Enhancement Implementation.


 

In the pop-up enter the name and a short text for the enhancement implementation and then select OK (red arrow).


 

 

The enter BADI name, description and name of the Class where the implementation of the methods will take place. Select OK (red arrow).

 

 


 

 

Click on the ‘Implementation Class’ line.


 

 

Here we have the methods. Click on the ‘MDT_MVI_CREATE_PRE’ method.


 

 

It will ask for confirmation that we want to create the implementation. Select ‘Yes’.


 


 

The method comes up and the only thing for this example is that we set the MDT template name to ‘SBH_C4C_BPCA_1′. The variable x_prodid’ is the one holding the MDT name.

Then select activate.


 

This will provide all objects that needs activating. Select OK.


 

Now the implementation is active.


 

 

For this example, there is only logic needed for the pre-BADI – BUT – in order for the implementation to work the post-BADI have to be implemented as well.

 

Go to SE80 and select the class created – here ‘ZCL_BP_CA_CREATE1’. Click on the second method ‘MDT_MVI_CREATE_POST’.

 


 

 

Select ‘Yes’ to implement the method.

 


 

Then select ‘Activate’, and the implementation of the BADI is complete.


 

The function module will now call the pre-BADI. It will use the MDT(SBH_C4C_BPCA_1) passed by the BADI implementation for creating Business Partner and Contract Account.

 


 


 

Leave a Reply

Your email address will not be published. Required fields are marked *