segunda-feira, 20 de janeiro de 2020

Add Additional tab in Sales without using Access key

What does this Document have to offer?
The focus of this blog post is “How to add Additional Data tab in Standard transaction (VA01,VA02,VA03) in the Header Level using BADI.
Example Scenario : Lets take Seed Industry.While creating the Sale Order they want to record the data related to Schemes like kharif,rabi,spring, in what scheme the Sale Order has been created. So here our requirement is to add the “SCHEMES TAB” in Header level beside Additional data A and B.
Step by Step Implementation of BADI :
To add Additional tab we have BADI named  “BADI_SLS_HEAD_SCR_CUS“.
Step 1 : First of all create the Class using SE24 and create the class  with meaningful description.
Here Add interface “IF_EX_SLS_HEAD_SCR_CUS” and press enter and you can see the screen as below screenshot.
When you add interfaces in Interfaces tab, automatically methods belongs interface gets populated in the Methods tab like below.
Save,Check and Activate it.
Step 2 :
Go to SE18 and provide BADI name as “BADI_SLS_HEAD_SCR_CUS” like below
Click on Display the new screen will be displayed and select the relevant BADI ,right click –> Create BADI Implementation as below
Click on paper as highlighted below to create Enhancement.
Please provide Enhancement Implementation and Short text .
Press Enter and save it  in Request or Local object  and Press Enter
Provide Badi name,description and Class which you have created in Step 1
Save Check and Activate it.
Click on the method and create implementation for activate_tab_page.
if you want to know the structure of double click on “SALES_CUST_TAB_PAGE_T”.
In this struture we have head_caption,head_program and head_dynpro.
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.
In the head_caption we will define the name of the Tab and in head_program we provide name of Module pool program(it should be subscreen) and in head_dynpro we provide the screen number of the program.
Save ,Check and Activate it.

CONCLUSION:
Thus we have implemented the requirement of adding the tab and necessary logic are coded in the module pool programming and screen is designed as per the requirements.
Hope this post will serve as a good guide for beginners like me.
Thanks to SCN once again for all those commendable efforts it has made till now

Nenhum comentário:

Postar um comentário