You are on page 1of 28

DEBUGGING :

Debugging is used to analyse any issue in particular program.


If you want to know what exactly happening at one point then you need to use break point.
If you click again on that, Break point will be removed.

You cannot place beak point for Declaration statements,


You can only place break points for executable statements.
Suppose put breakpoint and click on execute and again execute the debugger will take you to
debugging point.
From se38, after giving inputs in the command prompt if you gave /h and then enter it will take you
that particular point

The above is the function module.


F5 : Line by line debugging.
If you want to know what’s happening in each lime in function modules or perform then you can use
F5.
F6 : Overview Debugging
If you click on F6 , it will not enter into the function module, it will execute entirely from a single
shot.
F7 : Returning the Cursor , If you want to come out from any function module. Suppose if you want
to come out from 10 lakhs of code then you can click on F7.
F8 : Execute, if we click on F8, It will directly execute the program.

Among all these we will use F6 more Frequenly.

SY-SUBRC is system variable


Sy-subrc = 0 is true condition, whenever a statement executed successfully, it will be 0 .
If you click shift+f12 the cursor will come back to the place that u put cursor

WATCH POINT :
if you want to know what is happening exactly at some point then we can put watch point.
Suppose if 10 lakhs entries are there in internal table, at 4533 customer code , you need to
analyse some thing then you can put break point.
Just click on Watch point , here we need to give at which variable we need to create watch
point.

Click ok and then f8, ABAP debugger will take you to that particular line.

SE11 : INORDER TO DISPLAY TABLE.


SY-TABIX : will tell you the loop count.
VBAK : Sales order related data.
If you need a grand total of one particular field then add DOSUM field in it.
Report creation : ALV REPORT, Since it is ALV, we have to use it_fcat and w_fcat.
SMART FORMS
Smart forms are updated version for scripts.
Adv :
Scripts that are written in 800 client can be used in 800 client itself.
Smart forms we can use outside the client also.

For every smart form one function module will be generated . if you call the function module
automatically the smart form will be called.
If you want to call a smart form inside a report, Then click on patterns and give function
module there, in smartforms tcode under environment function module will be there.
Declaration of variables/fields will happen in Form Interface.
Drag and drop the fieds Into work area.

Input fields you can put in form interface and output fields you can put in global definitions.

If you want to print fields, then create text and then select field list on or off and drag and
drop
If you want to insert field manually instead of drag and drop, click on insert field and give
field name there in between ampersand&.

1.ricef :
11th feb.
different types of smart forms.
Value table and check table.
REPORTS :
Do not use special characters while giving the name of the program.
Z_basic_report is the ex for report name.
For executable program, we don’t need any separate t-code to run the program.
If you want to make whole line as a comment then use * at the starting of the line.
If you want to use a comment in the middle of the line use “ ”.
To activate you can use ctrl+F3.
SE11 : Abap Dictionery.
Interactive repot :
Here we are interacting with the report, By double clicking on one field like kunnr , it
will take you to another screen and link here between two tables is KUNNR.

Messages :
Status message : if you want to show the status , processed successfully or not.
Information message : some pop up once we click okay then we can do further process
Error Message : just error, it will freeze further operation.
Warning message : just warning , it will not stop you.
Short dump message(X): the process should be terminated there in a kind of error log will ve
captured and it will be stored in a tcode called st22.

FUNCTION MODULE :
Normal function module : It will be used in the same system .It can be used in
development, Quality and Production.
Remote Enabled Module :
We can call a function module from one system to another system.it can be called
from different system . either from sap or non sap. If you want to call from different system,
you need to do some porting kind of things.
Update Module.
LUW : Logical Unit Of work.

It has two imp updates:


V1 : Imp updates, Which should happen immediately, the moment you saved (Start
immediately.)
V2 : -

Immediate start , No restart : it will just push the updates and not bothered about really got
updated or not.
Start Delayed : it falls under v2 category.it will wait for some time and go and update, non
urgent Request.
Collective run : it means , it will go and collect many requests and then it will wait and then
find you to run something like background.

