Monday 1 March 2021

Switching the entry of a Business Partner last name to optional

Override  Business Partner validation as save event via BDT

The BDT (Business Data Toolset) is a central control tool for maintaining master data and simple transaction data. In addition to dialog maintenance, it also supports maintenance with direct input and/or function modules.

Enhancing the screen to make BP last name optional is a common requirement however known to be quite tedious if correct steps are not known.

The below blog explains the steps required to make a Business Partner to last name as optional.

Background

Execute t-code BUPT -> Business Partner -> Control -> Screen Layout -> Field Group or t-code BUS2.

The standard field group 25 shows only First Name among the mandatory fields

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

However Last Name is still Mandatory when an user attempts to save it.

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

Solution


Follow the below steps

1. Create a function group -> within this function group create a copy of function module ISU_BUPA_EVENT_DCHCK.

2. Execute BUPT ->  Select Business Partner→ Controls → Applications (transaction BUS1). Create an individual application. Save your entries. (e.g. Z test BP enhancement)

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

NB: Do not mark as active as this stage

3. Select Business Partner → Controls → Events (transaction BUS7). Select the DCHCK line (checks before saving (cross-view)) and then select Allocate Event → Function Modules.

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

SAP ABAP Exam Prep, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Preparation, SAP ABAP Career, SAP ABAP Guides

4. When you have finished implementing your module, mark your application as Active (transaction BUS1). Save your entries.

No comments:

Post a Comment