2. Special Purpose Ledger
3. Accounts Payable
4. Accounts Receivable
5. Asset Accounting
6. Consolidation
7. Controlling
8. Investments
9. Funds Management
10. Travel Management.
Types of Work Processes and the Types of Requests they Handle
WP Type |
Request Type |
| D (Dialog) | Dialog requests |
| V (Update) | Requests to update data in the database |
| B (Background) | Background jobs |
| S (Spool) | Print spool requests |
| E (Enqueue) | Logical lock requests |
| M (Message) | Routes messages between application servers within an R/3 system |
| G (Gateway) | Funnels messages into and out of the R/3 system |
| Object Type | Max Name Length | Allowed First Character |
| Table | 10 | y, z |
| Data element | 10 | y, z |
| Domain | 10 | y, z |
| Field | 10 | Any character |
| Field Name | PK | DE Name | DM Name | Data Type | Length |
| mandt | x | mandt | |||
| lifnr | x | -lifnr | -lifnr | CHAR | 10 |
| name1 | -name1 | -name | CHAR | 35 | |
| regio | -regio | -regio | CHAR | 3 | |
| land1 | -land1 | -land1 | CHAR | 3 |
Commonly Used Data Types
| Type | Description |
| CHAR | Character strings (maximum 255 characters) |
| DEC | Decimal values (maximum length 31) |
| DATS | Date field |
| TIMS | Time field |
| INT1, INT2, INT4 | Integer values |
| NUMC | Character field that can contain only numerics |
Simple Program to Display the Data in the ZTXLFA1
Table
1 report ztx0301. 2 tables ztxlfa1. 3 select * from ztxlfa1. 4 write: / ztxlfa1-lifnr, 5 ztxlfa1-name1, 6 ztxlfa1-regio, 7 ztxlfa1-land1. 8 endselect. 9 if sy-subrc <> 0. 10 write 'Table is empty.'. 11 endif.
- The data class determines which tablespace the table will be created in. The most important data classes are APPL0 (master data) and APPL1 (transaction data).
- Changes to critical data can be automatically logged in change documents
1 data f1(2) type c. 2 data f2 like f1. 3 data max_value type i value 100. 4 data cur_date type d value '19980211'.
List of Character Data Types
Data Type |
Internal Description |
Default Internal Length |
Max Internal Length |
Valid Values |
Default Initial Value |
| c | character | 1 | 65535 | Any char | Blank |
| n | numeric text | 1 | 65535 | 0-9 | 0 |
| d | date | 8 (fixed) | - | 0-9 | 00000000 |
| t | time | 6 (fixed) | - | 0-9 | 000000 |
| x | hexadecimal | 1 | 65535 | Any |
Numeric Data Types
Data Type |
Description |
Default Internal Length |
Max Length |
Max Decimals |
Valid Values |
Default Initial Value |
| i | integer | 4(fixed) | - | 0 | -231 to +231 | 0 |
| p | packed decimal | 8 | 16 | 14 | 0-9 . | 0 |
| f | floating-point | 8 | 8 | 15* | -1E-307 to 1E308 | 0.0 |
Data Dictionary Data Types and Their Corresponding ABAP/4 Data Types
| DDIC Data Type |
Description | ABAP/4 Data Definition |
| char | Character | c(L) |
| clnt | Client | c(3) |
| dats | Date | d |
| tims | Time | t |
| cuky | Currency key | c(5) |
| curr | Currency | p((L+2)/2) |
| dec | Decimal | p((L+2)/2) |
| fltp | Floating-point | f |
| int1 | 1-byte integer | (none) |
| int2 | 2-byte integer | (none) |
| int4 | 4-byte integer | I |
| lang | Language | c(1) |
| numc | Numeric text | n(L) |
| prec | Precision | x(2) |
| quan | Quantity | p((L+2)/2) |
| unit | Units | c(L) |
1 parameters p1(2) type c. 2 parameters p2 like p1. 3 parameters max_value type i default 100. 4 parameters cur_date type d default '19980211' obligatory. 5 parameters cur_date like sy-datum default sy-datum obligatory.
Field string is a series of fields grouped together under a common name.
176 system variables available within every ABAP/4 program
Commonly Used System Variables
| Name | Description |
| sy-datum | Current date |
| sy-uzeit | Current time |
| sy-uname | Current user id |
| sy-subrc | Last return code |
| sy-mandt | Logon client |
| sy-pagno | Current output page number |
| sy-colno | Current output column number |
| sy-linno | Current output list line number |
| sy-vline | Vertical line |
| sy-uline | Horizontal line |
| sy-repid | Current report name |
| sy-cprog | Main program name |
| sy-tcode | Current transaction code |
| sy-dbcnt | Within a select, contains the current iteration counter. After the endselect, contains number of rows that match the where clause. |
System variables are stored in the structure syst.
The assignment statements are clear, move, and move-corresponding loke COBOL.
Perform calculations using compute, add, subtract, multiply, divide.
Comparison statements are if and case.
Loop statements are do and while.
Field String: can define them using either data or tables.
1 report ztx0802. 2 data: begin of totals_1, 3 region(7) value 'unknown', 4 debits(15) type p, 5 count type i, 6 end of totals_1, 7 totals_2 like totals_1. 8 9 totals_1-debits = 100. 10 totals_1-count = 10. 11 totals_2-debits = 200. 12 13 write: / totals_1-region, totals_1-debits, totals_1-count, 14 / totals_2-region, totals_2-debits, totals_2-count.
You can define your own data types using the types statement.
Three Basic Events
1 report ztx1701. 2 initialization. 3 write / '1'. 4 5 start-of-selection. 6 write / '2'. 7 8 end-of-selection. 9 write / '3'.
ABAP/4 Events
Category Events Driver initialization
at selection-screen
start-of-selection
get
end-of-selectionUser at line-selection
at pfn
at user-commandProgram top-of-page
end-of-page
1 report ztx0201. 2 write 'Hello SAP World'.
1 report ztx0202. 2 tables ztxlfa1. 3 select * from ztxlfa1 into ztxlfa1 order by lifnr. 4 write / ztxlfa1-lifnr. 5 endselect.
Dialog Programs
Codes for the Application Areas in R/3
|
Application |
Long |
Short |
LDB |
| Financial Accounting |
FI |
1 |
F |
| Materials Management |
MM |
2 |
M |
| Sales and Distribution |
SD |
3 |
|
| Production Planning and Control |
PP |
4 |
|
| Treasury |
TR |
5 |
|
| Quality Management |
QM |
6 |
|
| Project System |
PS |
7 |
|
| Plant Maintenance |
PM |
8 |
|
| Warehouse Management |
WM |
9 |
|
| Human Resources |
HR |
10 |
|
| Asset Accounting |
AA |
11 |
|
| Controlling |
CO |
12 |
|
| Process Industries |
PI |
13 |
|
| Investment Management |
IM |
14 |
|
| Logistics (General) |
LO |
21 |
|
| International Development |
IN |
22 |
|
| Cross Application Functionality |
CA |
23 |
|
- Around 8,000 database tables are shipped with the standard delivery R/3 product.
- Three conceptual areas in the R/3 system:
- Applications area
- Logistics, Accounting, Human Resources, or Information Systems
- Basis area
- Tools->Administration.
- Performance, tuning, and database administration tools
- Basis is like an operating system for R/3
- Basis provides the runtime environment for ABAP/4 programs.
- Basis makes ABAP/4 programs portable
- Development Workbench
- Tools->Development Workbench
- Create and test ABAP/4 programs
- Application server: interprets ABAP/4 programs
- A transaction code is a 3 or 4 character code associated with a transaction.
- FK03:Accounting->Financial Accounting->Accounts Payable.
- Presentation Server: SAPGUI: program named sapgui.exe: installed on a user's workstation.
- Application server: interprets ABAP/4 programs
- Data Base Server: accept database requests from the application server.
- User context: Allocated at the time of Log on and freed at the time of logoff.
- Roll area: Area to run user Program
- Dialog step: processing needed to get from one screen to the next
- Roll-In, Roll-out and Work Process.
- Each work process is composed of the following:
- A task handler
- An ABAP/4 interpreter
- A screen interpreter
- A database interface
- The average R/3 installation has three systems: development, test, and production.
- User master records (containing R/3 user IDs) are client-dependent Tables. First field is of type: CLNT, Width:3 and name: mandt
- Open SQL, your SQL statements will be passed to the database interface
- Development object: programs, screens, tables, views, structures, data models, messages, and includes.
- The workbench :
- The ABAP/4 program editor where you can create and modify ABAP/4 source code and other program components
- The Data Dictionary where you can create tables, structures, and views
- The Data modeler where you can document the relationships between tables
- The Function library where you can create global ABAP/4 function modules
- The screen and menu painters where you can create a user interface for your programs
- the ABAP/4 Debugger
- the SQL trace tool used to tune SQL statements
- the runtime analyzer for optimizing your program's performance
- a where-used tool for impact analysis
- a computer-aided test tool for regression testing
- a repository search tool for finding development objects
- the Workbench Organizer for recording changes to objects and promoting them into production
http://freebooks.by.ru/view/Abap4in21day
| Click to go to Home Page |