_ABAP/4 SAMPLES
_Company Code
Steadiness sheets and revenue & loss statements, required by legislation, may be created on the firm code level.A company code designation can be required on every financially primarily based transaction entered into R/3.It will doubtless be enter at entry time or the system will derive the data from system configuration.Firm code makes use of a 4 digit alphanumeric field. A company code is an independent accounting entity (the smallest organizational ingredient for which a whole self-contained set of accounts can be drawn up). An instance is an organization inside a corporate group. It has a singular, 4 character key.The general ledger is stored on the company code level and is used to create the legally required stability sheets and revenue and loss statements.An organization code designation is required for each financially based transaction entered into R/3.This is achieved both manually or automacitally by deriving the corporate code from other information elements.
Organizational Units
With EC-CS, you can perform legal and administration consolidations. The basis for this are the organizational models firm, enterprise space, and revenue center. For every consolidation sort, a view is created.The group construction with a view might be represented in numerous hierarchies. IDES makes use of a hierarchy for authorized representation and one for regional representation.EC-CS varieties the corporate structure using consolidation groups and units. Per hierarchy,consolidation teams are defined. They represent the degrees at which the consolidation is completed.Consolidation teams may be: Subgroups (company consolidation), enterprise areas (business space consolidation), profit centers, and hierarchy nodes (revenue heart consolidation).The objects to be consolidated that lie under consolidation groups are consolidation units.Depending on the consolidation type, these are firms, combinations of corporations and enterprise areas, or combinations of firms and revenue centers.
Business Areas
You may arrange several enterprise areas to which the system can assign postings made in any company code outlined within a client.Business areas could also be used to facilitate external phase reporting across firm codes, covering the corporate's main areas of operation (product strains, subsidiaries) the place legally required.If no external business segment reporting is legally required, the enterprise area is totally non-obligatory and flexible throughout the constraints of the enterprise space definition.Business area is a 4 digit alphanumeric field.
Controlling Area
Controlling area is the structure used to capture revenues and prices for inside administration reporting.The use of a number of firm codes within one controlling space allows for the extra performance of performing cross company allocations.Firm codes inside the similar controlling area should use the identical operating chart of accounts and fiscal year.Controlling space is a four digit alphanumeric field.
Company code is the smallest organizational unit the place an entire balanced set of books is produced.Group firm is the legal unit for consolidated reporting. One or more firm codes might be mapped to a group company.Business areas provide steadiness sheet reporting for business segments. They'll cross company codes.Controlling areas capture costs and revenues for internal managerial reporting.Working concerns present the structure to research market efficiency on the premise of user defined criteria.
Multiple Assignment
By assigning a number of company codes to a controlling space, you'll give you the chance to perform cross-company-code value accounting. You can make allocations in CO that discuss with more than one company code.In cross-company-code accounting, you assign a currency, a chart of accounts, and a fiscal year variant to the controlling area.In cross-firm-code value accounting, the controlling space and firm codes could have different currencies. You may define the controlling area foreign money to be the same as one of the company code currencies, or it might be completely different from the forex of any company code assigned to it. Chances are you'll make essentially the most of three currencies in CO:
Transaction Foreign money
The transaction foreign money is the foreign money in which a document is posted to CO. Multiple firm codes from totally different nations can still be linked to a single controlling space, even when a number of the corporations are required to produce nation-specific external reports. All firms within the controlling space have to make use of the identical operating accounts, but these accounts may be linked to country-particular accounts via the alternative account quantity subject on the account grasp record.The fiscal yr variants assigned to the controlling space and assigned firm codes can differ only within the number of particular periods.
Distributed Channels
The structure in sales and distribution is represented within the system with the assistance of Gross sales Organizations.
Organizational Units
The Controlling Space is the basic organizational unit in Controlling. A controlling space represents a closed system for price accounting purposes. Price allocations can solely be carried out inside a controlling area. They cannot contain objects in several controlling areas. Several firm codes could additionally be assigned to one controlling space, which gives the power to perform cross company-code controlling.The controlling space and its assigned firm codes should always use the same working chart of accounts and must have the same fiscal 12 months (only the number of particular durations could be different).The plant represents a production facility. It is an important organizational unit within the SAP R/3 Supplies Management and Production Planning application components. Plants are assigned to firm codes when organizational buildings are defined.The buying organization is accountable for the entire processing of buying actions (akin to requests for quotations and buy orders).A buying organization will be assigned to at the least one firm code, a number of company codes, or can exist without being assigned to an organization code (since each plant must be assigned to an organization code, the latter might be decided through the plant at the time of each procurement transaction to offer the tie for legal reporting).The buying group maintains info related to distributors and pricing to assist the best and value effective acquisition of goods in SAP Financial Company Organization.
Steadiness sheets and revenue & loss statements, required by legislation, may be created on the firm code level.A company code designation can be required on every financially primarily based transaction entered into R/3.It will doubtless be enter at entry time or the system will derive the data from system configuration.Firm code makes use of a 4 digit alphanumeric field. A company code is an independent accounting entity (the smallest organizational ingredient for which a whole self-contained set of accounts can be drawn up). An instance is an organization inside a corporate group. It has a singular, 4 character key.The general ledger is stored on the company code level and is used to create the legally required stability sheets and revenue and loss statements.An organization code designation is required for each financially based transaction entered into R/3.This is achieved both manually or automacitally by deriving the corporate code from other information elements.
Organizational Units
With EC-CS, you can perform legal and administration consolidations. The basis for this are the organizational models firm, enterprise space, and revenue center. For every consolidation sort, a view is created.The group construction with a view might be represented in numerous hierarchies. IDES makes use of a hierarchy for authorized representation and one for regional representation.EC-CS varieties the corporate structure using consolidation groups and units. Per hierarchy,consolidation teams are defined. They represent the degrees at which the consolidation is completed.Consolidation teams may be: Subgroups (company consolidation), enterprise areas (business space consolidation), profit centers, and hierarchy nodes (revenue heart consolidation).The objects to be consolidated that lie under consolidation groups are consolidation units.Depending on the consolidation type, these are firms, combinations of corporations and enterprise areas, or combinations of firms and revenue centers.
Business Areas
You may arrange several enterprise areas to which the system can assign postings made in any company code outlined within a client.Business areas could also be used to facilitate external phase reporting across firm codes, covering the corporate's main areas of operation (product strains, subsidiaries) the place legally required.If no external business segment reporting is legally required, the enterprise area is totally non-obligatory and flexible throughout the constraints of the enterprise space definition.Business area is a 4 digit alphanumeric field.
Controlling Area
Controlling area is the structure used to capture revenues and prices for inside administration reporting.The use of a number of firm codes within one controlling space allows for the extra performance of performing cross company allocations.Firm codes inside the similar controlling area should use the identical operating chart of accounts and fiscal year.Controlling space is a four digit alphanumeric field.
Company code is the smallest organizational unit the place an entire balanced set of books is produced.Group firm is the legal unit for consolidated reporting. One or more firm codes might be mapped to a group company.Business areas provide steadiness sheet reporting for business segments. They'll cross company codes.Controlling areas capture costs and revenues for internal managerial reporting.Working concerns present the structure to research market efficiency on the premise of user defined criteria.
Multiple Assignment
By assigning a number of company codes to a controlling space, you'll give you the chance to perform cross-company-code value accounting. You can make allocations in CO that discuss with more than one company code.In cross-company-code accounting, you assign a currency, a chart of accounts, and a fiscal year variant to the controlling area.In cross-firm-code value accounting, the controlling space and firm codes could have different currencies. You may define the controlling area foreign money to be the same as one of the company code currencies, or it might be completely different from the forex of any company code assigned to it. Chances are you'll make essentially the most of three currencies in CO:
- Controlling area foreign money
- Company code foreign money OR object forex
Transaction Foreign money
The transaction foreign money is the foreign money in which a document is posted to CO. Multiple firm codes from totally different nations can still be linked to a single controlling space, even when a number of the corporations are required to produce nation-specific external reports. All firms within the controlling space have to make use of the identical operating accounts, but these accounts may be linked to country-particular accounts via the alternative account quantity subject on the account grasp record.The fiscal yr variants assigned to the controlling space and assigned firm codes can differ only within the number of particular periods.
Distributed Channels
The structure in sales and distribution is represented within the system with the assistance of Gross sales Organizations.
Organizational Units
The Controlling Space is the basic organizational unit in Controlling. A controlling space represents a closed system for price accounting purposes. Price allocations can solely be carried out inside a controlling area. They cannot contain objects in several controlling areas. Several firm codes could additionally be assigned to one controlling space, which gives the power to perform cross company-code controlling.The controlling space and its assigned firm codes should always use the same working chart of accounts and must have the same fiscal 12 months (only the number of particular durations could be different).The plant represents a production facility. It is an important organizational unit within the SAP R/3 Supplies Management and Production Planning application components. Plants are assigned to firm codes when organizational buildings are defined.The buying organization is accountable for the entire processing of buying actions (akin to requests for quotations and buy orders).A buying organization will be assigned to at the least one firm code, a number of company codes, or can exist without being assigned to an organization code (since each plant must be assigned to an organization code, the latter might be decided through the plant at the time of each procurement transaction to offer the tie for legal reporting).The buying group maintains info related to distributors and pricing to assist the best and value effective acquisition of goods in SAP Financial Company Organization.
_Will ABAP be Obsolete? Will JAVA Replace ABAP?
_
You should have heard this rumours more than once.The story goes like this:
Well the sad news is that SAP is integrating ABAP with JAVA. So in near future ABAP will be obsolete and JAVA will be in. Then the field will be so much populated by java programmers that it will be going to be the
end to ABAPers as JAVApers programmers will be having more value because of their Java experience.
So I think now we should start making move to Jave, at least to fight in the market even if we can't dominate it.
or
Heard some rumours here and there that the eventual plan for SAP is to phrase out ABAP programming? In another word, in a few years time, ABAPers will be redundant. How true is that?? Care to comment ??
or
I have just started my journey into ABAP programming, but I am being discouraged by some people who say, that ABAP is gonna be transitioned out and will be replaced by something else. Just wanted to know how true this is and if I should continue on the track I have taken, cause I dont wanna regret my decision later.
Some response to the above worries :-
This rumours have been around for a couple of years. In the past many programming languages have also become obsolute.
Why waste time worrying about this? I think abapers should spend more times to learn other sap modules to enhance their value.
ABAP can't die because its the easiest development tool . It can be easily seen that if you see development cost ABAP development can be completed in less time as compared to Java. And SAP is not stopping ABAP but just given an option to develop in java. However it will be good for ABAP Developers to learn java.
ABAP is not a replacement for any thing and at the same time no other language is a replacement for ABAP. FYI, ABAP is no more an ABAP/4. It is widely extended with the introduction of Web Application Server starting from release WAS 620.
In Object Oriented Paradigm ABAP is the only langauge that goes very near to all the properties of OOP concepts even comparted to JAVA and C++ starting from release WAS 630. You can developed and extend web applications using ABAP. It is much much more than what we see from R/2 and R/3 3.X releases...
There is nothing to worry about it. Yes SAP is introducing J2EE platform as an alternate to make an implementation faster as in the market there are many JAVA developers compared to ABAP resources.
More than this, ABAP is the SAP proprietary language. Except R/3 kernel, every application/transaction including BASIS is written in ABAP. I don't think SAP is that foolish to replace ABAP with some thing else. Look at the development news in SAP AG official web site for more info. One might need to know Java and JSP for developing mySAP portals but starting from SAP NetWeaver (which is planned to be released officially by the next quarter this year) you can developed
heterogeneous portals using ABAP itself...
Hope the above clarifies how ABAP is moving a head in the programming era.
You should have heard this rumours more than once.The story goes like this:
Well the sad news is that SAP is integrating ABAP with JAVA. So in near future ABAP will be obsolete and JAVA will be in. Then the field will be so much populated by java programmers that it will be going to be the
end to ABAPers as JAVApers programmers will be having more value because of their Java experience.
So I think now we should start making move to Jave, at least to fight in the market even if we can't dominate it.
or
Heard some rumours here and there that the eventual plan for SAP is to phrase out ABAP programming? In another word, in a few years time, ABAPers will be redundant. How true is that?? Care to comment ??
or
I have just started my journey into ABAP programming, but I am being discouraged by some people who say, that ABAP is gonna be transitioned out and will be replaced by something else. Just wanted to know how true this is and if I should continue on the track I have taken, cause I dont wanna regret my decision later.
Some response to the above worries :-
This rumours have been around for a couple of years. In the past many programming languages have also become obsolute.
Why waste time worrying about this? I think abapers should spend more times to learn other sap modules to enhance their value.
ABAP can't die because its the easiest development tool . It can be easily seen that if you see development cost ABAP development can be completed in less time as compared to Java. And SAP is not stopping ABAP but just given an option to develop in java. However it will be good for ABAP Developers to learn java.
ABAP is not a replacement for any thing and at the same time no other language is a replacement for ABAP. FYI, ABAP is no more an ABAP/4. It is widely extended with the introduction of Web Application Server starting from release WAS 620.
In Object Oriented Paradigm ABAP is the only langauge that goes very near to all the properties of OOP concepts even comparted to JAVA and C++ starting from release WAS 630. You can developed and extend web applications using ABAP. It is much much more than what we see from R/2 and R/3 3.X releases...
There is nothing to worry about it. Yes SAP is introducing J2EE platform as an alternate to make an implementation faster as in the market there are many JAVA developers compared to ABAP resources.
More than this, ABAP is the SAP proprietary language. Except R/3 kernel, every application/transaction including BASIS is written in ABAP. I don't think SAP is that foolish to replace ABAP with some thing else. Look at the development news in SAP AG official web site for more info. One might need to know Java and JSP for developing mySAP portals but starting from SAP NetWeaver (which is planned to be released officially by the next quarter this year) you can developed
heterogeneous portals using ABAP itself...
Hope the above clarifies how ABAP is moving a head in the programming era.
_
_ABAP INTERVIEW QUESTIONS AND ANSWERS
- What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.
- What are domains and data element?- Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.
- What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.
- Describe data classes.- Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself.
- What are indexes?- Indexes are described as a copy of a
database table reduced to specific fields. This data exists in sorted
form. This sorting form ease fast access to the field of the tables. In
order that other fields are also read, a pointer to the associated
record of the actual table are included in the index.
- Difference between transparent tables and pooled tables.-
Transparent tables: Transparent tables in the dictionary has a
one-to-one relation with the table in database. Its structure
corresponds to single database field. Table in the database has the same
name as in the dictionary.
- What is an ABAP/4 Query?- ABAP/4 Query is a powerful tool to
generate simple reports without any coding. ABAP/4 Query can generate
the following 3 simple reports: Basic List: It is the simple reports.
- What is BDC programming?- Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.
- What are the functional modules used in sequence in BDC?- These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.
- What are internal tables?- Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
- What is ITS? What are the merits of ITS?- ITS is a Internet
Transaction Server. ITS forms an interface between HTTP server and R/3
system, which converts screen provided data by the R/3 system into HTML
documents and vice-versa.
- What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
- What are screen painter and menu painter?- Screen painter:
Screen painter is a tool to design and maintain screen and its elements.
It allows user to create GUI screens for the transactions. Attributes,
layout, filed attributes and flow logic are the elements of Screen
painter. Menu painter:
- What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
- What is ALV programming in ABAP? When is this grid used in ABAP?-
ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST
VIEWER) function modules which can be put into use to embellish the
output of a report. This set of ALV functions is used to enhance the
readability and functionality of any report output.
- What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
- What is CTS and what do you know about it?- The Change and
Transport System (CTS) is a tool that helps you to organize development
projects in the ABAP Workbench and in Customizing, and then transport
the changes between the SAP Systems and clients in your system
landscape. databases?
- What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
- How to upload data using CATT ?- These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
- What is Smart Forms?- Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.
- How can I make a differentiation between dependent and independent data?- Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific, some entries in customizing are client independent.
- What is the difference between macro and subroutine?- Macros
can only be used in the program the are defined in and only after the
definition are expanded at compilation / generation. Subroutines (FORM)
can be called from both the program the are defined in and other
programs . A MACRO is more or less an abbreviation for some lines of
code that are used more than once or twice.
_Predefined ABAP Types
_Data types D, F, I, and T describe the
technical attributes of a data object fully. Data types C, N, P, and X
are generic. When you use a generic type to define a local data type in
a program or a data objet, you must specify the field length and, in
the case of type P, the number of decimal places. When you user generic
types to specify the types of interface parameters of field symbols,
you do not have to specify the technical attributes.
The initial value (and initial field length in the case of the generic types), are values that are used implicitly in short forms of the TYPES and DATA statements.
The fixed-length predefined types are divided into:
Numeric Types
As well as the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
You can use type I data for counters, numbers of items, indexes, time periods, and so on.
You can use type P data for such values as distances, weights, amounts of money, and so on.
You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
Character types
Of the five non-numeric types, the four types C, D, N, and T are character types. Fields with these types are known as character fields. Each position in one of these fields takes up enough space for the code of one character. Currently, ABAP only works with single-byte codes such as ASCII and EBCDI. However, an adaptation to UNICODE is in preparation. Under UNICODE, each character occupies two or four bytes.
Hexadecimal Type
The remaining non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits.
Predefined Elementary ABAP Types with Variable Length
These predefined elementary data types are used to specify the types of individual fields whose lengths are not fixed until runtime. There are two predefined ABAP data types with variable length that are generically known as strings:
When you create a string as a data object, only a string header is created statically. This contains administrative information. The actual data objects are created and modified dynamically at runtime by operational statements.
The initial value of a string is the empty string with length 0. A structure that contains a string is handled like a deep structure. This means that there are no conversion rules for structures that contain strings.
Predefined Complex Data Types
ABAP contains no predefined complex data types that you can use to define local data types or data objects in a program. All complex data types are based on elementary ABAP types, and are constructed in ABAP programs or in the ABAP Dictionary.
The initial value (and initial field length in the case of the generic types), are values that are used implicitly in short forms of the TYPES and DATA statements.
The fixed-length predefined types are divided into:
Numeric Types
As well as the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
- integers - type I
You can use type I data for counters, numbers of items, indexes, time periods, and so on.
- Packed numbers - type P
You can use type P data for such values as distances, weights, amounts of money, and so on.
- Floating point numbers - type F
You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
Character types
Of the five non-numeric types, the four types C, D, N, and T are character types. Fields with these types are known as character fields. Each position in one of these fields takes up enough space for the code of one character. Currently, ABAP only works with single-byte codes such as ASCII and EBCDI. However, an adaptation to UNICODE is in preparation. Under UNICODE, each character occupies two or four bytes.
Hexadecimal Type
The remaining non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits.
Predefined Elementary ABAP Types with Variable Length
These predefined elementary data types are used to specify the types of individual fields whose lengths are not fixed until runtime. There are two predefined ABAP data types with variable length that are generically known as strings:
- STRING for character strings
- XSTRING for byte strings
When you create a string as a data object, only a string header is created statically. This contains administrative information. The actual data objects are created and modified dynamically at runtime by operational statements.
The initial value of a string is the empty string with length 0. A structure that contains a string is handled like a deep structure. This means that there are no conversion rules for structures that contain strings.
Predefined Complex Data Types
ABAP contains no predefined complex data types that you can use to define local data types or data objects in a program. All complex data types are based on elementary ABAP types, and are constructed in ABAP programs or in the ABAP Dictionary.
DATA TYPES
_
Data types can be divided into elementary, reference, and complex types.
Elementary Types
Elementary types are the smallest indivisible unit of types. They can be grouped as those with fixed length and those with variable length.
Fixed-Length Elementary Types
There are eight predefined types in ABAP with fixed length:
Variable-Length Elementary Types
There are two predefined types in ABAP with variable length:
Reference types describe data objects that contain references (pointers) to other objects (data objects and objects in ABAP Objects). There is a hierarchy of reference types that describes the hierarchy of objects to which the references can point. There are no predefined references - you must define them yourself in a program.
Complex Types
Complex types are made up of other types. They allow you to manage and process semantically-related data under a single name. You can access a complex data object either as a whole or by individual component. There are no predefined complex data types in ABAP. You must define them either in your ABAP programs or in the ABAP Dictionary. Structured types are divided further into structures and internal tables.
Structures
A structure is a sequence of any elementary types, reference types, or complex data types.
You use structures in ABAP programs to group work areas that logically belong together. Since the elements of a structure can have any data type, structures can have a large range of uses. For example, you can use a structure with elementary data types to display lines from a database table within a program. You can also use structures containing aggregated elements to include all of the attributes of a screen or control in a single data object.
The following terms are important when we talk about structures:
Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is a deep structure. Accordingly, internal tables, references, and strings are also known as deep data types. The technical difference between deep structures and all others is as follows. When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information. When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.
Internal Tables
Internal tables consists of a series of lines that all have the same data type. Internal tables are characterized by:
Examples for Complex Data Types
The following list contains examples of complex data types in ascending order of complexity:
Elementary Types
Elementary types are the smallest indivisible unit of types. They can be grouped as those with fixed length and those with variable length.
Fixed-Length Elementary Types
There are eight predefined types in ABAP with fixed length:
- Four character types:
- One hexadecimal type:
- Three numeric types:
Variable-Length Elementary Types
There are two predefined types in ABAP with variable length:
- STRING for character strings
- XSTRING for byte strings
Reference types describe data objects that contain references (pointers) to other objects (data objects and objects in ABAP Objects). There is a hierarchy of reference types that describes the hierarchy of objects to which the references can point. There are no predefined references - you must define them yourself in a program.
Complex Types
Complex types are made up of other types. They allow you to manage and process semantically-related data under a single name. You can access a complex data object either as a whole or by individual component. There are no predefined complex data types in ABAP. You must define them either in your ABAP programs or in the ABAP Dictionary. Structured types are divided further into structures and internal tables.
Structures
A structure is a sequence of any elementary types, reference types, or complex data types.
You use structures in ABAP programs to group work areas that logically belong together. Since the elements of a structure can have any data type, structures can have a large range of uses. For example, you can use a structure with elementary data types to display lines from a database table within a program. You can also use structures containing aggregated elements to include all of the attributes of a screen or control in a single data object.
The following terms are important when we talk about structures:
- Nested and non-nested structures
- Flat and deep structures
Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is a deep structure. Accordingly, internal tables, references, and strings are also known as deep data types. The technical difference between deep structures and all others is as follows. When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information. When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.
Internal Tables
Internal tables consists of a series of lines that all have the same data type. Internal tables are characterized by:
- The line type, which can be any elementary type, reference type, or complex data type.
- The key identifies table rows. It is made up of the elementary fields in the line. The key can be unique or non-unique.
- The access method determines how ABAP will access individual
table entries. There are three access types, namely unsorted tables,
sorted index tables and hash tables. For index tables, the system
maintains a linear index, so you can access the table either by
specifying the index or the key.
Hashed tables have no linear index. You can only access hashed tables by specifying the key. The system has its own hash algorithm for managing the table.
Examples for Complex Data Types
The following list contains examples of complex data types in ascending order of complexity:
- Structures consisting of a series of elementary data types of fixed length (non-nested, flat structures)
- An internal table whose line type is an elementary type (vector).
- Internal tables whose line type is a non-nested structure ('real' table)
- Structures with structures as components (nested structures, flat or deep)
- structures containing internal tables as components (deep structures)
- Internal tables whose line type contains further internal tables.
___DEBUGGER
_ Debugger is a programming tool that
you can use to execute ABAP programs, by line or by section. With this tool,
you can display data objects and check the flow logic of programs.
At the moment, two types of debugging
are possible: Debugging with the classic Debugger for release levels prior to
6.40 or debugging with the new Debugger, which is available for all releases
after 6.40. The main differences between the classic and the new ABAP
Debuggers are described below:
There are plans to make the new Debugger the default option as soon as it contains the following functions, which are currently not available:
- The new ABAP Debugger is executed in its own external mode (Debugger), while the application to be analyzed (debuggee) uses a second external mode. So far, the application to be analyzed and the debugger itself shared the same roll area of an external mode. For this reason, each action of the Debugger could influence the program flow of the application. Therefore, the classic Debugger cannot use any ABAP statements for designing the user interface. The path for designing modern UI techniques is not available for it.
- The new Debugger provides the user with a flexible interface that can be configured as required and has more than eight desktops. Here it is possible to place and arrange up to four tools - depending on the user's selection. For example, it is possible to display source texts or structures. In this way, the user can design the Debugger interface according to his own individual requirements.
There are plans to make the new Debugger the default option as soon as it contains the following functions, which are currently not available:
- Watchpoints
- Debugging special types (http, BSP, RFC, update task)
- Display of memory consumption
- Display of system areas
____ABAP THREE TIER ARCHITECTURE
_
ABAP applications are written in the ABAP programming language, and run within the application layer of the SAP Web Application Server.
ABAP programs communicate with the database management system of the central relational database (RDBMS) and with the presentation layer. A SAP-specific graphical user interface (SAP GUI) for users logged on to a SAP System and Web browsers for Web-based applications are available to you as presentation layers.
Contents The documentation is divided into five sections:
Introduction to ABAP
This contains the basics of ABAP application programming. This information is essential for an understanding of ABAP programming. Following an overview of the ABAP side of the SAP Web Application Server, it introduces the essential features of ABAP programs and the ABAP programming language. Finally, it gives a short introduction to how you can create ABAP programs in the ABAP Workbench.
The ABAP Programming Language
This section describes the statements in the ABAP programming language. Beginning with simple statements for data declarations, data processing, and program flow control, it progresses to topics such as modularization and special techniques, explaining which ABAP statements can be used for which purposes.
ABAP User Dialogs
This section describes the SAP GUI-specific screens whose creation and use is integrated in the ABAP programming language.
Running ABAP Programs
This section explains how ABAP programs are executed on the application server. It shows how you can start ABAP programs, the conditions under which you must start them, and the different kinds of program execution.
ABAP Database Access
This section explains how to work with the central database in the SAP System. It describes the parts of the programming language that are converted into SQL statements in the database, and shows how you can program database updates.
ABAP Objects
This is an introduction to ABAP Objects, the object-oriented extension of ABAP. Objects, classes, and interfaces are introduced as the fundamental elements of ABAP Objects. It is shown how you can define classes yourself or by using interfaces or inheritance. This section also covers the handling of methods and events as components of classes.
ABAP and JavaScript
This section describes how you can incorporate JavaScript programs in ABAP using the class CL_JAVA_SCRIPT.
Appendix
The appendix contains summary descriptions and overviews – for example, a list of all system fields.
ABAP applications are written in the ABAP programming language, and run within the application layer of the SAP Web Application Server.
ABAP programs communicate with the database management system of the central relational database (RDBMS) and with the presentation layer. A SAP-specific graphical user interface (SAP GUI) for users logged on to a SAP System and Web browsers for Web-based applications are available to you as presentation layers.
Contents The documentation is divided into five sections:
Introduction to ABAP
This contains the basics of ABAP application programming. This information is essential for an understanding of ABAP programming. Following an overview of the ABAP side of the SAP Web Application Server, it introduces the essential features of ABAP programs and the ABAP programming language. Finally, it gives a short introduction to how you can create ABAP programs in the ABAP Workbench.
The ABAP Programming Language
This section describes the statements in the ABAP programming language. Beginning with simple statements for data declarations, data processing, and program flow control, it progresses to topics such as modularization and special techniques, explaining which ABAP statements can be used for which purposes.
ABAP User Dialogs
This section describes the SAP GUI-specific screens whose creation and use is integrated in the ABAP programming language.
Running ABAP Programs
This section explains how ABAP programs are executed on the application server. It shows how you can start ABAP programs, the conditions under which you must start them, and the different kinds of program execution.
ABAP Database Access
This section explains how to work with the central database in the SAP System. It describes the parts of the programming language that are converted into SQL statements in the database, and shows how you can program database updates.
ABAP Objects
This is an introduction to ABAP Objects, the object-oriented extension of ABAP. Objects, classes, and interfaces are introduced as the fundamental elements of ABAP Objects. It is shown how you can define classes yourself or by using interfaces or inheritance. This section also covers the handling of methods and events as components of classes.
ABAP and JavaScript
This section describes how you can incorporate JavaScript programs in ABAP using the class CL_JAVA_SCRIPT.
Appendix
The appendix contains summary descriptions and overviews – for example, a list of all system fields.