Asa Viva
Asa Viva
Asa Viva
What is watchpoint?
A watchpoint is a conditional breakpoint that is only defined in the
ABAP Debugger.
Classical Reports are the most basic ABAP reports that contain
both selection screen and an output screen. Classical reports are
executed based on events, and not executed on a line-by-line
basis. They are non-interactive reports. Basically, they consist of
one program that creates a single list. Doesn’t need a transaction.
Barcode in Smartforms:
1. Transaction code SE73.
2. Then click on Create.
3. Give the name and description of the barcode.
4. Click on Code 128.
5. Go to Smartstyles.
6. Create paragraph and character format
7. Go to Smartforms
8. In the Text give IT<c>SCAN HERE</>
9. Save and activate
Migrate Script to Smartforms: Smartforms – Utilities – Migration –
Import SAP Script Form
Pass internal table in Smartforms: In Form Interface, in the
Tables section, we declare internal tables.
Form Logic: In a SAP Smartforms, the form logic defines the data
to be read from the database, then to define the condition and lastly
to control the flow of the form output. It is defined in the Form
Builder, where the form structure is defined on the left side of the
Smartforms interface. When a smart form creation window is
opened, on the left side you have default nodes.
Nodes: Create nodes as per requirement
Form attributes: Select description, page format and style.
There 4 types of windows:
Main Window: For printing continuous outputs, like Internal
Table
Secondary Window: For printing fixed length output
Final Window: Similar to Secondary Window with the
exception that contents will be printed at the end
Copies Window: To make copies of the original window
Components of Smartforms:
Form Builder: It is used to design the form. It is first screen
we see after executing the T-code SMARTFORMS.
Form Painter: Used for designing layouts of form pages. We
can define window or graphic positions and choose sizes. Use
tools such as grid, ruler, toolbar, etc.
PC Editor: It is similar to the text editor. We can enter text and
fields in the output fields. Assign paragraph and character
format defined in styles, etc. SE75
Table Painter: Used for designing tables. Also used to design
templates. We can draw rows and columns of any width,
height. Tables should be printed in MAIN window.
1. Table Tab: Configuration of table layout. Define the
types to be used to table header, main area, footer.
2. Data Tab: Controls application data processing for print
output. Specify selection criteria and areas restricted
from data selection.
3. Events Tab: Allows printing of table headings and total
lines.
Style Builder: It is used to collectively define Smartstyles.
Smartstyles control the font, format of character, and
paragraphs in forms.
Field List: Used while writing fields within the form.
Types of messages:
Success (S)
Information (I)
Abend (A)
Exit (X)
Warning (W)
Error (E)
User-defined Checks:
There are three methods to perform it.
1. Issue error or warning message in PAI module
2. Issue error or warning message based on the outcome
of SELECT statement in flow logic
3. Use VALUES statement in flow logic to define valid
values
System stops at the screen having field with check.
Fields become non-editable if not associated with ‘FIELD’.
Select Check: It will retrieve one record. If no records match, error
message will be displayed.
PAI (Process After Input): It determines the flow logic execute
modules after the display of the screen and after receiving inputs
from the User.
PBO (Process Before Output): It determines the flow logic or
execute modules before displaying the screen.
POH (Process on Help Request):
POV (Process on Value Request):
Screen Status: To create Screen Status, we need Menu Painter.
OKCODE: It is a function code which acts as a temporary variable
that stores the value of SY-UCOMM. It is recommended to use it.
Should not change the value of SY-UCOMM.
Conditional Statements:
AT CURSOR-SELECTION
AT EXIT-COMMAND
ON REQUEST
ON INPUT
OOPS:
It represents real-time objects in the form of class objects.
They are the abstraction of real world.
Processes can be put into effect realistically, easier to
understand, maintain, and reuse.
Software structure is improved
Quite expressive which makes it easier to deliver software
components on time with good quality
Class:
Set of features that have the same structure and performs the
same behaviour.
Provides a blueprint of all instances created using the same
class.
Not possible to define class inside another class. Local
auxiliary class or global class can be defined.
Local Class: Implemented inside ABAP program. Can be
used only inside the program they are defined.
Global Class: Implemented in T-code SE24. All programs in
the system have access to it.
Attributes in Class:
Attributes decide what type of data stored inside the class
The contents of the attributes determine the behaviour of the
object
Defined in declaration part of the class
Types of attributes:
1. Instance attributes: One per instance. Syntax
keyword: DATA
2. Static attributes: One class can have one such
attribute only. Syntax keyword: CLASS-DATA. Also
referred as Class Attributes.
Types of Methods:
Instance Method:
Static Method:
Conversions:
SAP Data Migration:
Batch Input Sessions: It is typically used to transfer data from non-
SAP systems to SAP systems or to transfer data
between SAP systems.
BDC (Batch Data Communication): It is a technique using with
legacy data or data loading in to SAP system which is not updated
in the SAP systems. Programmer has to write batch input program
to format the entire incoming data into a BDC table.
Batch Input Recorder: T-code SHDB or through SM35.
Function Modules in Batch Input Programs:
BDC_OPEN_GROUP
BDC_CLOSE_GROUP
BDC_INSERT
Batch Input Processing:
Session Status:
LSMW (Legacy System Migration Workbench): It is a tool based
on SAP software that supports single or periodic data transfer from
non-SAP to SAP systems (and with restriction from SAP to SAP
system).
Methods to import data from R/3 System:
Batch Input
Direct Input
BAPI
IDocs
BAPI (Business Application Programming Interface): It provides
methods that facilitates external applications to access business
objects in the R/3 system.
BAPIs are defined in BOR (Business Object Repository) T-
code SW02.
BAPI_TRANSACTION_COMMIT should be called to store
created data in database.
BAPI always returns success/error messages in RETURN
table.
Advantages of BAPI:
Enhancement Framework
Enhancement Point: It is a point in SAP program where customers
can include further functions in the form of source code without
modifying existing program.
Coalesce: It will take the first NON-NULL value from the two
parameters passed in the coalesce functionality.
Two new expressions for Internal Table Built-in Function:
LINE_INDEX
LINE_EXISTS
Code Push Down: It means that you execute the expensive main
part of your computations in the database, not in the
application code. For example, instead of SELECT-ing from two
database tables and then mixing up rows in the
ABAP code, pushing down means you run a JOIN in the database.
Built in SQL Functions:
CDS Limitations:
You cannot have multiple result sets.
You can use only one single select statement in CDS Views
Coalesce functionality works only when the value of the field
is database NULL.
Selectin all fields in the tables in not possible using *
statement.
AMDP (ABAP Managed Database Procedures): ABAP Managed
Database Procedures are a new feature in AS ABAP allowing
developers to write database procedures directly in ABAP.
It is used to work with stored procedures, which further go
to HANA database layer and execute that.
It is used to move database intensive logic into database.
Minimize data transfer between the database and application.
AMDP Limitations:
You can create database procedure in HANA database and if
you want to consume it in ABAP the every time you have to
create a proxy in ABAP layer.
Transporting from one system to other is a challenge since
you have to transfer both the objects – database procedure
and proxy together which are created in different packages.
AMDP Class:
ALV-IDA: