cancel
Showing results for 
Search instead for 
Did you mean: 

BADI for edit button

Former Member
0 Kudos

hi everyone ,

In the incident management ticket creation screen , is there any BADI for the EDIT button. I have implemented BADI "ORDER_SAVE" for the save button. Please suggest me BADIs for the EDIT button.

Thanks in ton

Accepted Solutions (1)

Accepted Solutions (1)

samantak_chatterjee
Active Contributor
0 Kudos

Hi Gautham,

I think for EDIT Button there is no specific BadI. When you click the EDIT Button, based on the scope of the button either the entire Overview Set or specific Assignment blocks is changed to edit mode.

It is always better to trigger the specific BadI which will focus on your specific action for example - status change, partner change, etc.

You can get a list of badi in the following link : SAP CRM Technical Tutorials by Naval Bhatt.: SAP CRM Most useful BADIs (Updating) .

Also, very important Badi's of SAP CRM are : CRM_ORDER_STATUS for Status and Partner - COM_PARTNER_BADI other than the ORDER_SAVE Badi.

If you can share the name of the component then it will easy for us to explore into the Badi or Enhancement Spots specific to that module.

Hope this helps.

Thanks,

Samantak Chatterjee

Former Member
0 Kudos

Hi Samantak,

A Big thanks for your valuable inputs.

The requirement is the "assigned to" field is getting filled with support team ("helpdesk" in our scenario). This is accomplished by BRF+ support team determination. The requirment is on the next change status change , the assigned to field must be made empty which is getting filled by the value "helpdesk". For this scenario we require to implement a BADI.

If i use the BADI , CRM_ORDER_STATUS .. i cant retreive the assigned to value which is coming from BRF+ using FM CRM_ORDER_READ. Is there any options to read the assigned to field value and what is the importing parameter for the BADI CRM_ORDER_STATUS

Answers (2)

Answers (2)

former_member541649
Active Participant
0 Kudos

Hi Gautham,

What are you trying to achieve?

In general, you can put a breakpoint on cl_exithandler class, get_instance method. This gets invoked every time a BAdI implementation is checked during the course of the process.

So you could put a break point there and click on Edit button and note down the BAdI exit names and investigate further.

Also, it would help if you could explain what you are trying to achieve, maybe there is a different way of achieving it?

Regards,

Parul

Former Member
0 Kudos

Hi Parul ,

Thanks for your valuable inputs.

The requirement is the "assigned to" field is getting filled with support team ("helpdesk" in our scenario). This is accomplished by BRF+ support team determination. The requirment is on the next change status change , the assigned to field must be made empty which is getting filled by the value "helpdesk". For this scenario we require to implement a BADI . Please suggest your valuable inputs.

former_member541649
Active Participant
0 Kudos

Hi Gautham,

You need to look for BAdIs that get called when status is changed, not on the edit button.

Check if CRM_ORDER_STATUS works for your use case.

Regards,

Parul

samantak_chatterjee
Active Contributor
0 Kudos

Hi Gautham,

If I understand you correctly, you need to extract the values from BRF+. If you have the Application ID (GUID), then you can create an instance of the FDT Factory CLass : CL_FDT_FACTORY and then by passing the application Guid you can get the desired values. Since SAP BRF+ is based out of the same SAP NetWeaver 7.x application stack, so you don't need to make any calls to any external system.

The second part is passing the field values. If you explore the Badi, there are 2 methods. One is AFTER_CHANGE and other is BEFORE_CHANGE. You can use the after change. In the importing parameter there is a structure - CRMT_STATUS_WRK which will contain the new values. You can check the value and match it with your values and then perform further action with the values in BRF Plus.

Hope this helps.

Thanks,

Samantak Chatterjee.

Former Member
0 Kudos

Hi Samantak,

Sorry for late response ,

1.)I ve implemented the CRM_ORDER_STATUS badi and for the filter values i have used the corresponding status for which the badi is to be implemented . Now in the interface section of AFTER_CHANGE , i need to make the value of "assigned to" field empty. Earlier i used CRM_ORDER_READ FM to read the values from the screen but in this case the FM doesnt have the values for "assigned to". Where i can retrieve the "assigned to" field values and how to update it back to the screen.  Is there any FM to acheive like this ??

2.)If you have the Application ID (GUID), then you can create an instance of the FDT Factory CLass : CL_FDT_FACTORY and then by passing the application Guid you can get the desired values. --->I was passing the GUID which i pass to FM CRM_ORDER_READ where i got the scrren values in the table lt_orderadm . Can you brief me CL_FDT_FACTORY how to retreive data from it .

Thanks in advance for sharing your wonderful knowledge

samantak_chatterjee
Active Contributor
0 Kudos

Hi Gautham,

As per my understanding, the field you are mentioning is not a field from the standard structure. In that case, you need to know where exactly have you enhanced or which component, so that you can locate that structure. In many cases, the structure Customer Header (CUSTOMER_H) gets appended. While, in other scenarios different other fields are appended. In case you are not sure about where exactly the field is appended, you can check the same from the SAP CRM Web Client UI, and then you will know the component.

Regarding, the BRF+ Application ID (GUID), you need to pass the same to the CL_FDT_FACTORY Class. This GUID is BRF+ Application Guid and not related to any one order component. You can use the below code snippet.

Code

Data : l_if_factory          TYPE REF TO if_fdt_factory,

          l_if_application     TYPE REF TO if_fdt_application.

l_if_factory = cl_fdt_factory=>if_fdt_factory~get_instance( ). Here pass the Application GUID and you will get the exact application. After that you can get the details of the BRF+ Application.


Hope this helps.

Thanks,

Samantak Chatterjee.

faisal_pc
Active Contributor
0 Kudos

Hi Gautham,

Please check BADI CRM_ORDER_AUTH_CHECK.

Thanks,

Faisal