on ‎2025 May 20 11:41 AM
The requirement is to add two new custom fields in BP Transaction in a new tab. We have followed BDT approach, and all the customizations are done accordingly as per below blog:-
SAP S/4HANA Business Partner - Field Enhancement - SAP Community
The custom tab along with fields are now visible and are editable in Change/Create mode as well.
However, when we are trying to change the value in these two custom fields during change/create process in BP Tcode, the data is not getting saved at both the BP screen level and the table level (BUT000).
Step 1:
Open a BP in BP Tcode and check Additional Data tab.
Fields are blank currently.
2- Go to Change mode and enter some values:
3- After pressing save, these values are not getting saved in BUT000 table:
My PAI Code:
FUNCTION zmdg_bup01_pai.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------
*
DATA: false TYPE boole-boole VALUE ' ',
lt_but000 TYPE TABLE OF but000,
table_name_but000 TYPE fsbp_table_name VALUE 'BUT000'.
FIELD-SYMBOLS: <but000> LIKE LINE OF lt_but000.
CHECK cvi_bdt_adapter=>is_direct_input_active( ) = false.
* step 1: update xo memory from technical screen structure
cvi_bdt_adapter=>get_current_bp_data(
EXPORTING
i_table_name = table_name_but000
IMPORTING
e_data_table = lt_but000[]
).
IF lt_but000[] IS INITIAL.
IF gs_but000 IS NOT INITIAL.
gs_but000-partner = cvi_bdt_adapter=>get_current_bp( ).
APPEND gs_but000 TO lt_but000.
ENDIF.
ELSE.
READ TABLE lt_but000 ASSIGNING <but000> INDEX 1.
<but000>-zownership = gs_but000-zownership.
<but000>-zclass = gs_but000-zclass.
ENDIF.
cvi_bdt_adapter=>data_pai(
i_table_name = table_name_but000
i_data_new = lt_but000[]
i_validate = false
).
* step 2: check fields
CHECK cvi_bdt_adapter=>get_activity( ) <> cvi_bdt_adapter=>activity_display.
ENDFUNCTION.
Request clarification before answering.
This is resolved by using FM BUP_BUPA_BUT000_COLLECT in the above code instead of PAI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.