Skip to main content

How to Set Default Values in SAP Business Partner (BP)

How to Set Default Values in SAP Business Partner (BP)

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:

  1. Create a custom function module in the customer namespace.
  2. Within the function module, call BUP_BUPA_FIELDVALUES_SET to populate default values.
  3. Save and activate the function module.
  4. Run transaction BUS7.
  5. Open event ISDAT/ISSTA.
  6. Create a new entry to register your function module for application BUP.
  7. 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

Popular posts from this blog

PHP MySql CRUD Dengan Konsep MVC

Pada postingan kali ini saya akan sharing cara membuat CRUD dengan php menggunakan konsep MVC, ok langsung saja buka code editor (saya menggunakan sublime text) dan buat folder baru dengan nama phpmvc didalam folder htdocs kalian dan tambah folder seperti berikut :  Setelah itu kita siapkan database di mysql, buat database dengan nama phpmvc dan tablenya seperti gambar berikut : tambahkan file config.php didalam folder app/config : <?php define('BASEURL', 'http://localhost:8181/phpmvc/public'); define('DB_HOST', 'localhost'); define('DB_USER', 'root'); define('DB_PASS', ''); define('DB_NAME', 'phpmvc'); kemudian tambahkan 3 file controller didalam folder app/controllers, yaitu Home, About, dan Mahasiswa : Home.php <?php class Home extends Controller { public function index() { $data['nama'] = $this->model('User_model')->getUser()...

Cara Sederhana Multi Insert Data Dengan PHP - MySQL

Pada postingan kali ini saya akan share cara melakukan insert lebih dari satu data dengan menggunaka PHP- Jquery dan MySQL. Pertama buat database di MySQL dan table, disini saya membuat database dengan nama db_latihan dan table dengan nama t_barang dengan struktur table seperti berikut : Setelah membuat database dan table selanjutnya membuat project PHP, project PHP nya saya buat dengan nama multi-insert, lalu didalam folder ini saya membuat dua file yaitu index.php dan insert.php . Source code index.php seperti berikut : <! doctype   html > < html   lang = "en" >    < head >      <!-- Required meta tags -->      < meta   charset = "utf-8" >      < meta   name = "viewport"   content = "width=device-width, initial-scale=1" >      <!-- Bootstrap CSS -->      < link ...

IT Asset Management Dengan PHP MySQL

Pada postingan kali saya akan share sebuah aplikasi IT Asset management yang fungsinya untuk memonitoring semua Asset khusus IT, contohnya : Laptop/komputer , Printer, Router, Hardisk, dll. Dalam aplkasi ini kita bisa mengetahui Asset IT posisinya dimana dan digunakan oleh siapa. untuk data-data yang dibutuhkan antara lain : 1. data kategori asset dalam menu ini kita bisa meng-input jenis2 kategory asset : tambah kategori asset : 2. data department 3. data karyawan 4. data department per karyawan 5. data asset location  6. data satuan asset dan untuk transaksi yang ada dalam aplikasi ini adalah,  1. create asset, pada menu create asset ini kita akan mengalokasikan sebuah asset ke karyawan/personnel tampilannya seperti berikut: setelah klik tombol save akan muncul seperti dibawah : untuk melihat detail asset yang sudah dibuat tadi, kita bisa pilih...