SAP crashed unexpectedly when opening Add New BP Master Data window. The cause is due to UDF used in FMS query was removed.
Below are steps to reproduce:
- Go to Tools → Customization Tools → User-Defined Fields - Management... and create 2 new User Defined Fields (UDF) on Master Data → Business Partners → Business Partners. Eg. U_IPSBank_Acc, U_IPSBank_Name
- Go to Tools → Queries → Query Generator. Create and save a simple SQL query, example: select '1'.
- Go to Business Partners → Business Partner Master Data.
- Click on the UDFs created in step 1 (i.e. U_IPSBank_Name) and go to Tools → Customization Tools → User-Defined Values - Setup.
- Select the option Search in Existing User-Defined Values according to Saved Query, press the Open Saved Query button and choose the query created in step 2.
- Select the Auto Refresh When Field Changes checkbox and choose BP Code field.
- Select the option Display Saved User-Defined Values and press the Update button.
- Go to Tools → Customization Tools → User-Defined Fields - Management... and remove the UDF U_IPSBank_Name with the configured User-Defined Value. Do not remove the other UDF U_IPSBank_Acc created in step 1.
- Go to Business Partners → Business Partner Master Data and switch to add mode.
- SAP Client will crashed when select Add New in BP Master Data window.
Use below query to detect the affected FMS query and identify the missing UDF.
Select * from CSHS where "ItemID" like 'U_%' and "Refresh" = 'Y' and not exists (select * from CUFD where "ItemID" = concat('U_', "AliasID"));
For example, UDF U_IPSBank_Name is missing.
Correction:
Option 1 - Create the missing UDF U_IPSBank_Name, find the fields in BP Master and remove the FMS that uses this UDF.
Option 2 - Run below query to fix, with SAP approval.
delete from CSHS where "ItemID" like 'U_%' and "Refresh" = 'Y' and not exists (select * from CUFD where "ItemID" = concat('U_', "AliasID"));
Reference