You are on page 1of 19

New Tabs in Sales VAxx transactions

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?

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.

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

Save and come back to the main screen


Step3: Enter program name as SAPMV45B, select the first radio button
Function Codes and click Change

Create new entries as below

TTyp - A, H and V are Create/Change/Display modes respectively

FCode - ZCM and ZCM2 are function codes for Header and Item tabs

Save the entries and back on the main screen of VFBS

Step4: Select the second option Paths between process locations


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

Now find for panel KZKU Header

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

Detailed view of the record created in this step is as shown below


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.

CALL SUBSCREEN 8310 INCLUDING 'SAPMV45A' '8310'.

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

Certifying a Notification without Credentials!


In this Blog I would like to share on certifying a notification without giving Login Credentials.
Before actually entering into the Subject let me explain clearly the requirement for this. Though i
have serched for the solution i could not find a remedy for this, so thought it would be worth
sharing to you all.

Actually we are coding an RFC function module where user when he clicks on a certain button
after entering the notification Number should be able to certify the notification number. We
usually use the method CERTIFY_COMPLETION of class CL_NOTIFICATION_WPS to
achieve this requirement. But one challenge with this requirement is that when we certify using
this method we will be getting an POP-UP for getting the login credentials as shown Below.
Practically this cannot be supported when we want to use this method at the backend. We came
up with the below solution to overcome this drawback. In the custom function module we called
this Method, through debugging we found out the point where the Pop up Is called. It was in the
FM SIGN_SHOW_SCREEN where the pop is triggered, also for surprise this notification
will be certified even when we skip this pop up. This encouraged us in finding the solution for
suppressing the POP UP.

The solution is simple Just create an Enhancement point in this FM and copy all the PAI events
of the popping up screen, at the end of the enhancement just use EXIT command to come
completely out of the screen. This will ensure that the POP up screen does not commence and
also your requirement of certifying the notification is achieved.

Important Prerequisite: As most of us Know before certifying the notification, all the tasks of
the notification must be completed also the notification must be completed.

Hope this information will be helpful to all. Thanks for reading my Blog

Adding extra tabs in standard transactions


for sales and contracts without access key.
INTRODUCTION:

This post will explain in detail about adding an additional Tab to standard transactions for sales
order (VA01, VA02, and VA03), contract documents (VA41, VA42, and VA43) and other
related transactions of the program SAPMV45A.

HISTORY:

-->When I had this requirement of adding an additional tab, I started with my research on this
across SCN and other SAP related sites. Irrespective of my long research I could not find any
solution for this requirement without the need of ACCESS KEY.

-->However there are solution for this requirement which requires ACCESS KEY. There are
two additional tabs ADDITIONAL TAB A and ADDITIONAL TAB B which SAP has
provided to add customer specific fields. The related screens for modifying these tabs are 8459,
8309.

FEW IMPORTANT POINTS ABOUT THESE TABS:


The Additional TAB A and B are designed by SAP before the advent of BADI based plug in
screens.

The screens 8309, 8549 are never touched during upgrades, however taking access key could
mean that the objects we are changing should be registered for SCCR and special care should be
taken during upgrades to protect the change as they fall in SAP naming spaces.

SAPMV45A / 8459 or 8309 even if they are in SAP naming space they are for customer
modifications and SAP wont overwrite them during upgrades.

There are few ABAPers who are in a wrong assumption that SAP didnt provide any BADI for
this screen modification since many customers have already satisfied their need with the TABS A
and B which is wrong.

SAP has provided a BADI to add additional TABS up to 5(as far as my knowledge) to
accommodate any user specific fields which depends on the later requirements of the customer.

STEP BY STEP IMPLEMENTATION OF THE BADI:

In this blog post I will explain in detail steps on how to implement the BADI.

STEP 1:

Go to transaction SE18 and give the badi name as BADI_SLS_ITEM_SCR_CUS. Click


Display.
STEP 2:

You will be lead into this page where you can see several BADI definitions, you can see the
purpose of each BADIs by reading its description.

STEP 3:

Now our intention here is to add additional tabs only at item level so we select the BADI
accordingly, however there are different BADI for different purpose.

Now right click on the badi BADI_SLS_ITEM_SCR_CUS as below and select create
implementation.
STEP 4:

Click on the paper icon as marked below in red to create a new implementation.

STEP 5:

Give a meaningful name for the implementation as shown below.

STEP 6:

Give a meaningful name for the enhancement implementation and description as shown below
and click the TICK icon as shown below marked in red.
STEP 7:

Now you will be popped up with another window as below.

STEP 8:

Give a meaningful name for the implementation as shown below in the boxes below.
STEP 9:

Give a meaningful name for the implementation as shown below in the boxes below. Please note
that all the details that you have filled earlier is for enhancement and now it is for BADI.

STEP 10:
Give a meaningful name for the implementation as shown below in the boxes below. Class name
should be same as given below, this is the class method where you will write the code.

STEP 11:

Activate now, after activation you will be displayed with a screen as shown below which
indicates that the enhancement and BADI implementation is complete.

STEP 12:
Now Go out and come again into the transaction SE18 and you can see the below screen.

STEP 13:

Click on the enhancement implementation tab and you will see the implementation that you have
created, double click on that.
STEP 14:

Now you will be able to see the window as below.

STEP 15:

Now you will be able to see the window as below. Double click on the class method.
STEP 16:

Now you will be able to see the window as below. Double click on the first method as shown
below to code for adding the tab.

Now you will be able to see the screen as below, in the field caption give the name of the tab,

In the field program give the module program name (Create function group for the
screens), in the field dynpro give the screen number, give all the details in single quants.

Important points:

1) Module Program: This program should contain the screen which will have the required
fields and the respective logic for the fields.

2) Screen Number: This should be screen which you want to get displayed under the Tab
that you have defined.

3) Please note that the screen that you create here must be a sub screen and not main screen
failing which it will lead to a runtime error.

4) Please note that in the if condition I have given as

--> If sy-tcode cp VA4*.

Which means this tab will be there for all the item details in the contract transactions like
va41, va42, va43. So you can code as per your requirement.
Now after activating if you go to the required transaction you will be able to see the tab you have
added as below. These fields are placed as per your requirement.
For how to use methods ACTIVATE_TAB_PAGE, TRANSFER_DATA_TO_SUBSCREEN,
TRANSFER_DATA_FROM_SUBSCREEN

Check implementation FMFG_HEAD_SCR_INT of badi BADI_SLS_HEAD_SCR_INT Where


in screens are created in Function group and function modules are used to fill the data of screens
and pass back the data from screen to order table

You might also like