First ABAP Program
Let us write a “Hello SAP ABAP” program.Navigate to ABAP editor under Tools node in SAP easy access.
![First-ABAP-Program-1 First-ABAP-Program-1](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram1_thumb.png)
Double click on “ABAP Editor” to open the editor. ABAP editor can also be opened by entering t-code SE38 in the command field.
![First-ABAP-Program-2 First-ABAP-Program-2](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram2_thumb.png)
This is the ABAP editor’s initial screen. Enter the name of the program you want to create and press create. All the customer programs must begin with “Y” or “Z”.
![First-ABAP-Program-3 First-ABAP-Program-3](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram3_thumb.png)
In the next popup screen(Program attributes) enter the title for your program, select Executable program as type and press save.
![First-ABAP-Program-4 First-ABAP-Program-4](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram4_thumb.png)
Press Local Object to store the program in the temporary folder.
![First-ABAP-Program-5 First-ABAP-Program-5](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram5_thumb.png)
This is the screen where you can write the ABAP code.
![First-ABAP-Program-6 First-ABAP-Program-6](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram6_thumb.png)
Write the code. Press save, then syntax check( Ctrl + F2 ).
![First-ABAP-Program-7 First-ABAP-Program-7](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram7_thumb.png)
If there are any syntax errors, it ill be displayed at the bottom of the screen as shown above. Correct the errors and again check the syntax.
![First-ABAP-Program-8 First-ABAP-Program-8](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram8_thumb.png)
Successful syntax check message will be displayed in the status bar. Then activate( Ctrl + F3 ) the program.
![First-ABAP-Program-9 First-ABAP-Program-9](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram9_thumb.png)
In the following screen select your program and press continue. Then run(F8) the program.
![First-ABAP-Program-10 First-ABAP-Program-10](http://saphub.com/wp-content/uploads/2011/01/FirstABAPProgram10_thumb.png)
The output will be displayed as shown above.
No comments:
Post a Comment