Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
mickaelquesnot
Active Participant
In most of my Business Partner workshops I was asked the question: How shall we handle our Z-Fields from Customer/Vendor Master Data in Business Partner transaction.
Short Answer: You must rebuild the fields in Business Partner transaction.
In this guide I’ll guide you step by step to implement a Z-Field from table KNA1 into Business Partner transaction.

How to add a bunch of Z-Fields on a custom tab in BP transaction, you can learn at blog post SAP S/4HANA BP screen enhancement with custom tab written by Badrinath Ravi.

https://youtu.be/M149BfoT0Mg

PDF :

https://www.linkedin.com/feed/update/urn:li:activity:7090684508147994624?utm_source=share&utm_medium...

Introduction

Purpose and target

The purpose of this document is to describe how to implement a BDT enhancement. A field from table KNA1 has to be re-implemented in Business Partner transaction as well to ensure availability in SAP S/4HANA.

Remark: This procedure can be used for all the single fields from Customer or Vendor tables. This Cookbook is not made for fields related to Table Controls as of partner assignment for example from KNVP.

Foundation for this document is SAP note
2309153 – BP_CVI: Guideline Version 1.14 for customer enhancements in CVI (customer/vendor integration) in SAP S/4HANA releases
Target audience: Functional expert, Development expert
Version: SAP S/4HANA On premise 1610 and higher
There is a field in table KNA1 which was available in BP transaction.

SE11

 

In case you are adding this field completely new, don’t forget to mark for Change Document at Data Element level to track changes at this field.

Indicator for writing change documents
Use
The flag for change documents specifies whether changes to fields in database tables defined with reference to this data element are logged when change document objects are involved.
See
• Task-Oriented Instructions
• Reference Documentation for Semantic Properties of Data Elements

This field has to be re-implemented in SAP S/4HANA to be available in transaction Business Partner with customer role.
BP

Implementation
Determine Area in Business Partner transaction where to place the new field
In this example the field should be placed in customer role, tab (Screen) ‘Customer: General Data’, Section ’ Additional General Data’
1. Run transaction BP and navigate to role ‘Customer’->tab ‘Customer: General Data ’New field should be placed directly below the field ‘Plant’. To determine screen control settings of BDT, place the cursor into field plant and enter OK-Code BDT_ANALYZER into transaction field.

 

1. BDT_ANALYZER is starting and gives information about screen control. For later assignment of new view the following information is important:Navigate to
Section CVIC45- Additional General Data
and open folder viewsNote down section number (for example CVIC45)

 

2. To get View details navigate into view CVIC62 by clicking on name CVIC62 Note down
Application: CVIC
Differentiation Type: 0

Data Set: CVIC11

Create Technical Objects

Create Function Group

1. Run Object Navigator with transaction SE80

 

Create PBO Function Module

1. From context menu of new Function Group choose Create-> Function Module

 

2. Enter name, Function Group and Short Text of new Function Module

3. Enter Coding

 

FUNCTION z_cvic_bupa_bpo_zvic01.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

DATA:
lt_kna1 TYPE TABLE OF kna1,
table_name_kna1 TYPE fsbp_table_name VALUE 'KNA1'.

* step 1: request data from xo for dynpro structure
cvi_bdt_adapter=>data_pbo(
EXPORTING
i_table_name = table_name_kna1
IMPORTING
e_data_table = lt_kna1[]
).
IF lt_kna1[] IS INITIAL.
CLEAR gs_kna1.
ELSE.
READ TABLE lt_kna1 INTO gs_kna1 INDEX 1.
ENDIF.

ENDFUNCTION.

Create PAI Function Module

1. From context menu of new Function Group choose Create-> Function Module

 

2. Enter name, Function Group and Short Text of new Function Module

 

3. Enter Coding Save and activate.

 

FUNCTION z_cvic_bupa_pai_zvic01.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

DATA: false TYPE boole-boole VALUE ' ',
lt_kna1 TYPE TABLE OF kna1,
table_name_kna1 TYPE fsbp_table_name VALUE 'KNA1'.

FIELD-SYMBOLS: <kna1> LIKE LINE OF lt_kna1.

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_kna1
IMPORTING
e_data_table = lt_kna1[]
).

IF lt_kna1[] IS INITIAL.
IF gs_kna1 IS NOT INITIAL.
gs_kna1-kunnr = cvi_bdt_adapter=>get_current_customer( ).
APPEND gs_kna1 TO lt_kna1.
ENDIF.
ELSE.
READ TABLE lt_kna1 ASSIGNING <kna1> INDEX 1.
<kna1>-zaugmentation = gs_kna1-zaugmentation.
ENDIF.

cvi_bdt_adapter=>data_pai(
i_table_name = table_name_kna1
i_data_new = lt_kna1[]
i_validate = false
).

* step 2: check fields
CHECK cvi_bdt_adapter=>get_activity( ) <> cvi_bdt_adapter=>activity_display.

* SPACE to implement own PAI checks

 

ENDFUNCTION.

 

Create Technical Screen

1. From context menu of new Function Group choose Create-> Function Module

 

2. Enter screen number

3. Enter screen attributes
Short Text and type Subscreen

Save & activate

 

 

4. Navigate to Layout (Screen Painter) (SE80 or SE51)

 

1. Create Text Field

2. Accept dictionary reference proposal.

3. Create Input field.

 

4. Define Field as CHAR via double click at field!!! Pay attention to field format. This must fit to format of field in table KNA1.!!!

 

SE51

 

5. Activate the new object and close Screen Painter Navigate to screen Flow Logic

6. Assign PBO Module

 

7. Create PBO Module with double click at pbo
Enter sub routine pbo

 

8. Create sub routine pbo with double click at pbo
Enter coding

*----------------------------------------------------------------------*
***INCLUDE LZZ_CVIF01.
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form PBO
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM pbo .

CALL FUNCTION 'BUS_PBO'.

ENDFORM.

9. Assign PAI Module

10. Create PAI Module with double click at pai Enter sub routine pai

11. Create sub routine pai with double click at pai

Enter coding

Extend Complex Interface CVIS_EI_EXTERN

To ensure data transportation from Business Partner to Customer master data the complex interface of CVI has to extended by the additional field.

1. Open ABAP Dictionary run transaction SE11 and enter data type CVIS_EI_EXTERN

 

2. Use forward navigation to reach customer’s central data using double click

 

3. Both structures DATA and DATAX needs to get an append

4. Create append to DATA structure type Navigate into structure with double click

 

5. Create Append structure ZKNA1_ENH

 

 

6. Add structure component and component type as definition in KNA1

7. Save and Activate changes

8. Navigate back to Structure CMDS_EI_CMD_CENTRAL

 

9. Create append to DATAX structure typeNavigate into structure CMDS_EI_VMD_CENTRAL_DATA_XFLAG with double click

 

10. Create an Append Structure ZKNA1_ENHX

11. Add structure component

12. Save and activate changes

13. Leave transaction SE11

 

Customizing settings in BDT

Create Field Group

1. Open BDT menu using BUPT in OK-Code field

 

2. Navigate to Screen Layout section and open Field Groups

 

 

3. Create a new Field Group in Customer Name space

 

4. Create Field Group 601
Function Module CVIC_BUPA_EVENT_FMOD2_ENH is used to determine field control (mandatory, hidden, …) from customizing

 

5. Assign fields from technical screen to field group

 

 

6. Save your changes

 

 

Create View

1. Navigate to Screen Layout section and open Views

BUS3

 

2. Create a new View and take Values from Chapter ‘Determine Area in BP transaction where to place the new field’. Use technical screen program name and number from chapter ‘Create Technical Screen’ Use PBO and PAI function module names from chapters ‘Create PAI Function Module’ and ‘Create PBO Function Module’

 

 

3. Assign Field Group to View

 

4. Save your changes

Assign View to Section – BUS4

 

1. Navigate to Screen Layout section and open Sections

2. Position Cursor on Section determined in Chapter ‘Determine Area in BP transaction where to place the new field’

 

3. Mark Section and choose Section->View Assignment from navigation tree.

 

4. Choose New Entries

 

5. Enter data for new assignment - Use View number from Chapter ‘Create View’

 

Save the data

 

Test
1. Start Transaction BP

 

2. Search for a customer

 

3. Display the customer

 

4. Select role ‘Customer’

 

5. Navigate to tab ‘Customer: General Data’

Conclusion

With this guidance you can implement additional fields at Business Partner transaction on your own.

Se16n
3 Comments
avikjuoss
Participant
Nice document! your - Linked url post PDF showing can not be displayed. Please amend that link.
mickaelquesnot
Active Participant
avikjuoss
Participant
Thank you for sharing!
Labels in this area