Technology: SAP ABAP Simplified Part-III

July 7, 2008 by Ameya Pimpalgaonkar 

- Swarna Munukoti

- L&T Infotech

Continuing with the series, here we present you the third article of the series. Previous two articles SAP ABAP SImplified Part-I and Part - II earned a tremendous response from GoAticles with more than 38 requests in just a few days.

 Report Programs:

 The basic knowledge required to write a report program is about the different data types present in ABAP. The various data types present are:

 

 

  Data Types

  Representation

Default Length   

Initial Values

  Character                            

             C

           1

Blank

  Numeric

             N

 

Zeroes(depends on defined length)

  Integer                                

             I

 

0

Floating-Point                    

             F

 

Zeroes(depends on system length)

Time                                   

             T

 

000000

Date    

             D

 

00000000

Hexadecimal                       

             X

 

00

Packed                                 

             P

 

0

 

The statements used to declare Variables and Constants are DATA and CONSTANTS respectively. While declaring variables and Constants we even can declare its length and its default value. Syntax for declaring Variables and Constants:

 

 DATA: variable TYPE C {LENGTH xx} {VALUE ‘yyyy’}.

 

Where xx represents the length of the variable And yyyy represents the value of the variable.

For declaring the variable even we can use the following syntax:

 

 DATA: variable (xx) TYPE C {VALUE ‘yyyy’}.

 

Syntax written in { } are optional.

Note: For declaring constants replace the statement ‘DATA’ with ‘CONSTANTS’.

Types of Programs:

A report program or type of programs can be an Executable Program or Module Pool Program or a simple Include.

 

Executable Programs: If a report program is defined as Executable Program, it can be executed with out the need of a transaction. The execution of a program is in a pre-defined order.

 

Module Pool program: Module pool type programs cannot be accessed directly using F8 instead it needs a transaction code to display the output. It makes use of screen painter and optionally a menu painter.

Screen painter is used to create screen components of a program and can be developed using the transaction code SE51 or through SE80.Menu painter is used to create graphical user interface which includes menu bars and tool bars. The transaction code used for doing this is SE41 or SE80.

 The logic for creating a module pool program can be done through SE38 or SE80 but the required screens could be developed using SE80 or SE51.

 The logic required for maintaining screens are written in the form of modules. The modules required are PBO (Process Before Output) and PAI (process After Input).

Process before output holds the logic required when the screen is displayed initially.

And all the logic required from the time a screen is displayed is written in Process After Output Module.

 

       The different Screen Elements that can be created using SE80 or SE51 are

  1. Text Element
  2. Input/output Field
  3. Radio Button
  4. Check Box
  5. Push Button
  6. Frames
  7. Table Control
  8. Custom control
  9. Tabstrip Control and
  10. Subscreen.

The name of the above elements suggests the appearance of each on the screen except the Table control, Custom control and the Tab strip control.

In the next article of the series we will discuss table control, Tabstrip control, Function modules and BAdi

 

Regards.


Your Ad Here

Comments

MadeITsimple - Everything on MBA, SAP Technology, Healthcare, Media, Philosophy, Travel

One Response to “Technology: SAP ABAP Simplified Part-III”

  1. subhadip on September 1st, 2008 7:50 pm

    It is a greatwork done by you, I am having problem in abap programming used in smartforms and recordings used in BDC , so if you can post me some explaination abt it with some screen shots then it would be great.

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





eXTReMe Tracker