Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Log On
Hi, Guest
Join Us
Products
About SCN
Downloads
Industries
Partnership
Developer Center
Activity
Lines of Business
University Alliances
Innovation
Browse
26
Tweet
Like
Quite often we come across instances where we require custom fields on the face of quotations,
orders, etc. To achieve this, SAP has provided an Additional tab named Additional Data tab B at
header and item level in VAxx transactions. However, over a period of time, these additional tabs
get cluttered with many custom fields, especially in a matured project. Now if the business
demands more custom fields on quotations, orders on a new tab altogether, what is the solution?
postpost
Yes, youre right! We require more tabs; preferably next to Additional Data tab B.
How do we go about achieving this functionality?
Well, we first need to add custom fields to VBAK table using APPEND STRUCTURE. Its assumed we
all know it already.
Now, if youre using a system with Enhancement Pack 6 installed, youd be delighted to know SAP
has provided a BAdI named BADI_SLS_HEAD_SCR_CUS/BADI_SLS_ITEM_SCR_CUS. You can find
this in SPRO
All you need to do is just implement this BAdI. Use the methods ACTIVATE_TAB_PAGE to
populate name of the Tab, custom program name and the dynpro number. Next, use
TRANSFER_DATA_TO_SUBSCREEN and TRANSFER_DATA_FROM_SUBSCREEN methods for
passing the data to and fro from screen to workarea. More info here. And Voila! You can see the
custom tab added next to Additional Data Tab B.
HOWSOEVER! For a few unfortunate souls like me who come to know their SAP system is not yet
on Enh Pack 6, adding a new tab to VAxx becomes a challenge because the aforementioned BAdIs
are not available in the older systems.
So, what needs to be done?
Well, Im sure most of you have heard of this transaction named VFBS.
Store
Communications
Actions
Yes, were now going to add a new tab to sales transactions in SAP using this very transaction!
Step1: Execute VFBS, enter program name as SAPMV45A
Step2: Select Tab Control and click Change button and add below records for header and item
tabs
Program Name: SAPMV45A
Screen Group: K0 (Screen Group for Header) and in case of item, the screen grp is P0
Number: 131 or the number immediately after Additional Data Tab B
Funct. Code: Any custom function code (eg. ZCM)
Description: Any meaningful description you want on the tab
The idea behind creating entries in this step is to simply copy the standard SAP data already
maintained for Additional Data Tab B
The function code for Additional Data Tab B on Header Level is KZKU and PZKU is for item as
shown below in the screenshot taken from step 3
Now find the entries maintained for KZKU and PZKU function codes.
Were going to clone these entries as is and change the FCcode and Subsequent Panel to ZCM
(Header) and ZCM2 (Item)
Step5: Select the third radio button on the main screen and click on the Change button
Clone it and rename Panel to ZCM. Change the Location description to something meaningful
K0 as explained in step # 2, is the header group. Screen # 4002 is the dynpro number for Header
tab.
Below screenshot taken using System->Status in VA22 on Additional Data Tab B
Ive kept Screen module 2 as 8309. This can be changed to screen # 8310 too. In that case, wed
simply need to add a line of code on the flow logic of screen # 4312 below this line.
Also, we need to add a subscreen of the same name in the screen Layout
Below is the screenshot of Item details. Again, in this case, we can change Screen Module2 to
8460
Now execute any VAxx transactions like VA02, VA22, etc, youll get to see the newly added tab.
To restrict visiblity of this tab to only a particular transaction, below is the code which needs to be
added using an Enhancement Implementation in INCLUDE MV45AF0C_CUA_SETZEN - FORM
CUA_SETZEN
426 Views
Share
26
Tweet
Like
4 Comments
Sachin Kulkarni Sep 29, 2014 12:10 PM
AASIM, Indeed very Interesting and helpful way of adding the new TAB for Sales txn.
Appreciate for sharing this !!
Like (0)
Thanks for sharing! We are upgrading one system right now, so BADIs will come in handy for sure.
Finally some progress comes to the VAxx transactions. Now we never have to switch to HANA!
Like (0)