How to Set Default Values in SAP Business Partner (BP)
In SAP Business Partner (BP) transactions, setting default values can help streamline data entry and ensure consistency across the system. For example, you may want to predefine a default language or tolerance group at the company level. SAP provides a standard way to handle this through the BUSDEFAULT
structure and enhancement options.
This guide explains how to set default BP values using customer exits and the function module BUP_BUPA_FIELDVALUES_SET
.
Understanding the BUSDEFAULT Structure
SAP provides a structure called BUSDEFAULT
, which contains fields that can be configured with default values. You can explore it using transaction SE11.
Some of the key fields available in BUSDEFAULT
include:
- LANGU – Business partner language
- COUNTRY – Country/Region key
- POST_CODE1 – City postal code
- MC_CITY1 – City name
- TELNR – Telephone number
- BPKIND – Business Partner Type
- BU_SORT1 / BU_SORT2 – Search Terms
For a detailed reference, SAP Note 2992030 provides more insights into this feature.
Implementation Steps
Follow these steps to configure default values for SAP BP:
- Create a custom function module in the customer namespace.
- Within the function module, call
BUP_BUPA_FIELDVALUES_SET
to populate default values. - Save and activate the function module.
- Run transaction BUS7.
- Open event ISDAT/ISSTA.
- Create a new entry to register your function module for application BUP.
- Save and ensure the Call indicator is set to X.
Sample ABAP Code
DATA i_busdefault TYPE busdefault.
CLEAR i_busdefault.
i_busdefault-langu = sy-langu.
CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
EXPORTING
i_busdefault = i_busdefault.
This example sets the default language (LANGU
) based on the system language (sy-langu
).
Registering the Function Module
In transaction BUS7, add a new entry to link the function module with the event:
- Event: ISDAT (Read Data)
- Function Module: Your custom module (e.g.,
Z_BUP_BUPA_DEFAULTS
) - Call: Set to X
This ensures the default values are applied automatically whenever BP data is processed.
Conclusion
By leveraging the BUSDEFAULT
structure and BUP_BUPA_FIELDVALUES_SET
function module, you can automate the process of setting default values in SAP Business Partner (BP). This not only saves time but also improves data consistency and reduces manual errors.
For complex requirements, you can extend this approach by customizing additional fields within the BUSDEFAULT
structure and linking them to events in BUS7.
Comments
Post a Comment