0% found this document useful (0 votes)
28 views72 pages

ABAP Outputs

The document provides an overview of the Data Dictionary (DDIC) in ABAP, detailing its purpose as a central repository for data management and the various objects it encompasses, such as database tables and views. It also covers reporting types, modularization techniques, Smart Forms for document design, data migration methods, and Business Add-Ins (BAdi) for enhancing standard SAP code. Additionally, it explains the different programming techniques used in ABAP, including Module Pool Programming.

Uploaded by

manasagmansi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views72 pages

ABAP Outputs

The document provides an overview of the Data Dictionary (DDIC) in ABAP, detailing its purpose as a central repository for data management and the various objects it encompasses, such as database tables and views. It also covers reporting types, modularization techniques, Smart Forms for document design, data migration methods, and Business Add-Ins (BAdi) for enhancing standard SAP code. Additionally, it explains the different programming techniques used in ABAP, including Module Pool Programming.

Uploaded by

manasagmansi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

MANASA G

(ABAP)
DDIC
Data dictionary
INTRODUCTION

 What is DDIC
DDIC stands for Data Dictionary it is a central repository to store and
maintain the data globally.
Why we go for DDIC?
The data which is created in the DDIC is gobally available.
We can achieve DDL operations(create, delete, update, rollback)
What is T code for DDIC?
SE11.
Objects

 Database Table
 Views
 Data type
 Domain
 Type group
 Search help
 Lock object
Database table

 It is one of object in the DDIC, data is stored in the from of rows and
columns.
 We can create the table in two approach
1 Top Buttom approach : by creating the data element(Direct method)
2 Buttom top approach : by creating the domain
 There are 3 types of tables
1 Transparent table.
2 Pool Table
3 Cluster Table
Database table

 Components of Database Table


1 Delivery and maintaince
2 Fields
3 Technical Settings
Delivery and Maintaince
 Delivery Class:
Controls the transport of data while installing or upgrading the data to the client
system.
We can maintain the following by specifying the display selecting options like
Display and maintaince is allowed
Display and maintaince allowed with restrictions
Display and maintaince not allowed
Display only
Fields

 We should not use the reverse keywords for sepcifing the field name
 Every table should have atleast one key field/ primary key and can be
up to 16 pk
 It have data element which gives the sementic(description) information
about the fields.
 Also have the domain which gives technical as well as sementic info.
Technical settings

 Technical settings which gives the information where the data and table
is stored.
 Data Class which specifies the physical storage of the data in the table
 It has types like:
APPL01(Master Data)
APPL02(Transaction Data)
APPL03(Organizational data)
Buffer
Stores the tempaory data of the table
DB Table
Views

 Views is one of the object type in the DDIC , it is virtual representation of


the data.
 Type of views :
1. Database view
2. Projection view
3. Maintaince View
4. Help View
Database view
 A database view is automatically created in the underlying database when it is
activated.
 Application programs can access the data of a database view using the database
interface. we can access the data in ABAP programs with both OPEN SQL and NATIVE
SQL.
 Database views implement an inner join (see Inner and Outer Join ).
 If the database view only contains a single table, the maintenance status can be used
to determine if data records can also be inserted with the view. If the database view
contains more than one table, you can only read the data.
 Selection with a database view is generally faster than access to individual tables.
 When selecting with views, you should also ensure that there are suitable indexes on
the tables contained in the view.
 The technical settings of a database view control whether the view data should be
buffered.
For more
info:https://help.sap.com/docs/SAP_NETWEAVER_700/12a2d87e6c531014bec0e63ea0208
c21/cf21ed06446011d189700000e8322d00.html
output
Projection Views
 Projection views are used to hide fields of a table.
 A projection view contains exactly one table.
 This can minimize interfaces; for example when you access the database, you only read and
write the field contents actually needed.
 cannot define selection conditions for projection views.
 There is no corresponding object in the database for a projection view. Access to a projection
view is mapped by the SAP System onto the corresponding access to its base table.
 It is also possible to access pooled tables or cluster tables with a projection view.
output
REPORTS

Based on the given input we will fetch [read or get] data from data base
and display in a predefined format.
Types of reports
1 classical report
2 interactive report
3 ALV report
Classical Reports
 A classic report is a program that generates a single list, which must contain all of the
required detail information

1) This procedure may result in extensive lists from which the user has to pick the
relevant data.
2) For background processing, this is the only possible method. After starting a
background job, there is no way of influencing the program.
3) The desired selections must be made beforehand and the list must provide detailed
information.
4) For dialog sessions, there are no such restrictions.
5) The user is present during the execution of the program and can control and
manipulate the program flow directly.
6) To be able to use all advantages of the online environment, classical reporting was
developed into interactive reporting.
Events

 Load of program
 Initialization
 at selection screen
 At selection on field
 At selection screen on output
 At selection on help request
 At selection on value request
 start of selection
 end of selection
 top of page
 end of page
CLASSICAL REPORT OUTPUT USING
ALL THE EVENTS
Selection screen Output Screen
Interactive Report:

 Interactive Report is one of the report where data is displayed in the


basic and also in the secondary list.
 Reports (lists) are displayed in a special container screen. On a normal
screen, a user action triggers the PAI event. In the screen flow logic, you
code a processing block that calls ABAP dialog modules in this event. In
list processing, the event is intercepted by the list processor and
processed. Instead of calling dialog modules, one of the three following
list events mat be called depending on the function code triggered by
the user.
 AT PF<nn>
 AT LINE-SELECTION
 AT USER-COMMAND
What are system fields for secondary lists?
 SY-LSIND Index of the list created during the current event (basic list = 0)
 SY-LISTI Index of the list level from which the event was triggered.
 SY-LILLI Absolute number of the line from which the event was triggered.
 SY-LISEL Contents of the line from which the event was triggered.
 SY-CUROW Position of the line in the window from which the event was triggered
(counting starts with 1)
 SY-CUCOL Position of the column in the window from which the event was triggered
(counting starts with 2).
 SY-CPAGE Page number of the first displayed page of the list from which the event was
triggered.
 SY-UCOMM Function code that triggered the event.
 SY-PFKEY Status of the displayed list.
Program : ZMG_IR_GET_CURSOR
ALV REPORTS
(Application list viewer)
ZMG_ALV_INTERACTIVE1

Output Screen Secondary screen


ALV report of car project
MODULARIZATION
Modularization

 What is Modularization?
Modularization is a technique where the code is divided into smaller
blocks
Advantages :
Reusability
Avoid redundancy
Modularization techniques

Mainly we have
1 Includes
2 Function Modules
3 Subroutines
Includes

 Includes are include(i) type of programs, which cannot excuted independently.

Syntax:
Include<Program_name>.

The include programs can be


Reusable
The include programs are mainly used for declartions
OUTPUT (ZMG_RP_INCULDE)
Function Group

 T code is Se80
 Function Group are the container for the Function Modules.
 Up to 99 function modules we can store in the function modules
 These function modules are stored in the INCLUDE L<fgrp>UXX
Function Modules
 Function Modules are created in SE37.
 Function modules are reusable components that are defined in the functional library
Tabs /Components
1 Attributes : general info
2 Import : the input parameter is declared
3 Export : the output parameter is declared
4 Changing : both input and output parameter are declared
5 Tables : for internal table
6 exceptions : to throw the error or exceptions
7 Source Code : where the logic is written
Subroutines

 A subroutine is a block of code introduced by FORM and concluded by


ENDFORM.
 T code is se38 in excuteable programs
 Syntax : FORM subroutine_name.
 “the code”
ENDFORM.
These are also called as formal parameters
To call the subroutine in the program
Syntax : PERFORM subroutine_name.
Subroutines

Types of Parameters in subroutines:


 USING: Input parameters.
 CHANGING: Input and output parameters.
 RETURNING: Return a value.
Types of subroutines
 Internal
 External
OUTPUT
SMARTFORMS

 Smart forms are used to design the business documents such as


invoices, purchase orders, sales orders. . . smart form is introduced from
4.6C version on wards.
 ‘SMARTFORMS’ is a transaction code
 When ever we activate the smart form it generates a function module.
Based on the function module we develop the print program.
Components of SMART FORMS: -
1. Smart form layout
2. Function Module
3. Print program
 Components of Smart form layout: -
1. Global settings
2. Pages and windows
Global settings is the collection of form attribute, form interface, global definitions.
Form attributes: - These are used to maintain the administrative information that is form
name, language, page format, default style.
Form Interface: - This is used to declare the variables, work areas and internal tables
which are needed to transfers the data from print program to layout
Global definition: - These are used to declare the variables, work area, internal tables
which are needed to implement the logic in the form or layout.
Types of window

 Main Window: It is used for the continues output such as table output
 Secondary Window: It is used for output with a fixed length
 Copy Window: It is also a kind of special secondary window which is
used for making pages as copy or original
 Final Window: It is a kind of special secondary window used for details
which are needed to be processed only at the end of processing form.
Upload the Logo

 Steps:
1 go to se78 t code.
2 Click on graphics
3 Click on import Button
4 upload the picture which is in the bitmap format
5 save and exit.
6 Goto smartforms and create a graphics within the window
7 Now set the resolution according to window
Types of Text

 Dynamic Text (D): This type is used to display fields dynamically,


meaning the text can change based on the data provided at
runtime. It's useful for displaying table types or structures.
 Text Element (E): This is the most common type, used to display
a single field value explicitly mentioned in the Smart Form.
 Include Text (I): This type is used to display standard texts that
are created in the T-CODE SO10. It allows you to include
predefined texts directly in your Smart Form.
 Text Module (M): This type is used to group multiple text
elements together, allowing for more complex text formatting
and organization within the Smart Form
Click icon to add picture

Invoice
Requirements

Extract the data from the VBAK and VBAP tables

Calculate the line total

Calculate the GST, Grand total.

What is done?

1 Inserted the logo at starting and in the footer

2 Create the required number of windows

3 Created the table by fetching the data from


the both tables
 According given
requirements the
invoice is crated
by using
smartforms.
Smartforms of project:

Requriements Output
DATA MIGRATION
TECHNIQUE
Data Migration

Data Migration is transferring the legacy data to SAP system.


To transfer the legacy data we should follow these steps:
 Extraction
 Converting the data
 Importing the data
 Verifying the data
Techniques:
1 BDC
2 Legacy
3 BAPI
BDC
(Batch Data Communication)
BDC

 BDC supports to transfer the data using the screens. To support this approach we should
record the process in SAP system using SHDB T-code.
 To upload the data we have to record the screen of the data creation of the same.
 To upload the data we use the ‘GUI_UPLOAD’ Function Module.
 To download the data we use the ‘GUI_DOWNLOAD’ Function Module.
Types
1 CALL TRANSACTION METHOD
2 SESSION METHOD.
Call transaction method

 Syntax :
Call transaction ‘T-CODE’ using internal_table mode ‘processing_mode’
update ‘update_mode’ message into msg_itab.
There is a structure which holds the data of BDC ‘BDCDATA’.
Function Module to store the message ‘Message_TEXT_BUILD’
Processing Modes :
A : All Screens which shows the screen by screen processing
N : No screen which dosnt shows any screens and shows the output.
E: Error which show the error if any screen have one in BDC
 Update Modes :
A: Asynchronous (Commit Work):
The called transaction does not wait for any update just process .
This results in the faster execution of the data transfer
S:Synchronous (Commit work and wait):
This will wait for update from the process, then the further will proceeded .
Comparatively slower.
Messages:
str : BDCMSG
output
Session Method

 The fuction modules used are :


1 BDC_OPEN_GROUP
2 BDC_INSERT
3 BDC_CLOSE_GROUP
In SM35 tcode we are going to process the data.
Rest of the data migration is same as the call transaction method.
Processing Modes:
1. Foreground 2.Display Errors only 3. Background
BAdi
(Business addins)
BAdi(Business Add-ins)
 BAdi is one of the type of enhancement which meaning follows the OOPs approach.
 Currently BAdi is advance approach in the SAP enhancement.
 Business Add Ins are Enhancements to the standard SAP code. These BAdi
Enhancement can be done with the Interfaces which contains various methods
(standard or customized). This Interface name is generated automatically and can be
changed as required.
Types of BAdi

 Classical BAdi
 Kernel BAdi
Kernel BAdi or New BAdi

 The new BADI is fully integrated into the Enhancement Framework.


 Enhancement Spot : It is a container for the kernel BAdi.
How to find the kernel BAdi

Setting the break points in the


CALL BADI OR GET BADI.
How to find the kernel badi(2)

 We can find the kernel BAdi in


se18
How to find BAdi(3)

 In se84 we can find the kernel


BAdi
Standard BAdi implementation

 Follow the steps to find the BAdi then create the new implementation for
the same BAdi and then create the class and specify the standard
definition name.
Difference between
Classical BAdi Kernel BAdi/New BAdi
 To find classical BAdi we use  To find the new BAdi we use
CL_EXITHANDLER and CALL_BADI or GET_BADI method.
GET_INSTANCE method.  Enhancement spot is container for new
 We don’t see any enhancement spot Badi.
 Multiple implementation at time is not  Can give the multiple implementation at
possible time
 We don’t get to see option like fall-back  We have fall-back class option
class
Converting from Classical to Kernel
BAdi
MPP
Module Pool Pragramming
MPP
 Module Pool Programming (MPP), also known as Dialog Programming, is used to create
custom interactive applications in SAP ABAP.
Components of Module Pool Programming:
 Screens: The graphical interface where users interact with the application.
 Flow Logic: Code that controls the sequence of events on screens (processed in PBO and
PAI modules).
 ABAP Code: Includes processing logic, typically written in FORM routines and called
within the flow logic.
 Transactions: Allow users to navigate to the module pool program.
Steps to Create a Module Pool
Program:
 Create a Program: Use transaction SE80 to create a new program of type
"Module Pool".
 Define Screens: Create screens within the program and design the layout using
the Screen Painter.
 Write Flow Logic: Define Process Before Output (PBO) and Process After Input
(PAI) logic for the screens.
 Write ABAP Code: Implement FORM routines that are called in the flow logic.
 Create Transactions: Use transaction SE93 to create a transaction code that
users can use to execute the module pool program.
Screen 2 ff
MPP Requriement
THANK YOU

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy