1.what Is Sap?
1.what Is Sap?
Sap deals with public sector, banking sector, education, healthcare etc.
2.what is ERP?
Erp stands for enterprise resource planning, ERP is the business management s/w developed in many
business houses for increase their productivity and performance . It is the business tool used for collect,
store, manage and interpret the data to many business activities like product planning, cost ,
manufacturing ,shipping or payment etc.
3.what is domain?
Domain is one of the object of DDIC, it specifies the technical attributes like data type ,data length and
instead of that sign and naming convention and value range.
4.what is datatype?
Datatype is one of the object in ddic, it specifies the semantic information like field level(short, medium,
heading or long) or field description for a field.
Data class specifies the physical area of the table inside the database. and we have required option
6.what is ddic?
Ddic stands for data dictionary, it contains all the metadata of the data of sap system, and it used for
logon the sap system.IT IS GLOBAL REPOSITIRY
Objects of ddic:-
1.database table:=database table stores the data in the form of rows and column, rows we basically
called record and column we called field.
2.view:-view is one of the object in ddic, using view we can see the data of multiple tables in one place,
view does not contain any physical memory it holds the data at run time, and it’s a virtual table there
are 4 types of view.
projection Database help maintenance
We use a single table in Database view is the Help view is specifically Maintenance view
projection view, we can general view for one or used for search help used for maintain the
see the particular field more tables. object and we cant table and we use tmg
and rest we can filtered execute help view. for that.
out.
In projection view we We only read the data We only read the data We can read or also
can read or also in database view, we in help view, we can’t maintain the data in
maintain the data. can’t maintain. maintain. maintenance view.
There is single table, so We use inner join for We use outer join for We use LEFT outer join
no need of joins. database view. help view. for maintenance view.
TMG:-
The main purpose of tmg to maintain the table without writing any code.
1.Data element:-data element specifies the semantic information like field description, field level etc.
1.elementary type
2.reference type
2.Structure: - structure is the collection of fields and structure stores one value at a time, structure is
like a table but it does not have primary key or technical characteristics.
Structure is composed of data elements, table types and tables, and the composed components are
elementary type, structure type, table type or reference type.
Include append
We can insert the field in between the fields In append structure we can insert the field will
using the included structure. always be in last.
We use custom tables for include structure. We use standard tables for append structure.
Just give the field name as. include and data Click the append structure option to create a
element name as structure name. structure to add a field.
These are reusuable and we can include multiple These are not reusuable and we cant append
no. Of custom tables.IT IS GLOBAL. more than one standard database table.IT IS
LOCAL.
3.Table type: -it is like a global internal table and it provides global visibility.
A table type is a type that describes the structure and functions of an internal table in
the ABAP program.
A table type is a type that describes the structure and functions of an internal table
in the ABAP program
4.Type group:- type group is a container.
There are several type groups available in SAP. For example ‘ABAP’ and ’SLIS’ etc. To
use them in program we use key word ‘TYPE-POOLS’. It allows us to define non-
predefined types. Combination of all such non-predefined types is knows as type-pool
or type-group. In simple terms, if we want to use some custom types in various
programs then we need not define them separately, we can simply create a type group
in ABAP dictionary and use that in our programs.
5.Domain: -domain specify the technical attributes for a field data type and data length.
6.search help:- search help is another object of data dictionary, it gives all the possible value for the
field in the form if list. And it contains a popup window which have all the related data according to your
search. It have f4 help
1.elementary search help:- elementary search is a search path and it gives input help
We can give elementary search help for only single fields of a single table , it have selection method.
2.collective search help:= collective help search is the collection of elementary search help, and we use
more than one fields from various table. when we want data from multiple selection criteria.
Selection method:-it is one of the structure of elementary search help and we can give elementary
search help name as database table name and view name.
Hot key:-it is also another structure of elementary search help, we use hot key for specify that
elementary search help in collective search help.
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.
7.lock object:- lock object is the last object of ddic, we use lock object primarily for synchronization
tasks. When more than one program tries to access the same data there is need one lock for the data.
So that there is no inconsistency found in our saved data.
1.table level lock:- we will lock the entire table in table level lock.
2.row level mode:- we will lock a particular row of the table in row level lock, other rows are free and
being used in other applications.
1.shared lock mode:- in this lock one user can edit but multiple user can read the data and it is
represented by ‘S’.
2.write/exclusive lock mode:-in this lock only one user can edit as well only one user can read the data,
it is represented by ‘E’.
3.Optimistic lock mode:-in this only the user have access only for first time to read and edit the data.
4.Exclusive but not cumulative: - in this lock multiple user can read as well as multiple user can edit the
data, it is represented by ‘X’.
Functional module in lock object: - there is two types of functional module for lock object.
1.enqueue: -enqueue used for setting or insert the lock in the object.
2.dequeue: -dequeue we used for release the lock from the object.
For table level we have inbuilt call function for inserting or releasing the lock “ENQUEUE_E_TABLE” or
“DEQUEUE_E_TABLE”.
But for row level we have to give the module name like “ENQUEUE_<LOCK OBJECT NAME> OR
“DEQUEUE_<LOCK OBJECT NAME>.
8.What Is SNRO?
SNRO is a transaction code for giving the number range object, it is used for maintaining the number
range for business objects like controlling documents(co) , accounting document (Fi) and sales order etc.
Whenever we enter that code SAPMSNRO is a sap standard program present in SZN package will
automatically generated in the background, we use snro for automatically generated the value.
9.what is index?
We can consider an index as copy of database table that used to reduce the certain fields.
That copy is generated at the time of index creation and it is generated in sorting order that makes our
selection process faster.
1.primary index:- primary index are collection of primary key fields means the values are unique and
duplicates are not allowed.
2.secondary index:-we use secondary index for non key fields that means it may have duplicates.
Secondary index will do sorting then binary search for compare and fetching the values.
Delivery class controls the flow of data from one server to another server, and delivery class decides
what type of data stores in the table, that data can be business data means application data( master
data and transaction data). There are several options like
C ----Customizing table
Foreign key are used to establish the relation between various table in ABAP dictionary. Foreign key
links two tables by assigning foreign key field of one table to primary key field of another table. Foreign
key connects two or more different tables for doing table validation and for avoid redundancy.
Requirements:- the field of check table used for validation must be the primary key field.
And that primary key field and foreign key field must have same data type and same data length.
Landscape is a system server or application server or we may call it architecture of server and landscape
arranging the sap server for the company.
Development :-A server where all the sap consultants will be developing the real time objects for the
business requirements I.e. called development server, once the development is done we should do a
sample testing called unit testing.
Quality:-=A server where the functional consultants or testing consultants testing the developed objects
I.e. called testing server or quality server.
Production:-A server where all the developing objects will be used in the live business market for the
maintenance of business I.e. called production server.
------------------------------------------------------------------------------------------------------
**************************************************************
--------------------------------------------------------------------------------------------------------
2.hased
1.standard internal table: -
Standard table have duplicate also ,we cant declare standard table as unique and it will do
linear search and it will not in sorted order .
2.sorted internal table:-
It may have duplicate records or it may not have and we have to declare key field and fill the
data using insert keyword ,it will do sorting and binary search .
Structures− Structures are basically data objects consisting of various components or fields of
any data type. It differs from the tables in a way that it simulates the format of the table and is used
to hold one row of data whereas table has multiple rows of data.
Work-Areas − Work area is basically variables used to store a single row of data. It is similar to
structure apart from the fact that it can only be used at program level whereas structure can be used
at data dictionary level as well.
1.New debugger
2.classical debugger
The new ABAP Debugger runs separately from the main application. This means
that the limitations of the old debugger no longer apply. Running in a different
process, it thus eliminates any side interactions between the debugger and the
debugged application, and also enables debugging for all ABAP coding. An improved
UI and personalization capabilities, in addition, increases the efficiency of the
debugger.
2.advanced techniques like debugging scripting 2.advanced techniques like debugging scripting,
and external scripting are not available in external scripting are available in new debugger
classical debugger . .
3.there is no specific way to add breakpoints 3.we can add breakpoint and watchpoint in new
and watchpoint . debugger .
4. we can’t compare two fields . 4. we can compare two fields .
5.there is no desktop in classical debugger . 5) there is desktop 1 , desktop 2 and desktop 3 .
6. in this it won’t show local and global variable 7.it will provide global and local variable for
for program . program .
breakpoint watchpoint
1. Break-point pauses the program execution at 1. Watch-point indicates the position of a
the point of location where it is marked by the variable with a value as requested by developer
developer. during the program execution.
static dynamic
1. These are not normally user specific; but can be set 1. These are user specific.
for specific users.
2. These cannot be set when the program is 2. These can be set even if the program is locked
locked by another user. by another user.
3. They can be set using the statement “BREAK-POINT” 3. They can be set in ABAP editor and in
and “BREAK <USERNAME>” in ABAP code. debugging mode.
4. These needs to be deleted manually. 4. These are deleted automatically when you log-
off from SAP.
Parallel Cursor in ABAP is a way to modify the conventional nested loop in such a way that the overall
performance of the ABAP program gets improved .
Syntax:-
SELECT COLUMN-LIST FROM TABLE1 LEFT OUTER JOIN TABLE2 ON
COMMON_COL1 = COMMON_COL2 INTO TABLE <INTERNAL TABLE> .
vt
Right outer join: - The right outer join causes two or more tables to join and returns all rows from
the right-hand table, and only those results from the other table that fulfilled the specified join condition. If
it finds unmatched records from the left side table, it returns Null value. It is also known as Right Outer
Join. So, Outer is the optional clause to use with Right Join.
Syntax:-
SELECT COLUMN-LIST FROM TABLE1 LEFT OUTER JOIN TABLE2 ON
COMMON_COL1 = COMMON_COL2 INTO TABLE <INTERNAL TABLE> .
Selection screen:-
Selection screens are special Dynapro's that are not created in
Screen Painter, but rather are generated from ABAP statements. You use
them whenever you want the user to enter either a single value for a field or
fields, or to enter selection criteria.
PARAMETERS for single fields
SELECT-OPTIONS for complex selections
SELECTION-SCREEN for formatting the selection screen and
defining user-specific selection screens.
SELECT-OPTION: -
Select option we used to take user input in range and when we declare select option a standard
selection table with header line and standard key will be generated and that table have 4 fields
SIGN, OPTION, LOW and HIGH.
SIGN: - The data type of SIGN is C with length 1. The contents of SIGN determine for each row whether
the result of the row condition is to be included in or excluded from the resulting set of all rows.
Possible values are I and E.`
OPTION: -The data type of OPTION is C with length 2. OPTION contains the selection operator.
The operators are EQ, BT,LT,GT, CP,NP etc .
LOW: - The data type of LOW is the same as the column type of the database table, to which the
selection criterion is linked.
HIGH:- The data type of HIGH is the same as the column type of the database table, to which the
selection criterion is linked.
PARAMETERS: -
It take more time for fetching the record as It take less time for fetching the record as
compare to select up to 1 rows. compared to select single.
Select single will not generate any result set In select up to 1 rows System will generate
and it will hit the database table only one time one result set for storing the matched record
. and it will hit the database table more than
one times even we want only single record .
So performance wise select up to 1 row is better than select single because here we are not using
all the primary key .
In select up to 1 row if we are using work area instead of internal table we have to give endselect
for that select statement.
What is Filed symbol ?types of field symbols?
Field symbols are placeholders or symbolic names for existing data objects (or parts of existing data
objects), declared by the statement FIELD-SYMBOLS or by the declaration operator FIELD-SYMBOL.
A field symbol in ABAP is a dereferencing pointer that is mainly used to point specific lines of Internal
table. It can be used to point either a table, a field or a dynamic structure. It is used as an alternative to work
area to reduce the memory consumption and increase the performance of a program.
1.typed way
SPECIFY WITH ANY DATA TYPE ,STRUCTURE AND TABLE FOR TYPED .
2.generic way
Step 02: Write the first loop, like the previous way itself.
Step 03: Read the second table with the key that was required to search the data. This would give the first value regarding the
Step 04: If the above step executed successfully, it means data is there in the second table associated with the key. Hence the SY-
SUBRC will be set to zero. In this step we will check the value of SY-SUBRC. If it is zero, than we will proceed.
Step 05: Assign the SY-TABIX value into a local variable. We do this step to preserve the SY-TABIX value as it changes with
the loop.’
Step 06: Now it’s the time to write the second loop. This time we don’t write the WHERE condition. This
time we will write FROM condition with the local variable we initialized above.
Step 07: In this step we check if the key of first table is equal to the key of second table or not. If not,
then exit the loop. This stops the loop from reading non required data.
Step 08: In this step we write our actual logic or print statements. And then close both the loops.
1. What is control break statement & what are the statements we can use
inside loop explain them?
Control Break statements in SAP ABAP are the statements enclosed between AT and ENDAT. These statements
help us to control a loop according to our requirement.
There are several ty pes statements present in sap abap :=
2. AT NEW – ENDAT:-
4.CLEAR:- we clear the work area and internal table records using clear
statement, clear used for internal table and work area also .
Syntax:- CLEAR<work area> .
CLEAR<internal table>.
5.READ:- Read statement will read only single record at a time and not more
than that. Read statement will return Sy-subrc value.
Syntax:- READ TABLE <internal table>INTO<work area> WITH KEY <field
name>= VALUE .
6.MODIFY:- modify used for modify the data of internal table .
Syntax:- MODIFY <internal table>FROM<work area> TRANSPORTING <field name>
WHERE <field name> = value .
7.DELETE:-We can delete one or more records with delete using logical operators .
Syntax:-DELETE <internal table> where <conditions> .
8.DELETE WITH KEY:-
Delete table <internal table name> with table key <key field
Syntax:-
name = ‘___’ >.
9.UPDATE:-
Syntax:- UPDATE <database table> SET<field name> = ‘___’ WHERE <fieldname> =
‘____’.
9.REFRESH:- Refresh will delete all the rows of a internal table. this free up
the allocated memory for internal table .
Syntax:- REFRESH<internal table>.
10.FREE:- The statement FREE deletes all rows from an internal table and releases the
memory area that the rows occupied.
Syntax:- FREE<internal table>
11.DELETE ADJECENT DUPLICATE: - compare values of a column of any table/
internal table and delete the duplicates.
Syntax:-DELETE ADJECENT DUPLICATE FROM <internal table> COMPARING <field
name> .
12.SORT:- we can sort the the internal table using sort keyword .
Syntax:- SORT <internal table> .
13.LOOP:- A loop statement allows us to execute a statement or group of statements
multiple times.
Syntax:- LOOP AT <itab> INTO <wa> .
WRITE:/__________________ .
ENDLOOP .
14.DESCRIBE STATEMENT:-
We use this statement to know how many records present in
our internal table .
Syntax:-Describe table <internal table> lines <fieldname> .
Write :/ fieldname .
15. Difference between free, refresh, clear and delete ?
FREE REFRESH CLEAR DELETE
It will free the It will delete the It will clear the delete the
memory of the records but header of the internal
Internal table and memory will be table records will be required
delete the there. there in internal table. records.
records.
Apap is a event driven programming language means it executes event after event not line after line.
1.classical reports
2.interactive reports
3.ALV reports
1.Classical Reports: -
Classical reports are such a report in which we display the entire details in single list or single screen,
means there is single selection-screen and output screen.
1.Load-of-program:-
This event is used to load the program to memory for execution .
2.initialization: -
This event is used to initialize the variable means to give some default values.
3.selection-screen output: -
Using this event, we can dynamically change or modify the selection screen.
This event is used to validate the single selection screen input parameter or field .
F4 help.
To prepare documents for any particular field or for f1 help we have one functional module
“DSYS_SHOW_FOR_F1HELP”.
8.start-of-selection: -
This event is used for writing some actual business logic or here we can write all types of select query.
It is also indicating the start of selection screen and it is the default screen.
9.End-of-selection: -
This event indicates the end of the selection screen and here we can display the output .
10.top-of-page: -
It is used to give some header information in classical reports, it won't show header info in interactive, it
is a PBO event.
11.end-of-page: -
Interactive reports: -
Interactive reports in sap abap are used to interact with the output page and in the list we can double
click and get the detailed information.
And in interactive reports we have an overview list or basis list for the basic information and the number
is 0 and we have sub lists or secondary list for detailed description about data and the number starts
from 1 to 20 so we have total 21 lists.
And these list numbers are stored in sy-lsind system variable if we select line the value will be stored in
sy-lisel .
If we want to trigger secondary list based on basic list we use that event .
When user double click on any list line then at line selection event will be trigger .
1.hide technique
Functionality of hide: - Whenever the user double clicks on any list line, the event at line selection will be triggered.
The system automatically identifies the line nowhere the user has double clicked and reads the corresponding record into hide
variable.
Get cursor:- GET CURSOR is a key word, which is used to get cursor position with field name and value, by using this key work we can get value
and field name at cursor .
It is used to store the value of the selected field name. It is used to store the line with line number.
In get cursor we go to multiple pages for the same line In hide technique we go to the same page when
according to the fields. we double click on anywhere in the line .
It responds for a particular field . It responds for a line .
2.top-of-page during line selection: -
This event is used to give the constant heading for all the secondary list.
3.at user command: - This event is triggered whenever the user clicks on custom GUI buttons.
4.at pf <function key>: - This event is used or triggered whenever the user clicks on
function keys (f1, f2, etc. ).
ALV REPORTS:- ALV stands for ABAP List Viewer. ALV gives us a standard List format and user interface to all
our ABAP reports. ALV is created by a set of standard function modules provided by SAP.
REPORTS:-
Generally, Reports are nothing but "Extracting Data from the Database and Displaying extracted
data on the Screen".
Reports are used to display the data in a organized manner or it is used to display
bulk amount of data in predefined format or systematic way .
Abap is a event driven programming language means it executes event after
event not line after line .
There are 3 types of reports .
1.classical reports
2.interactive reports
3.alv reports .
1.classical reports:-
Classical report is such a report here we display the data in single screen or single
list .
It does not have sub reports .
Classical report events:-
1.load of program :- load the program into memory for execution
2.initialization :-it is used to give some default values .
3.at selection screen output :-it is used for some dynamic modification of the
selection screen at run time .
4.at selection screen on field :- it is used to validate the single input field .
5.at selection screen on value request :- it is used to provide the search help
facilities to a particular field .
F4 help .
Fm:-f4if_int_table_value_request
6.at selection screen on help request :-using this event we can prepare
documentation for a field .
F1 help .
Fm-dsys_show_for_f1help
7.at selection screen :-it is used to validate multiple input field of the selection
screen .
8.start-of-selection :- it is the default event .
Here we write the actual business logic and it also indicates the start of selection
screen .
9.end-of-selection :- this event indicates the end of selection screen .
10.top-of-page:- this event we use to give some constant heading .
11.end-of-page :- this event is used for some constant footer .
2.Interactive reports:-
In Interactive reports we can directly interact with output page , there are two
types of list .
1.basic list .
2.secondary list
The basic information displayed in the basic list or overview list and the
detail information displayed in secondary list called interactive reports .
The basic list number is 0 and the secondary list number is 1 to 20 so
total we have 21 secondary list .
The number of that list are stored in the system variable sy-lsind .
Using interactive reports we can control the retrival of data .
Interactive report events:-
Instead of all the events of classical reports there are 4 more event is
there in classical reports .
1.at line selection :- this event will trigger when user double click on
any list line . There are 2 technique is there for at line selection event .
1.HIDE TECHNIQUE:- hide is a keyword used to hide the data into a
temporary memory called hide area for further processing we use this
keyword inside loop after write statement.
Whenever user double click on any list line then system automatically
identifies the line where user double clicked and read the
corresponding record to hide area.
2.GET CURSOR field technique :- this technique is used to read or get
the selected line content I.e. field name or field value into the variables
. Here no need of hide area Using this technique we can generate
interactive reports based on field name or field value
2.at user command :- this event get trigger when user clicks any GUI
buttons .
3.at pf status :- this event get trigger when user press any function keys
(f1,f2 …).
4.top of page during line selection :- this event is used to provide the
heading for secondary list , top of page does not work for secondary list
.
3.ALV reports: -
Alv stands for abap list viewer , alv give us standard list format and user interface
to all our abap reports, alv is created using some standard function modules
given by sap.
Alv provide some inbuilt functions:-
1.filtering the records.
2.sort the records .
3.download the report output in excel/html .
4.total / subtotal .
5. hiding the unwanted column
Field catalog: - Field catalog means u are preparing one internal table with all
the fields u want to display in the alv grid.
In this field catalog u can specify the color width length so many options u can
assign based on how u want to see the output of u r field.
Declare an internal table of type SLIS_T_FIELDCAT_ALV.
Call function module REUSE_ALV_FIELDCATALOG_MERGE.
Using field catalog, we can change the properties of each field.
Types of alv:-
Hierarchy alv:-
REUSE_ALV_HIERSEQ_LIST_DISPLAY
Displaying the data in the form of hierarchy i.e. Parent-to-Child Relation is called
Hierarchical ALV Report.
Blocked alv:-
REUSE_ALV_BLOCK_LIST_INIT
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOCK_LIST_DISPLAY
Blocked alv means in one output screen multiple internal table can display.
Interactive alv:- Interactive reports are reports where users can interact more means if we
click on some field it will display one more list.
WHAT IS SLIS ?
SLIS is the type library for ALV grid.
If you'll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.
SLIS_LAYOUT_ALV,
SLIS_T_FIELDCAT_ALV
SLIS_T_LISTHEADER,
SLIS_T_EVENT,
SLIS_SELFIELD.
Transaction rfc:- Unlike asynchronous RFC, in Transactional RFC the remote system
does not have to be available at the moment the RFC client program start the call. The
data is held in the source system until the target system is available.
Queued rfc:- This RFC communication is an extension to the transactional RFC.
In this method, all the requests are queued up(inbound queue and outbound
queue) and are processed in a sequence only if it is certain that all preceding calls
are processed correctly.
This method guarantees that all the requests are processed in the sequence in
which they are received.
This is the standard form, which specifies This form specifies synchronous processing. The
asynchronous processing. Your program does not wait commit statement waits for the requested functions
for the requested functions to finish processing. to finish processing. Control returns to your program
after all high priority (V1) function modules have run
successfully.
Sub-routines:-
subroutines are also a set of reusuable code.
We define the sub routine codes inside form and end form .
We call the subroutine using perform statement.
There are two types of sub routine: -
1.internal sub-routine
2.external sub-routine
Internal subroutine means inside the same program only define and call
the subroutine .
External subroutine means we can reuse the subroutine outside the
program also .
Luw :- logical unit of work.
Database LUW:- database luw means in one screen whatever changes
we made will store in db luw . Db luw is the mechanism used in
database to ensure that its data is always consistent and which are
executed entirely or not at all .
SAP LUW:- sap luw is the collection of db luw , if any error occurs in any
one of the screen it won't work .
MPP:- A module pool is collection of screens , flow logic , menu bars
and abap code where we can build an application .
It is a special type of programming where we can create our own
custom screens as per our business requirements.
We need to create tcode for mpp , that transaction code will refer the
module pool and the initial screen number .
Events in mpp:-
Pbo:- this event will trigger before the selection screen displays .we can
give default values to screen .
Here we can
Pai:- here we implement all the logical code . When user give input this
event will trigger .
Pov:-we can give f4 help using this event , and it will trigger when user
click f4 .
Poh :- we can prepare documentation (f1) , and it will trigger when user
click f1 .
Components of the screen are: -
Attributes: - properties of screen
Element list :- list of UI /LIBRARY elements
Flow logic :- we can write logic code
Layout: - screen design area
Types of screen:-
1.screen :- it’s a normal visible layout displayed in output .
2.subscreen :- for subscreen we have to create subscreen area , Sub
screens normally used to do all the task in a single screen without
navigating to other screens. Sub Screen normally used in the main
screen. The main screen declares a dedicated sub screen area in its
screen where sub screen is called and displayed in the run time.
3.modal dialog box :-it is a pup up window displayed in the top of the
screen . While calling the screen specify co-ordinate of top left corner
and bottom right corner so that the system calculates the height and
width of the screen .
4. selection dynpro:-
CHAIN AND ENDCHAIN :-
Chain and endchain is used in flow logic block while creating screen .
While validating multiple fields if we enter one wrong input then all
other fields also go for display/non-editable mode to overcome this
problem we use chain and endchain .
Set screen :- if we call a screen with set screen keyword then the
control goes to the next screen finishes the work and come back to the
previous screen again .
Call screen / leave screen : - if we call a screen with call screen or leave
screen then the control immediately goes to the next screen finishes
the work and does not return back .
TABSTRIP:- it is a screen object which consist of two or more pages and each
pages have tab title and page area , tabs trip allows us to place a series of screen
on a single screen , to create tabstrip we must have to
1) Define tab title and page area for the screen.
2) For all the tab we have to place one sub screen area or we can place
separate subscreen area also
3) Write the code screen for flow logic
4) Write the abap processing logic (we have to activate the tab title)
5) We have to control the tabstrip .
Table control:- table control is used for displaying large amount of data in a table ,
we create table control in screen painter and in that table control we can specify
input/output parameter , radio buttons , check box , radio button groups , and
pushbuttons . We can have 255 columns and each column we have to give
heading .
Pre-requisites:-
1)we have to declare the control
2)we have to make use of looping.
BDC: - BDC stands for batch data communication. It is the automated procedure
to transfring the external data or legacy data into a sap system using batch input
programming.
There are two ways we can implement bdc .
1) Call transaction
2) Session method
Data is populated automatically through screen by running the transaction into
the internal table BDCDATA.
When we go for call transaction :-
When we have small amount of data to be transfer and multiple transactions
required , and asynchronous processing and we wants to handle the errors
explicitly.
When we go for session method :-
When we want to transfer large amount of data and only one transaction , and
synchronous updation and the error handle implicitly by log table .
BDCDATA:- bdcdata is a structure type with 5 fields ( program , dynpro , dynbegin
, fval , fname ) of the bdc internal table which is used for the processing of
transaction (that happenes in shdb ) .
Shdb:- recording of transaction .
Outbound and inbound technology:- outbound means transferring and inbound
means processing the data non-sap to sap and sap to sap also .
Session method:- session method means transfer the data from internal table to
database table through session .
Abap/4 reads the external data that is to be entered in sap system and stores the
data in session .
We use 3 function modules in session method .
1> bdc_open_group :- to start the session
2>bds_insert :- for transferring the data
3>bdc_close_group :- for closing the session
Call transaction:- call transaction statement call the transaction whose
transaction code is contained in the data object , using call transaction we can
update the database synchronously / asynchronously .
Open dataset (name ) intext mode for output encoding default .
<transfer the data to application server )
Close dataset (name) .
Open dataset (name ) intext mode for input encoding default .
<read the data in application server )
Close dataset (name) .
Ok code:- command field is identified by ok code ; we can find the ok code in
bdcdata structure in the field name fval .
Bapi: - bapi stands for business application programming interface. Bapi is the rfc
enabled function module used to communicate with sap to non-sap system sap to
sap system. Bapi are stored in BOR( business object repository ) as methods in the
sap business object which carry out some business functions .
1)standard Bapi :- the Bapi's are developed by sap labs .
Bapi_material_savedata
Bapi_material_getdata
2)custom bapi :- the Bapi's are developed by abap developers .
Prerequisites to create custom bapi :- we have to create structure and rfc
function module .
Structure name , fm name and bapi name must starts with zbapi .
Each fm has its own function group .
Bapiret2 we have to declare in exporting parameter with passbyvalue to get the
messages .
BOR (BUSINESS OBJECT REPOSITORY) :- it is like a container ., it is the object
oriented bussiness repository In r/3 architecture where all the sap business object
and sap interface types as well as its components , attributes and events are there
bapi’s are stored in bor in the form of methods .
Swo1 :-
Swo1 is the tcode for business object builder where we create the business
objects. Swo1 is present in swo package .
How to find bapi ?
IN TCODE =’bapi’ .
Or in any transaction code like (va01 , mm01) we can go for system -> status then double click on
program name and there go for Goto->attributes and copy there the package name.
Now enter se80 and select package and there in business object type and select BUSSINESS
OBJECT THEN go for methods and select any method with green color checkbox then go for
abap there you can find your bapi .
Bapi extension:- bapi extension is used to add or retrieve the data to a custom fields .
We have bapiparex structure with 4 fields valuepart1 , valuepart2 , valuepart3 and valuepart3
with length 960 . Two types of bapi extension :-
c)function module exit :- it allows customer to add code to sap standard program via
function module .
d)screen exit :- it allows customer to add fields to screen via subscreen and we called
the subscreen in screens flow logic .
3) BADI’S
Reuse_alv_list_display Reuse_alv_grid_display
in list display we have only basic and normal display Grid display is more Userfriendly and has options to
of the selection criteria. calculate consolidations like sums and grand totals.
We can
even modify the width of the column .
ALV LIST Can be coded using only FMs ALV GRID Can be coded using FMs and object
oriented concepts
ALV LIST is Display Only. ALV Grid Can Be made EDITABLE for entry purpose.
5. difference between classical , interactive and alv ?
Data element is the collection of domain with Domain is the collection of data type and length.
short description.
Data element contain technical attributes as well Domain contains only technical attributes(data
as semantic information (field description) . type , size ) .
7.data class and delivery class ?
USER, USER1
APPEND INSERT
In append the record will always add in the Using Insert we can add the field in the
last of the internal table . specific position (anywhere we can add) of
the internal table .
New records are always added in the last If position is not specified then new records
position . are inserted in last .
System field sy-tabix is set at the end of the System field Sy-tabix is not set .
internal table .
9. structure and work area ?
Reports mpp
Reports are type E and can run directly . Mpp are type m , and we need transaction
code to run the program .
Reports are used to display the database Mpp used to update the database table .
table .
We use events like start of selection , end of We use events like PBO , PAI etc .
selection etc .
Report programs are standalone means no Mpp are not standalone we need one screen
need of screens and transaction code . and must transaction code for mpp .
Report programs are less flexible . Mpp programs are more flexible .
14. Tabstrip and table control ?
LSMW BDC
1) LSMW stands for legacy system 3) Bdc stands for batch data
migration workbench . communication .
4) Lsmw used for normal sap 2) Bdc used for customized application .
application .
5) Its a functional consultants . 3) It’s a technical consultants .
4) if we wants to transfer less then 5000 6) When we wants to transfer more
then we go for lsmw . than 5000 we go for bdc .
5)lsmw is not very flexible hence we do not 7) Bdc is flexible and we perform coding
perform coding . .
8) Lsmw is the non-sap to sap 9) Bdc is the sap to sap communication
communication tool , tool .
Bdc bapi
Bdc we can use for any transaction which Bapi is used when it is available for
has a particular screen or fields . particular transaction like delivery sales
order .
Using bdc we are updating the screen . Using bapi we are updating the database
table directly .
Bdc is a procedure oriented . Bapi is a object oriented.
For bdc we need to do recording . no need to do recording
Bdc is not rfc enabled . Bapi is the rfc enable .
We are not using commit work and roll back We are use commit work and rollback in fm .
.
Bapi Rfc
Bapi’s are rfc enabled function module that Rfc is a protocol used to communicate
gives external access to the sap business between applications of different systems
applications . on the sap environment .
It can be wrapped bussiness objects . It can’t wrapped business objects .
All bapi’s are rfc . All rfc’s are not bapi .
We can’t handle exception in bapi . Exception can be defined in the interface of
calling function module .
It can be compared to CGI applications . It can be compared to HTTP applications .
19. TABLE AND TEMPLETE ?
Tables Templets
Tables have header , body and footer . Templets do not contain header , body and
footer .
We have to do looping for tables No need to write .
Tables are dynamic height . Templetes are static heights .
If the number of rows and columns are not If the number of rows and columns are fixed
fixed and anytime we wants to increase and then we can go for templetes .
decrease the length then we go for tables .
20. Scripts and smartforms ?
Bapi_transaction_commit Bapi_transaction_rollback
Bapi_transaction_commit is used when we Bapi transaction rollback is used when we
make any changes to the database by calling wants to rollback / undo the transaction to
bapi from outside sap and wants to commit the sap system .
the database .
If bapi is success then we go for another If bapi has errors then we go for
bapi ‘bapi_transaction_commit’ to save all ‘bapi_transaction_rollback’ to revort back
the changes made to the database table . the changes made to the database table .
22. Difference between bapi_transaction_commit and commit work ?
Commit work and Bapi transaction commit both are used for update the database ,
the main difference between Bapi transaction commit and commit work is bapi
transaction commit refreshes the buffer and the buffer holds the data to be updated
when we use commit work and if any reason it fails to updated then buffer does not
refreshes .
And hence when we call commit work again then the porevious data got updated to database
, but in bapi transaction commit function module we have buffer_refresh_all function module
right after the commit work so hence the commit work fails the buffer is refreshed .
Implicit Explicit
1.In implicit enhancements SAP provide the 1.In explicit enhancements
space where we will write our own programmer will decide where they
functionality.
want to write there functionality. So
that in explicit enhancement we have
to create enhancement sport for
writing the functionality.
1. It is available at the following 2. here are two type of
places :-
explicit enhancement
2. --> Begin/ end of an include.
3. --> Begin/end of method / FM / option available : -
form routine. --> Enhancement point.
4. --> End of structure. --> Enhancement section.
Option Section
Previous code will always called along with Only one section can implemented at one
new code . time .
If another developer write another set of
code in same section then the previous code
will not work .
If it is a standard recording routine, whenever you make any changes, the system will ask
for transport and the changes will be captured in the transport, then it can be transported to
the testing and production system.
If it is a no, or user, recording routine -> system won't ask for transport and you have
maintained it locally in every system.
4.Full buffering: All the records of the accessed table will be buffered.
5.Generic buffering: All other records which have the same generic fields of the accessed
records will be buffered.
6.Single record buffering: Only the accessed record will buffer in this case.
NO INPUT HISTORY:-
If this indicator is set, the mechanism that the SAP GUI uses to handle the input history of a screen input
field is switched off.