SAP R/3 Architecture: Domain and Data Elements in SAP
SAP R/3 Architecture: Domain and Data Elements in SAP
SAP R/3 Architecture: Domain and Data Elements in SAP
3. Views in Dictionary
grouping of columns in one or more database tables in accordance with an
application-specific view.
Four different view types are supported.
Database views are implemented with an equivalent view of the database.
Projection views are used to hide fields of a table (only projection).
Help views can be used as a selection method in search helps.
Maintenance views allow you to maintain the data distributed to several tables
for one application object at a time.
SO whenever you have such fields in your table you need to have a reference
field to assign the UNIT for these fields.
So you will create another field in the table for UNIT and make this as a
reference for your CURR or QUANT field.
The data will be inserted normally at the same time we have to insert the UNIT
field.
Also when we retrive the data the reference field is used to perform conversion
for these fields so that in the UI they appear as per the UNIT.
CASE: The CASE control statement is used when you need to compare two or
more fields.
DO and ENDDO: The statements DO and ENDDO define a control structure,
which can contain a closed statement block statement block. Without the
addition n TIMES, the statement block is repeated until it is exited using one
for the statements for leaving loops. In particular, the statement EXIT is ideal
for exiting a loop completely.
Exit is leaving the loop. Continue continues with the next item in the loop.
The EXIT command leaves the loop, do, select … structure where you are. This
is jumps out of the loop structure and executes the firs command after endloop,
endselect….
The CONTINUE comand jumps to the end of the loop structure but
continues executing the next iteration of the loop structure.
Internal table can have more than one entry.but work area can hold at a time
only one entry.
You use foreign keys to define relationships between tables in the ABAP
Dictionary, create value checks for input fields and link several tables in
a view or a lock object.
Sy-tabix is used to find the current line in the internal table; it's a current line
index.
Whereas sy-index in used to find the number of current pass in the loop
statement.
Work Process
Use and Description
Type Name
To Fulfill all requests for execution of dialog steps triggered by an active
Dialog
user or execute dialog programs.
It executes those programs that run without user interaction or executes time
Background
dependent or event controlled background jobs.
Update It executes Update Requests or Asynchronous database changes which are
Work Process
Use and Description
Type Name
controlled by a COMMIT WORK statement in a dialog work process.
It pass sequential data flows onto Printers or Print Formatting to printer, file
Spool
or database.
Administers the lock table in shared memory or If SAP transactions have to
Enqueue
synchronize themselves it executes locking operations.
SAP NetWeaver Application Server is the central foundation for the entire
SAP software stack. It also provides a platform for other SAP NetWeaver
Application Server components (Portal, XI, and so on), as well as for ABAP
and Java applications. The full Java EE standard is supported. SAP NetWeaver
Application Server is the further development of the SAP Web Application
Server.
Database View
Data from One or More Tables Implements Inner Join creates a database view
in the underlying database when you activate the view. Allows data selection in
the database. Since the join operation is executed in the database in this case,
you can minimize the number of databases accesses a database view can only
contain transparent tables.
Help View
You create a help view if a view with an outer join is needed as
a selection method of a search help.
21. Primary key
Primary Key field(s) for the unique identification of records in the table
Each table must have a primary key and it must be at the beginning of the table.
22. Table Maintenance Generator
1.free : It will free the memory of the Internal table and delete the
records.
FREE <Any Variables>. WA, ITAB, V_no
2.refresh : It will delete the records but memory will be there.
REFRESH <Only ITAB>.
3.clear : It will clear the header of the internal table records will be there in
internal table.
CLEAR <Any Variables>. WA, ITAB, V_no
INNER JOIN: to return all rows from both tables where there is a match. i.e.. in
the resulting table all the rows and columns will have values.
In OUTER JOIN the resulting table may have empty columns. Outer join may
be either LEFT or RIGHT .
LEFT OUTER JOIN returns all the rows from the first table, even if there are
no matches in the second table.
RIGHT OUTER JOIN returns all the rows from the second table, even if there
are no matches in the first table.
OUTER JOIN:
There are three types of outer joins namely:
Left Outer Join---For retrieving all the columns from the first table irrespective
of the column match.
Right Outer Join---For retrieving all the columns from the second table
irrespective of the column match
Full Outer Join---For retrieving all the columns from both the tables irrespective
of column match.
25. Search Help
• The SAP system synchronizes several users’ simultaneous access to the same
data records with a lock mechanism.
• When you activate a lock object in the ABAP Dictionary, the system
automatically creates function modules for setting (ENQUEUE_<lock object
name>) and releasing (DEQUEUE_<lock object name>) locks.
30. Explain Primary Key in a DDIC Table
Primary Key field(s) for the unique identification of records in the table
Each table must have a primary key and it must be at the beginning of the table.
31. Standard Itab's with Unique keys
Each internal table has a primary table key that enables access to individual
rows in the table by means of a key specification. The components of the
primary table key are declared using UNIQUE.
32. Chain Operator
Chain operators can be used where we are declaring more than two variables or
executing two or more routines with a single command line
Data: A type d,
B type d,
C type d.
33. Explain the Purpose Comments and How to Comment in ABAP
Secondary Index – on Non-key Fields when we access the data frequently based
on non-key field.
We have to Create 2nd ry index explicitly
Select …. Where land1 =? “2nd ry index is referred if exist on land1
Select …. Where pernr =? Refers primary Index as pernr is Pkey.
36. Explain the Foreign Key and the pre-requisites
A foreign key is the one that is used to link two tables together via the primary
key. It means the columns of one table point to the primary key attribute of the
other table. It further means that if any attribute is set as a primary key attribute
will work in another table as a foreign key attribute.
Control break statements are statements which are used to control the sequence
of execution of statements within LOOP....ENDLOOP. These statements are
executed only within a loop end loop.
38. Explain Buffering and types of Buffering
Buffering is recommended for tables whose data is NOT changed frequently.
Full Buffering - Whole Table is Buffered irrespective of selected Data.
Recommended for tables with a small amount of Data
Single Record buffering - Table with Selected Data only. Recommended for
table with any data
Generic Buffering - When a read is performed on a row, all rows are loaded into
the SAP buffer that match this row in a left-justified part of the primary key.
39. What is the Search Help Exit
A search help exit is a function module that has a predefined interface. A search
help exit is called at certain times by the help processor. The administrative data
of the help processor is passed to the search help exit using the interface.
40. Primary Key Vs Foreign Key
Primary Key field(s) for the unique identification of records in the table Each
table must have a primary key and it must be at the beginning of the table.
A foreign key is the one that is used to link two tables together via the primary
key. It means the columns of one table point to the primary key attribute of the
other table. It further means that if any attribute is set as a primary key attribute
will work in another table as a foreign key attribute.
Week-2
1. Classical Report Events
Classical Report Events (Applicable up to Basic List)
AT SELECTION- After Input and Before leaving the Validate the Input and
SCREEN Selection Screen Error messages for invalid
Data
START-OF- After leaving the selection Screen if Actual business logic for
SELECTION exist. the Invlid Input
Is the default event in the Executable
program and all the executable
statements are part of this event itself
by default
TOP-OF-PAGE At the beginning of each New Page To Print same heading for
all Pages
END-OF-PAGE At the END of each New Page To Print same Footer for
all Pages
2. GUI Status
3. At Selection-Screen
Triggering Time: After Input and Before leaving the Selection Screen
What makes Sense: Validate the Input and Error messages for invalid Data
4. Initialization
Triggering Time: Before Display the Selection Screen (if exist) else as 1st event
What makes Sense: Initialize the Selection Screen with Calculated Values as
default values
7. SY-LSIND, SY-UCOMM
sy-lsind is the index of the current list
sy-ucomm is used for doing the functions what the user wishes to do at that
particular event . You can use it on menus and other places.
8. Select-Options
To accept Multiple Values/Ranges as input during Selection.
Syntax: SELECT-OPTIONS <name> FOR <Variables>.
22. Any 5 transaction codes and purpose and Any 5 Standard Tables
Transaction Codes
SE11 – Creating data elements, tables, domains, structures etc.
SE38 – ABAP Editor
SE80 – Object Navigator
SE41 - Menu Painter
SE51 – Screen Painter
Standard Tables
KNA1
VBAK
LFA1
MARA
MBEW
23. Subroutines Vs Function Modules
Subroutines
Pass by Reference
Pass by Value
Pass by Value and Result
Syntax
RAISE [RESUMABLE] EXCEPTION
{ {TYPE cx_class [ message] [EXPORTING p1 = a1 p2 = a2 ...]}
| oref }.
The statement interrupts execution of the current statement block and raises a
class-based
exception. During handling, processing can only be resumed after the statement
RAISE EXCEPTION. We need to define the Exception under the tab
“Exception” in the Function Builder. We have to use the MESSAGE …
RAISING EXCEPTION_1 syntax to raise the exception.
27. BDC Programming
B – Batch
D – Data
C – Communication
All the standard transactions can create only one record at a time. So, a custom
BDC program is needed to call that transaction repeatedly to create bulk of
records
28. BDC Call Transaction Steps
29. BDC Session Method Steps
Also via transferring the data via Screens and Screen Fields.
FM ‘BDC_OPEN_GROUP’.
Loop at it_file into wa_file. Performs. Insert data and tcode into
session FM ‘BDC_INSERT’ Endloop
FM ‘BDC_CLOSE_GROUP’.
Tcode – SM35 – to process the Session then database updating takes
place.
Error log is created implicitly at the end of session processing.
.
31. Role of BDC programming
All the standard transactions can create only one record at a time. So, a custom
BDC program is needed to call that transaction repeatedly to create bulk of
records
32. Types of FMs
33. Role of Transaction Recorder in BDC Program
BDC recording provides a simple way to generate BDC code for executing
transactions.
By running SHDB and recording a BDC, you can then simply convert it to
program code. This
prevents you from having to figure out all the function codes and screen
numbers manually. Once you have this BDC code, you can decide whether to
use it in a call transaction or a SM35 batch input session.
34. Different Modes of Display during Call Transaction
CALL TRANSACTION
SESSION METHOD
METHOD
Immediate Updating in
Data is not updated in database
Database
tables
unless session processed table.
No Sy - Subrc is returned Sy - Subrc is returned
Error Log is created for error Error need to be handled
records explicitly
Updation in databse table is Updation in databse table is
always Synchronomous Asyncronomous
Question no: 40, 14, 22, 23 in the second week are Repeated.