cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Populate default value in custom field added in Service order header

Rajeswari4
Explorer
0 Kudos
114

Hi,

   I have added custom field ( code list) in service order header screen and it has three values. I want to default this custom field with one of the value and I implemented BADI CRMS4_SERV_CUST_H_MODIFY to populate this custom field. When I edit the service order , this custom field is not populated with value assigned through custom logic of BADI CRMS4_SERV_CUST_H_MODIFY . This BADI is not getting triggered/called during service order edit. Could you please provide solution to default value in custom field of service order header.

Thanks,

Rajarajeswari

 

View Entire Topic
DequanXu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

To default a custom field value in the service order header and ensure it's populated during editing, you need to modify your implementation of the CRMS4_SERV_CUST_H_MODIFY BAdI. Here's how to address the issue:

  1. Correct the BAdI implementation:

    • Remove the statement serviceheader_extension_out = serviceheader_extension_in from your BAdI implementation .
    • This statement overwrites your new values with the old ones, preventing your custom logic from taking effect.
  2. Implement the correct logic:

    • In the BAdI method, assign your desired default value directly to the corresponding field in the serviceheader_extension_out structure .
  3. Ensure the BAdI is called during editing:

    • The BAdI should be triggered both when creating and editing service orders.
    • Double-check your BAdI implementation to ensure it's properly registered and activated.
  4. Consider using the SERVICE_TRANSACTION_CHECK BAdI:

    • If the CRMS4_SERV_CUST_H_MODIFY BAdI is still not triggered during editing, you may need to use the SERVICE_TRANSACTION_CHECK BAdI.
    • This BAdI allows you to check and modify service order data before saving.
  5. Verify custom field properties:

    • Ensure that the custom field properties are set correctly in the BAdI implementation.
    • The CRMS4_SERV_CUST_H_MODIFY BAdI is specifically designed to set field properties for extension fields at the solution order header level.

Best regards,

Dequan Xu

Rajeswari4
Explorer
0 Kudos

Hi Dequan Xu,

  Thanks for your reply. We have checked all the points provided by you for the BADI 'CRMS4_SERV_CUST_H_MODIFY' and still it doesn't update the code list value before the Service order screen is displayed. However, we are unable to find the other BADI 'SERVICE_TRANSACTION_CHECK' mentioned by you in public cloud.

Regards,

Rajeswari