viernes, 13 de mayo de 2016

Debbuging Program and System Variables

Hi All,


Today I'm going to explain the difference between Program and System variables.

The program variables are all data declare in the top of the main program or in the include top of it.

The System variables are data internal declare in the system and it's structure is SYST.

An example of program variables, it shows you in the following image:

Example of Program Variables
In this case we have: Structures, Tables, Data.

In the system variables, we have the following structure:


here, the most importann are: Index, Tabix, subrc, and Langu.

SY-INDEX: Indicates in which row of the table we are.
SY-TABIX: Indicates how many line a table has.
SY-SUBRC; Indicates if the instruction like select, if, where, an other was successful.
Sy-LANGU: Indicates in which language the user is logged.

I hope, this information helps you.

Regards,
Rober.

PS: If you have any comments or any doubt about something of abap, debugging or you want a tip. Let me know it.




miércoles, 11 de mayo de 2016

ABAP Debugger Controls Session (Tabs Structure and Table)

Hi All,

Now, let's return for the debugger console. When I talk about Desktop Tabs you have to remember that we have variables in the executed program.

We have program variables, like Internal Tables, Structures, and Variables.


So the difference between structure and Internal table is how it's declare in the beginning of the program:

Example of Internal Table:

DATA: Begin of IT_TABLE occurs 0,
             .... Fields ....
            End of IT_TABLE.

This declaration is the most common and old programming method.


DATA: IT_TABLE Type Table of TY_TABLE.

This declaration is the present method to declare an internal table in a program.

So, the declaration of a Structure could be:

TABLE: MARA. " Example of a Structure of Transparent Table.

DATA:  WA_MARA LIKE MARA.

DATA:  WA_MARA TYPE MARA.

And others kind of declarations, but this are the most common.


In the Tab Structure or Tab Table, you can see the content of every row or every field of them.

In this case, I'm going to use a type table and a type line to show you the difference between Structure and table:

An Example of table is:

Example Table

And an example of Structure:


Example Structure


If you pay attention, the structure image, has every field and value of each one. And in the table has every row of a table.


Regards,
Rober






lunes, 9 de mayo de 2016

ABAP Debugger Controls Session (TAB I)

Hi All,

Today, I'm talk about Desktop 1, 2, 3, this Tabs are useful to look at some system or program variables.

In the following screen, you will see the Desktop 1 Tab.

Desktop 1
In the left side, you will see the current program executed, in the right side you will see a grid, whose shows you the content of the variables. To see the content of the variables you can write in the grid the name of the variable like sy-subrc.

The next one, is screen of Desktop 2 Tab.

Desktop 2
In the left side, like desktop 1 we have the current program executed, in the right side we have in which event, or function, or subroutine we are.  It's like, to following the structure of the main program.

The last One, Is screen of Desktop 3 Tab.




If you see, it's like Desktop 1 but the windows are Horizontal.


Regards,

Rober








viernes, 6 de mayo de 2016

The F Function Keys for Debugging

Hi All,

Today, I'm going to explain the F key that we use in the debugging mode.

Let's remember:

  1. F5 - Jump to the next Line.
  2. F6 - process a subrutine or function.
  3. F7 - Exit of the Current Function.
  4. F8 - Execute program.
When you start in the debugging mode it's because you are looking for something; Wrong value, wrong selection, wrong table or something like that.

Let's see an example:

Example: Before push F5 function key
Then, we push the F5 Key:

Example: After push F5 function key.
If you see, the yellow arrow change form line 14 to 26. Because, only the keyword of abap language is executed, in this case the Word Clear, that is useful to clean the content of a variable.

If you need to jump to the next execute line, you have to push F5, to jump to line 28, where the ask variable P_MAIL is assigned to variable W_STRING.



Now, the next line is an abap oo method, so to executed but don't enter to the method, we have to press F6 Key.


 Next, you will see that you go to he next intruction:



For F7 and F8 keys, is to finish one process, like to enter a subrutine, function or method and exit.


Regards,

Rober

miércoles, 4 de mayo de 2016

ABAP Debugger Controls Session

Hi,

Today, I'm going to introduce to Debugger Session. it is useful when we to know What, How and Which some variables (Development or System variables) are filled or use it in the current program that we are executed.












In the image you can see, a number which I'll identify as follow:

1.- Name of program(Main Program): In this case ZTEST_JRMR3

2.- Program Event Type(Event of currently program): START-OF-SELECTION.

3.- Name Of Program(Main or Include ): In this case ZTEST_JRMR3.

4.- Currently event: Start-Of-Selection.

5.- Currently Line of the Program / Include.

6.- System Variable who indicates if the instruction was successfully or not.(In other blog entry I'm going to explain some of them).

7.- System Variable who indicates the number of a rows.

The the next that I'm going to explain the tabs, The ABAP Debugger has eleven tabs.

One thing that forget to explain in the last entry, It's that if you don't do anything in the Debugging control. It has a time out, So it will reset, and you will see the following message:


Thanks all,

Rober.



lunes, 2 de mayo de 2016

The /h key code

Hi All,

Today, I'm introduced the /h key code. So, do you know about this /h key code? If the answer is yes, It's better know to enter in debugging mode.

The debugging mode is useful to see, watch, look around of the variables in the current mode.

Insert how to enter /h image


1.- enter /h in sap



Now, we activated the debugging mode in sap. So, what its next????


The ecc system is a environment of event, what does it mean? This means that you have to do something (push a key) to enter inside of the system:




You can see, name of events, name of includes, program's, system variables and others things.. But, here only, I show you how the tool works. If you need something more in details you can search in google.

The next entry, I'm going to explain the Minimum basic and essential of Abap Debugger Control.

Regards,
Rober









jueves, 28 de abril de 2016

Abap for SAP functionals

Hi, in this case lets introduce to some terms of Abap concepts for functional consultants. We know, functional consultants doesn't have the technical knowledge of how SAP ECC works. In this case, we will introduce in every single word or tipical word about Abap and how can those people can help us in the dairy live resolving issues and bugs in the ECC organization .

First of all, as we know we have our lovely SE38 transaction. But, you have to know this transaction is for an amazing people like Abaper programmers or consultant The Kings of sap, the lords of the  System, the Jedi of the jedis... What ever the people whose know about everything in single words... Hahahaha

So, for functional consultant they only need to execute programs, only has to have access to SA38 and with the name of a execute program they could running and test it.

If they need see code like matrix and don't understand the code they could enter to SE38. But, we know they didn't do it.

To finish this first paragraph, I mention a simple words execute program... In sap we have differents programs just like: execute programs, modull pool, includes, and others.

Let's see I introduce some of tools that functional consultants had to know for cultural knowledge.

I hope you like it... 

See ya.

Rober