Wednesday, April 20, 2011

The Features of ABAPTM New Editor - Part 2

Working with Colors and Fonts:

Switch to the new editor (if the default editor shown is the old editor).

In the New ABAP editor, click on the button “options” available at the bottom of the right hand side, as shown in the below screen shot:

Following pop-up appears:

Now select “Fonts and Colors” available on the left side.

Using this, you can design how the screen should look like, For example, you can dictate how the comments should appear (like Font, size, foreground color and background color). Let us take the same “comments” section for our scenario here.

Comments are currently displayed as shown below:

Now click on the options button and select “Fonts and Colors”. Select “Comments” from the list box:

Now change the way you would like the options to appear in this section:

Save and check how the way comments appear now.

Working with Code Templates:

To view the Code Templates currently available, Click on “Options” as shown earlier. Now click on “Code Templates” option available on the left side.

You would observe the code templates available for use with the editor. Click on any code template to understand further.

Above screenshot is for “DO”. We would use this for our demo purpose to better understand the code template.

Write some sample code in your editor.

Now select your program code and click the right button of the mouse. Select -> Format -> Surround by template -> Do () (as shown in the following screenshot)

Now observe your code:

Your code is now surrounded by the code template “DO”.

Creating custom code template:

Now we would work on creating our own code template for our future use.

As observed in the earlier screenshots, there is no code template available for subroutine. Let us create a code template for the same.

Select your code and click on right button. Select Format -> Extract template

Enter the name for your code template.

Click on OK.

Now we need to define the position where the selected text (surrounded text) to appear.

Click on the empty line between “form” and “endform” and click on “Insert tag”

Select Surrounded Text from the given options.

Save and exit.

To test our code template, write a sample code in our program.

Right click and select our code template.

Our code template is displayed as below:

Now just enter the form name to complete your subroutine definition.

Setting Break-points:

Open the new ABAP editor and write some sample code in it.

Activate your program.

To set the break-point, click on indicator margin, available on the left side of the line numbers. (See the screenshot below):

Break-point in set now.

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)


Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive