Monday, September 27, 2010

how to use comments in ABAP programming

Comments
Among your ABAP codes you can add comments by using two methods :
One is starting the line with an asterisk (*). The asterisk which is placed at the beginning of the line will indicate that all of the contens of the line are comment in content.
Second method is using double quotation mark (") in any place of a line. Double quotation mark will indicate that following content is comment.
You must start all your ABAP programs either with PROGRAM or REPORT statement.
REPORT should be used for ABAP reports programs whose output is a list.
PROGRAM can be used for all or for general ABAP programs.
All your ABAP programs should be assigned to a package. But you can define your ABAP programs as local or private objects instead of assigning them to a package.
Assigning to packages is requirement for SAPs Correction and Transport System.
While creating a ABAP program application, title and type attributes are must.
Below is a very simple ABAP report code which is showing variable declaration and value assigment to variables in the ABAP program.
Also you can see how variables are displayed in ABAP programming.

geteral term mostly used in ABAP programming

Common ABAP Programming Terms

First here is a short list of common ABAP programming terms
Program : Program is a series or batch of ABAP statements
Report : Report is an ABAP program whose output is a list
Module Pool : Module Pool is a dialog program which is a collection of screens
List : List is the output generated by an ABAP report program

How to Open ABAP Editor

You can open and display ABAP Editor in two ways :
one method is using transaction SE80
and other method is using the SAP menu.
Follow the Tools > ABAP Workbench > Development > ABAP Editor from the SAP menu.

simple ABAP program for beginners

*& Report Z_INTRODUCTIONTOABAP *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT Z_INTRODUCTIONTOABAP .
*PROGRAM Z_INTRODUCTIONTOABAP .
* PROGRAM can replace REPORT

* Declaring variables here
DATA AGE TYPE I. "Integer Variable
DATA FIRSTNAME(25). "String Variable

* Set value to variable
MOVE 26 TO AGE.
MOVE 'Eralper' TO FIRSTNAME.

* Display variable values
WRITE FIRSTNAME.
WRITE AGE.

* Multiple variables
DATA : AGE2 TYPE I, LASTNAME(25). "Multiple variable declaration
MOVE: 0 TO AGE2, 'Yılmaz' TO LASTNAME. "Multiple variable value setting
WRITE: LASTNAME, AGE2. "Display multiple variables

ABAP informations

HI friends this is my blog share your information regras abap....this site only for the Beginners...experts may help the follwers.
REGARDS
jeeva