Adding custom tab to the transaction VF01/VF02/VF03 Header detail screen
Step-1: Go to VF02 transaction
Step-2: Custom Tab to be added in the header detail
Step by step how can we add custom tab to the billing header detail;
In order to fulfill the requirement we need a custom subscreen with some custom fields in that screen.
Steps for creating the custom fields and adding them to the custom sub screen.
Step-1: Creating the Custom fields
a) Create the Z fields to the table VBRK, by appending the structure.
b) Give a name to the structure for example ‘ZZVBRK_APPEND’. Enter the fields name which will you need.
Note: the added fields should follow the naming convention that they should start with ‘ZZxxxxx’ or ‘YYxxxxx’.
c) Save and activate.
Step-2: Creating the z* program and its screen and adding the Z fields on layout.
a) Create a z*program using transaction SE38
give a name for example ZZBILLHEADER .
b) Create a screen using the transaction SE51.
c) Go to screen layout and get the fields from dictionary on vbrk table
d) The screen in VF03 before which is in changeable mode. If you write screen pbo module below code it will be read only.
e) Save and activate the program and screen.
f) Go to transaction vf02,
g) Double click program name SAPMV60A
h) SAP provides 2 screens for customer additional datas; screen 6001 is for header and screen 6002 is for detail screen.
i) In the ‘cust_head_activate’ subroutine we have to activate TABSTRIP_TAB06 for customer header tab screen.
Steps to write the code in the enhancement spots.
a. First to find the enhancement spots click on the spiral icon in the menu bar, and next click on the edit 🡪 enhancement operations -🡪 show implicit enhancement options.
b) You will see the arrows . Right click on the arrow line and click Enhancement implemantation >Create
Step-3: Give a name for Enhancement point, for example ZZBILLHEADER_ACTIVATE_TAB
Click enter and save in a package.
To make use of this logic use enhancement framework. We have enhancement spots at the beginning/end of the subroutine.
Steps to write the code in the enhancement spots.
GS_CUST_TAB-HEAD_CAPTION = ‘ihracat Ek veriler’.”custom tab name
GS_CUST_TAB-HEAD_PROGRAM = ‘ZZBILLHEADER’.”custom z* program
GS_CUST_TAB-HEAD_DYNPRO = ‘0001’” custom z* program screen
Activate the enhancement and check in the VF01/ VF02/ VF03 you can find the custom tab with the custom fields. The Data automatically populates to the database table when the data is entered into the Z fields.
*
6001:抬头
6002:行项目
6101:传输数据到子屏幕或者获取数据(抬头)
6102:传输数据到子屏幕或者获取数据(行项目)
增强屏幕可以用函数组,
创建子屏幕,
函数Z*GET 从子屏幕获取数据
Z*PUT传输数据到子屏幕