Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
lijisusan_mathews
Active Contributor


Introduction


Transactions are used to execute each SAP program.  The transaction code can be entered directly by the users into the command box in the toolbar , or they can be attached to the SAP Menu.

Purpose


This article allows gives you a basic overview of the different types of transactions that can be created .To create a transaction we use the Tcode SE93. When we goto Tcode SE93 and try to create a Tcode, you will find that 5 types of transactions are available from which you can select th eone appropraite for your particular program. The 5 types of transactions are :

  • Dialog Transactions
  • Report Transactions
  • Object Oriented Transation
  • Parameter Transation
  • Variant Transaction

Dialog Transaction


Introduction

Dialog Transactions are used to execute programs with type ‘Dialog Module’ or ‘Module Pool’. Programs created with this type cannot be executed without creating a Tcode for it.

Steps

To create a Dialog Transation:-

  1. Take SE93 and click Create.
  2. Give the Tcode name to be created and a description adn click Enter.
  3. In the dialog box that pops up, select Dialog transaction.
  4. Now in the screen that appears, enter  the Program name and fill the main screen no . ( The screen whose PBO is to be executed first ).
  5. Now select the check box to Inherit GUI Attributes. Save and Check.
  6. Execute the Tcode .

Report Transation


Introduction

Report Transactions are used to create TCodes for  programs of type 1 or Executable programs.

Eg. Purpose

Let us say, we have created a Type 1 program for displaying the details of selected materials. Suppose our program name is ZMMRDSP001. We will now see the steps required to create a T code for the program. We will set the T Code as ZMMR001. The following are the steps needed to create it.

Steps

To create a report transaction:-

  1. Take SE93 and click Create.
  2. Give the T code name as ZMMR001 and a description as Material Display, and click Enter.
  3. In the dialog box that pops up, select Report transaction.
  4. Now in the screen that appears, enter  the Program name ZMMRDSP001.
  5. If you want any specific variant to be executed by default, give the variant name.
  6. Now select the check box to Inherit GUI Attributes. Save and Check.
  7. Execute the T code .

Object Oriented Transaction


Introduction

Object Oriented Transactions can be used when you want to execute a class method directly.

Steps

To create a Object Oriented Transaction:-

  1. Take SE93 and click Create.
  2. Give the T code name to be created and a description adn click Enter.
  3. In the dialog box that pops up, select  Object oriented transaction.
  4. Now in the screen that appears, enter  the Class Name and give the name of the method that is to be executed first.
  5. Now select the check box to Inherit GUI Attributes. Save and Check.
  6. Execute the T code .

Parameter Transaction


Introduction

Parameter Transactions are useful when you need to personalize Standard Transactions with some pre-defined values. It involves executing transactions with pre-defined values. It also provides the option of skipping the first screen ( or executing the first screen with your pre-defined values).

Eg. Purpose

We are going to create a transaction code ZMN which allows the user to maintain entries in the table ZMINE which has a table maintenance view. So when the user enters the transaction ZMN, he can directly see the table entries screen.

Steps

  1. Goto T code SE93.
  2. Enter  the Transaction Code  ZMN and give a valid description.                                                                    
  3. Choose Parameter Transaction Radio Button and Continue.
  4. Enter details in the subsequent screen as shown to the right and click Enter.
  5. Now in the bottom part you can see a section ‘Default Values’. In here, using F4 help , you can see teh fields(screen field names) available on that particular screen( SM30 in this case). Select screen field ‘VIEWNAME’ and ‘UPDATE’ now.
  6. In the right side ( Value ) add ‘ZMINE’ ( your view name which has a table maintenance view) against VIEWNAME and ‘X’ against UPDATE. [FYI:   Update is a button present in the SM30 screen which is clicked to maintain data. Setting that value to ‘X’ will give the effect of clicking the Maintain button on SM30 with viewname as ZMINE.                                                                                            
  7. Now Save and Check.And Execute. If there are no errors, you should be able to see your maintenance screen directly.

Output

When the user now clicks the transaction ZMN the screen he sees will be

Variant Transaction

   

Introduction

Transaction Variants can be very useful in making design level changes in Standard Transactions. They can also be sued to set default values on screens and to set screen field properties.They can then be assigned to Standard T code itself, So that these changes get reflected for all users accessing the T code , or we can set separate T code for the same.

Eg. Purpose

In this document , we will create a Transaction Variant for the T Code VA01, in which we will make a variant transaction(ZVA01) of VA01 in which the initial screen ( with order type etc) need not be filled as they will be defaulted and PO number made mandatory .

Steps

  1. Goto T Code SHD0.
  2. Enter  the Transaction Code for which you want to create a variant. In this case, enter  Tcode VA01 and give a name for your transaction variant. Say ZVA01.                                                                                              
  3. Now click the Create button. You will be taken to the Tcode VA01.
  4. Enter values in the initial screen as you would during normal processing and click enter. 
  5. Now a new screen will pop up showing all the fieldnames and properties that can be changed.                                                                         
  6. Give the values in the pop up as given above and click ENTER to go to the next screen.
  7. Similarly, you can set any properties you need in the screen and on clicking enter , the properties tab will pop up. You can makethe desired changes there. I will set PO number to required and the Document Currency to INR. I will also hide the tabstrip for Shipping details. So the values in the pop ups will be  
  8. Note that several pop ups will show.This is because a popup for each sub screen will be displayed.
  9. Now click Exit and Save button.
  10. All the values entered and shown will get displayed in a single screen. You can make any changes necessary and then save with a description.
  11. Save all and assign each to package.
  12. Now click back and you will be taken to the initial screen in SHD0. Save.
  13. Now take T Code se93 and give a new Tcode for executing the variant and click Create.
  14. In the radio button options that appear, select variant Transaction.
  15. Now go inside, and  give T Code as VA01 and variant s ZVA01 and select cross Client Check Box.
  16. Now select the check box to Inherit GUI Attributes. Save and Check.
  17. Now execute your transaction.

Output

You are now directed directly to the 2nd screen after skipping the initial screen with the values you have set by default through your variant. Further , if you try saving without the PO number, it will give a message asking you to fill the PO number.


Conclusion

So this is how the different types of transactions are created . Make sure you assign the correct type to the transaction or your program may not work correctly. Happy Coding :D.


Related Content

Transaction Variants

Varient Transaction

 

9 Comments