segunda-feira, 20 de janeiro de 2020

Accessing the extra tabs added in sales order through menu

Introduction:

This post will clearly explain you how to access the extra tabs added in sales
order  through menu bar.

At first we add the additional tabs in the sales order either through BADI or
in the screen of program SPMV45A directly. Next we have to display the tab
name as menu item to access the newly added tabs through menu.
Lets see how to achieve this.

Display the tab name in the menu bar:
To display the tab name as menu item follow the below steps.
  1. Open the menu painter transaction SE14 ,and give the
program name as ‘SAPMV45B’ and select status radio button and give
status as ‘U’, and click on change button.

2.  Next expand menu bar, double click on Go to->Header->Additional
Functions, add a new function code example ‘ZXXX’ with tab name
‘New tab’.
3. Then right click on the function code and click on activate to activate the
function code  and activate the status.
4. Now if you go to the transaction and see, in the menu bar in Go
to->Header->Additional Functions, you can see the new tab name you
have added.

Link the new tab name added in the menu item to the tab sub screen:
Now after displaying the tab name  in the menu bar, we have to
link it with the function code in order to go to the tab sub screen through
menu bar.
1. Go to the transaction VFBS, and give program name as
‘SAPMV45B’ and select the radio button ‘Function codes’ and
click  on change button.
2. Next click on new entries and add new function code ‘ZTAB’ for
three transaction types Add (H), Change (V) and Display (A) and
save the data.
3.Next choose radio button ‘paths between processing locations’
and maintain the entry as below.

Program – SAPMV45B
Fcode -New function code
Subsequent panel – New function code
Fcode – ENT1

4.Next choose radio button processing locations and add new
function code ‘ZTAB’ with screen number 4002, and screen
module1 as ‘4012’(Header sub screen) and screen module2 as
‘4323’ (Tab sub screen) and save the data.

Program – SAPMV45B
Screen group – K0
Panel -New function code

Screen 4323 is the sub screen container for badi
‘BADI_SLS_HEAD_SCR_CUS’.
5. Then finally in the standard include
‘MV45AF0F_FCODE_BEARBEITEN’, create an implicit enhancement and
write the logic to check if fcode equals to ‘ZTAB’ ( “new function code) then
assign the fcode with standard function code ‘K_CUS_BADI_1’ (function code
of header tab) and activate the enhancement. This code links new menu item
to the new tab added in the header .
With this you can go to your newly added tab through the
menu bar of the standard transaction. Similarly you can follow the same
approach for other standard transactions also.

Conclusion:
I hope this post has provided you the sufficient knowledge to display the tab
name in the menu bar to access the tabs directly from menu.
Please provide your comments, corrections, likes and ratings
regarding this post.

Thanks to SCN for providing this wonderful platform to share our
knowledge.:)

Nenhum comentário:

Postar um comentário