Wednesday, February 8, 2012

Create Transaction Code for a View


Create Transaction Code for a View

How to create Transaction code for a View
 In SAP,views are created (through SE11) to see the data which are stored in different tables. For example: If I would like to see the material Number, description and corresponding plant then I need to use 3 different tables MARA, MAKT and MARC. To see the details on one screen, view is created with different table/ join conditions. Once it is created we can view the data via SM30 transaction code or by creating an exclusive Z-T-code for the view.
 The following section of this document provides the step by step guide on how to create transaction code for a view instead of using SM30.
 For example, I am considering a view Z_MARA_DETAILS which I created to display material, plant and material description from table MARA, MARC and MAKT.
 Do the following steps to create the transaction code for your view,
 1.       Execute the transaction code SE93.
  
2.       Enter the transaction code Name and click on Create Button.
3.       A pop up window will appear requesting for " Short Text" and "Start Object".
4.       Enter the short text and select the start object  "Transaction with Parameters( Parameter Transaction)".For views,we create Parameter Transaction.

5.       Under "Default values for" Tab enter the transaction code 'SM30' and select the check box "Skip Initial Screen". 
6.       Scroll down and under "Name of screen field", select the field name as VIEWNAME and Value "Z_MARA_DETAILS"'. Next select the field name as UPDATE and value as "X". 
7.       Save the transaction code.

No comments: