Scrol

SAP Trainings contact sap.sreeram@gmail.com or 091-9916083157, 001-210-399-8414

ABAP FM, Variants, Messages


What are function modules ? Types of parameters ?
-     Function modules are general-purpose library routines that are available system-wide.

-     In general, function module can have four types of parameters:
-     EXPORTING: for passing data to the called function
-     IMPORTING: for receiving data returned from the function module
-     TABLES: for passing internal tables only, by reference (that is, by address)
-     CHANGING: for passing parameters to and from the function


How to send a report to the printer instead of displaying it on the screen ?
-     We can send a report to the printer instead of displaying it on the screen. To do this, use the keywords TO SAP-SPOOL:
SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.

How can we send data to external programs ?
-     Using SPA/GPA parameters (SAP memory)
-     Using EXPORT/IMPORT data (ABAP/4 memory)


What are the differences between SELECT-OPTIONS,VARIANTS AND PARAMETERS?
To enter values for variables on the selection screen, you must define the variables using the PARAMETERS statement.
To enter a range of values for the variables on the selection screen we use SELECT-OPTIONS statement.
If you want to run the same report program with the same selections at regular intervals (for example, for monthly sales statistics),  In, ABAP/4 offers you combine the desired values for all these selections in one selection set.  Such a selection set is called a VARIANTS.

 

What is SPA / GPA ? When do you use it?

To fill the input fields of a called transaction with data from the report, you can use the SPA/GPA technique.  SPA/GPA parameters are values that the system stores in the global, user-related SAP memory.  You use the SAP memory to transfer values between programs.  A user can access the values stored in the SAP memory during one terminal session for all modes used in parallel.
Usually, the input fields on the initial screen of a transaction are connected to SPA/GPA parameters.  If you fill these parameters from within your program before calling the transaction, the system fills the input fields with the corresponding values.


Why and how do you display a message? What are the message types?

An ABAP/4 module lets the system know that an error has occurred by issuing information,error or warning messages. you can also use success messages when a particular action is performed successfully. When the user presses ENTER, the current process is interrupted. The system returns the user to the SAP main menu using Abend message.
Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnn is the number of the message.
You have to declare the Id of the message class in the program using
MESSAGE-ID cc,where cc is the message class.

How and where do You create Message class?

You can create a message class from two places in the system:
1)      From an Object class object list (in the Object Browser)
2)   From an ABAP/4 module (in the ABAP/4 editor)