If we write : SAPL in function group, the it will be a program, we can open it in se38 or
se80.
This is how we call our function module :
Click on pattern and then give function module name there.

System related variables like system date and system time will be there in SYST structure.
This will be load automatically at run time.
If you want to print successful message in output(down status bar).

For information message :

If you want to make any field as mandatory, use OBLIGATORY keyword.


TCode : SE91 is for messages.
CONVERSION :
It will go and read the data laying in notepad or excel sheet which will actually be
generated by some non SAP system or legacy system .

Events in ABAP
Event is a kind of processing block .Which will be triggered in different moments
while my code is running,it could be a program or a repot. There would be a some kind of
processing block that could be running in background.
These Events are related to normal reporting:

These events are related to screen programming.


PBO : Process before output. Suppose we are calling se11, in the back ground it will do lot of
things, so whatever it does ,it will be a part of PBO.
PAI : Process after input. When you give table name in se11 and click on execute, then PAI
event will be called. the process after click on display, it will process some code
POH : Process on Help Request. When you click f1,POH event will be triggered
POV : Process on Value request. when you click on f4,we are requesting value, event pov
will be triggered.
But all these events come into picture ,when I am going to design screen.
Selection screen will start at below field.
AT SELECTION SCREEN event will trigger once I do any interaction with the screen.

.
When we enter some value in output screen, it will give you a pop up with message hi. Here
We interacted with the screen by entering the value so this event triggered.

The above one is subroutine.

How we will use events related to normal report programming.


Once you put the below statement then only it will give you footer in the o/p.
Because there are around 300 lines but we are fetching only 8 lines of data.

In order to come our headings of the field in particular position, You have to give position.

If you want to add colour in o/p.

The above is all about classical reporting.

INTERACTIVE REPORT :
AT LINE SELECTION: This event will capture the value at which we are going to
double click on it.
The event that s used for interactive reports is AT LINE SELECTION.
PROCESS BEFORE OUTPUT : Before we received output screen, There was a lot of
process happened in the background. So this AT SELECTION SCREEN OUTPUT event
will take care of that processing.
If suppose we want to make some check box Is enabled. Then we need to write like

the above code gives me that, So when I select check box, it will not allow me to enter any
input in the field p_matnr.

When you give some command on the output screen, then this screen will be reloaded.

If you need a value request on customizable field in output screen then you need to call a
function module.
ABAP LIST VIEWER(ALV) :
There ia one dictionary object known as Type-Group which contains predefined type groups ,
constants and Icons.
You cannot directly access that type-group in your program. For that you nee do write type-
pools statement.
SLIS is the predifined type-group which contains predefined data types for Building ALV
report. So when you doing ALV , you need write this statement.

So whenever If there is occurs 1 it indicates that it is a internal table.

We have to set properties of field catalog in the work area.


The benefit of doing this is we can translate our text to many languages.
In perform field catalog, we have written code for the alv properties of the field.

In order to call the same program we have to use system variable sy-repid.
INTERFACES
Interface is a pure abstract class.
RFC
BAPI AND BDC :
Difference between bapi and bdc is, suppose if screen has 3 fields but if we want to add 4
fields then BDC cannot handle but BAPI can.

ENHACEMENTS :
Adding your own functionality to sap standard business applications without modifying the
original applications.
ENHANCMENT FRME WORK :
USER Exits : old concept
BADI (Business addins): Latest concept

User exit is a concept which is basically having restricted options , when we create user exit
and when we assign it to a project , we cannot use the same user for another project. So we
have to do coding individually for every enhancement that we do.

BADI is very flexible and it makes us of object added programming so its very mandatory for
us to get a good knowledge of oops concept before to work on badi concept.

All the latest screens having badi concepts.


SMART FORMS :
Smart form is upgradation of scripts.

You might also like