Tuesday, July 28, 2020

Events in Classical reports

There are some events in classical report.

1. Load-of-program
2. Initialization
3. At Selection-screen Outpu
4. At Selection-screen on field
5. At Selection-screen value request
6. At Selection-screen help request
7. At Selection-screen
8. Start-of-selection
9. End-of-selection
10.Top-of-page
11. End-of-page

Explanation

1. Load-of-program : It is the very first event that execute in the beginning.
2. Initialization : It initialize the predefine values.
3. At Selection-screen output : It use to modify the dynamic screen.
4. At Selection-screen on field : It use to validate the specific field.
5. At Selection-screen value request : It is for F4 help.
6. At Selection-screen help request : It is for F1 help.
7. At Selection-screen : It is use to validate number of fields.
8. Start-of-selection : It use to get data from the database.
9. End-of-selection : It use to write data from the database and display output.
10. Top-of-page : It is for the header.
11. End-of-page : It is for the footer.

Note : These above events are for classical report , there are some more events along with above in Interactive reports.  

Friday, April 10, 2020

Difference among Insert, Update, Modify, Delete in ABAP

This is very basic things that a person should know about these. As an Abaper you need to know the difference among all.

INSERT : Insert is use to save or create a new record into database table, There is a key field if one will use a same key for two record it will show you run time error and system variable (SY-SUBRC = 4).
       Syntax
       Insert into dbtab values wa.

DELETE : Delete is use to remove a inserted record from the database table. Where we need to specify the key field that tells to the compiler which records we want to be deleted. If one is reentered the key field it will give you a run time error and system variable's SY-SUBRC = 4.

       Syntax
       Delete from dbtab where key_field = enetred_key.

UPDATE : Update is use to change the existing record , we can change some fields of existing record but not able to change the key field.

       Syntax
       Update dbtab from wa.

MODIFY : Modify is use to change the existing record but in some case the record is not available for that entered key so it will create a new record.
       We can say that is is the combination of update and insert keywords.

      Syntax
     Modify dbtab from wa.














Hope your all doubt have cleared. 

Sunday, April 5, 2020

Events in ABAP

There are events that are available for OOABAP it is for object oriented approach.

EVENTS : Basically events is use to raise the method of the same or another class. By the using of events we can raise the methods.
Only those method can only be raise which are already declared as event handler method. We can set n number of event handler method for a specific event.

Lets assume that there is an event EV1 and there are three methods M1, M2, M3 in these methods M2 and M3 are events handler method and M1 method RAISE EVENT EV1. afterwards method M2 and M3 will trigger.

After declaring M2 and M3 as event handler method we need to create a program in transaction SE38 here we need to create a object of that class where these all methods are available and we also need to set M2 and M3 method as a SET HANDLER method.

SET HANDLER OBJ->M2 FOR OBJ.
SET HANDLER OBJ->M3 FOR OBJ.

CALL METHOD OBJ->M1.

After doing this our all event handler method will going to trigger.
Thanks..Share this


Events in Classical reports

There are some events in classical report. 1. Load-of-program 2. Initialization 3. At Selection-screen Outpu 4. At Selection-screen on field...