enhace vf02 item

12
Adding custom tab to the transaction VF01/VF02/VF03 item detail screen By Hema Bobbili, Hewlett Packard Go to VF02 transaction: Custom Tab to be added in the item detail SAP has provided a custom tab in the tab strip (Program name SAPMV60A) screen 6002 which is having the function code ‘PFCU’.

Upload: suryaredi123

Post on 13-Sep-2015

8 views

Category:

Documents


4 download

DESCRIPTION

Billing document

TRANSCRIPT

Adding custom tab to the transaction VF01/VF02/VF03 item detail screenBy Hema Bobbili, Hewlett PackardGo to VF02 transaction:

Custom Tab to be added in the item detailSAP has provided a custom tab in the tab strip (Program name SAPMV60A)screen6002which is having the function code PFCU.

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.1. Creating theCustomfieldsa)Create the Z fields to the table VBRP, by appending the structure.

b) Give a name to the structure for example zzcustom_fields. Enter the field name.

Note: the added fields should follow the naming convention that they should start withZZxxxxx.c) Save and activate.2. Creating the screen and adding the Z fieldsa) Create a screen using the transaction SE51.b)Get the field from the dictionary which needs to be added to the screen.

c)Save and activate the screen.Click here to continue..

...Previous3. Go to SE80 and give the program name (SAPMV60A)of the VF01 transaction. Go to screen-> 6002.

In the MODULEPBO_6002thesubroutine PBO_6002_TABSTRIP_POSspecifies the position of the tab.

In order to activate the custom tab for this requirement which is having the function code PFCU, the moduleCUST_ITEM_ACTIVATEneeds to be implemented.

To make use of this logic use enhancement frame work. We have enhancement spots at the begin/end of the subroutine.4. 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 theeditenhancement operations -show implicit enhancement options.

Start of the enhancement spot

End of the enhancement spot

Create the enhancement spot.

Click on the create enhancement implementation

Give some name to the enhancement implementation.

Click enter and save in a package.Select your implementation and then continue.

In between the ENHANCEMENT and ENDENHANCEMENT statements Insert the below code.Insert your code as below.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. But where as in display mode it is changeable for it to be made disable, a simple code is to be added.The screen in VF03 before which is in changeable mode.After adding the code the screen is as follows in VF03 transaction.