You are on page 1of 66

Internship Report

Name: Muhammad Waseem Rafi

Submission: 13th- September- 2017

Head of department: Junaid Aslam sb.

SAP(ABAP) Page 1
ABSTRACTION

This report is particularly for the ones who want to start learning the SAP system from the
beginning.

To understand the business demands in real world and to maintain the data and design reports
according to it.

To understand the complexes work in forms of programs and to amend them in to your
business requirement.

To discuss tables, reports and their types and use them according to your company’s demand.

Discussing graphical layouts in form of smart forms in SAP system and design according to your
need.

SAP(ABAP) Page 2
Table of Contents
ERP:.............................................................................................................................................................5
SAP System Architecture:............................................................................................................................5
Environment of the programs:....................................................................................................................6
Work Processes:..........................................................................................................................................7
ABAP Workbench:.......................................................................................................................................7
Data Dictionary:...........................................................................................................................................9
Creating a Table:..........................................................................................................................................9
Creating Fields:..........................................................................................................................................12
Technical Settings:.....................................................................................................................................15
Entering Records into Table:.....................................................................................................................17
Viewing the Table in the Database:...........................................................................................................18
Creating a Program:...................................................................................................................................19
Internal Tables:..........................................................................................................................................22
Standard Table:.........................................................................................................................................23
Sorted Table:.............................................................................................................................................23
Modularizing Programs:............................................................................................................................25
Events:.......................................................................................................................................................30
Selection Screen:.......................................................................................................................................30
ALV (Application List View) Report:...........................................................................................................33
ALV report with Join:.................................................................................................................................37
Table Differences:......................................................................................................................................43
Classical Reports:.......................................................................................................................................44
DynoPro:....................................................................................................................................................44
Operators in ABAP:....................................................................................................................................45
Case Control Structure:.............................................................................................................................45
Character Strings:......................................................................................................................................46
View:..........................................................................................................................................................48
Application Object:....................................................................................................................................48
SY-SUBRC:..................................................................................................................................................49

SAP(ABAP) Page 3
Smartforms:...............................................................................................................................................49
Architecture of Smartforms:......................................................................................................................49
Advantages of Smartforms:.......................................................................................................................50
Smartform Global Settings:........................................................................................................................56
Scenario:....................................................................................................................................................59
Transport Organizer:.................................................................................................................................60
Customization Request:.............................................................................................................................61
Search Help:..............................................................................................................................................64

SAP(ABAP) Page 4
ERP:
ERP is the most important of all things. It is the key to manage massive business all over the
world. Let’s look that what it is stand for, E stands for enterprise while R stands for resources and P
stands for planning. Together it is Enterprise Resource Planning. So it clearly says that it is business
resource planning. Examples can clearly things in a better way. Suppose market demands for a product
and they let the company know, company checks its inventory, if they have a stalk they’ll provide things
but what if they don’t have a stalk then they contact their production house, they again check their
spare parts and if they don’t have any spare parts they contact to vendor for the supply of spare parts.
Here one thing is important to know that all of the departments of an organization are interconnected.
So what ERP provides is easiness between them. It’s like a center between all of them, that whatever
the company demands or whatever the department demands. All of them should contact and give
report to ERP systems that manages all of their things.

In this way data is centralized and anyone can access that data within the company and to get the info
related to anything gets so much easy. ERP basically is a technique that one can avail to manage their
business needs. Based on this technique many softwares were made, the best of them are SAP, M1 and
OneSoft connect.
SAP:
 SAP stands for SYSTEM, APPLICATIONS and PRODUCTS.
 It’s software that is based on the technique of ERP systems that helps to manage business needs
and their business planning and helps them to execute in a reasonable way.
 This software was introduced in 1972 by the group of 5 people. Different versions of the software
had been introduced till now and the latest one is SAP R/3.

SAP(ABAP) Page 5
SAP System Architecture:
The new version of SAP R/3 software is 3-tier client/ server
architecture. The system of dividing into layering is to keep the work aligned.

 Presentation

 Application

 Database

Presentation:
 Presentation server is basically your desktop, SAPgui where you log on to the software. It is the
machine where it is installed.

Application:

 Application server is connected to presentation server.


 It is the main thing where you done all your work. It is where the application runs.
 The whole processing takes place here because it is the intermediate between database and
presentation server.
 When user demands a report or anything it completes the processing take data from the database
and send it to presentation server where the required data is shown to the user.

Database:
It is where all the data is stored in the form of tables. These data then send to application
server, which again send it to presentation server (The required data).

Environment of the programs:

SAP gives two types of programs.

 Reports

 DynoPro

Reports:

 The purpose of the reports is to read and extract data from the database.
 It consists of two screens.
 The first screen is a screen selection list and the other one is output screen.
 Whatever the user enters the credentials in the selection list. He’ll get the relative data in the output
list.
 Once you enter the selection parameters and execute, then they cannot stop the execution the
relevant data will be shown.

SAP(ABAP) Page 6
DynoPro:
 They are complex and dynamic in nature and the user can stop or intervene after the execution of
the program through dialogue screens.
 There are list of screens the user determines which to interact with.

Work Processes:
 Every program that runs on the SAP system which we also called Application Server is called the
work processes.
 They have nothing to do with the computer processes.
 They are the SAP application processes and whoever installs the system configure them in such a
way that it automatically sets work processes for the user.
 It automatically sets the connection to the database system.

Dispatcher:
 The purpose of dispatcher is to manage the work processes.
 As we know that unlimited users can connect to the SAP system but the work processes are limited
so what dispatcher does is to assign user work processes.

The Database Interface:


 It is also one of the most important phases.
 To have a connection with the database is the most important of all.
 There are two ways to read and write data through programs, OPEN SQL and NATIVE SQL.
 The ABAP statements called OPEN SQL can access any database whether its’ an oracle, Microsoft,
Google etc.
 In case of NATIVE SQL, you can access the data directly but its’ not a good practice also for this you
have to be known about the database that which database are you using. Is its’ oracle’s database or
any other.

ABAP Workbench:
ABAP Dictionary:
The ABAP dictionary is that allows you to the creation of the table, adding data into
them. Search for the tables. The transaction code for ABAP dictionary is SE11 or you can go under the
tools -> ABAP workbench -> Development -> ABAP dictionary.

ABAP Editor:
It’s an editor where you write all your ABAP statements, the logic building part. Its’
transaction code is SE38 or you can access it under the tools ->ABAP workbench -> Development ->
ABAP editor.

SAP(ABAP) Page 7
Function Builder:
It allows you to create and test new function modules. The main purpose of the
function builder is that it defines specific tasks that can be called from other programs too. Its’
transaction code SE37.

Menu Painter:
 It is used to create icons, buttons, and menu bar. Transaction input field. Its transaction code is
SE41.

Screen Painter:

 It’s transaction code SE51


 While the Menu Painter is used for building menu items, menu bars and so on, the next item on the
list is the Screen Painter.
 It allows you to define the user input screen.
 You can define text boxes, drop-down menus, list boxes, input fields, tabbed areas of the screen and
so on.
 It allows you to define the whole interface which the user will eventually use.

SAP(ABAP) Page 8
Data Dictionary:
This is the main tool so far in the SAP system.

 You can create table.


 You can add data to them.
 In the existing tables you can change them.
 In the building of tables you can check error throughout.
 Once these errors being removed, you can activate them.

Creating a Table:
 Its transaction code is SE38.
 Alternatively you can access it through under the tools -> ABAP Workbench -> Development ->
ABAP dictionary.

 Once its open you can create a new Database table or you can check also already made table.
 It is preferable that you write the table name with Z or Y. This shows that it’s your customized
table.
 Once you write table name in the database, click create button for further proceedings.

SAP(ABAP) Page 9
 After you hit the create button, the following screen will be shown.

The arrowed part is very important to look onto.

 Now you add the short description of the table.


 In the tab of delivery and Maintenance delivery class should be Application table (Master and
transaction data)
 The Data Browser/ Table View Maint. Should be Display /Maintenance Allowed.

SAP(ABAP) Page 10
 The other parts of Data browser are, which have limitations.

SAP(ABAP) Page 11
 Before doing any further task, go to the Option Go-to where you see Object Directory Entry
save the work as a Local object.

Creating Fields:
 Now you have to create fields.
 Go to the Fields tab and start making field or you can say that attributes of the table.
 Add a field Client and check key, add Data Element “MANDT” and hit enter.
 The Data type, Length and Decimals will fill automatically as they are standard.

 Now you can add other fields too.


 It’s not mandatory that fields you add should start with Z or Y. It can be any name with any
letter up to 16 characters.
 Now add Employee field.
 Add a Data Element, ZEENUM and hit enter.

SAP(ABAP) Page 12
 The error will be shown that it isn’t yet exist. If you try to hit activate button, it’ll show an error
message.

 For this double click on the ZEENUM, a window will appear.


 Now double click on the ZEENUM written in the Domain box, a pop up window will appear that
yet it doesn’t exist. Want you create it. Hit the tick button.

 When you double click on the ZEENUM written in the domain box, the new window will open.

SAP(ABAP) Page 13
 In the short text add Employee Domain.
 Choose the data type that you want to choose for this data domain.
 You can also edit number of characters and output length.
 In the value range tab you can add ranges, for single values and for the intervals; it is for the
domain range.
 For this table we left this part empty or in other meaning as it is.
 After this when you activate the table, a window will pop up.

 Click the green tick button by highlighting your table and after that the objects will be activated.

SAP(ABAP) Page 14
 Now press the escape button and in the Data Element table, add label fields in short, medium
and long input fields, add EMPLOYEE NUMBER in them. In short write in a short form because of
the limited characters.

 Now the Data element appears with its data type, length, decimals and short description.

 Now add surname and the data element ZSURNAME (Customized). As it starts with the letter Z,
so this isn’t standard too. You have to add Data Element same like ZEENUM. After this you add
Forename, Title and DOB which is date of birth.

SAP(ABAP) Page 15
Technical Settings:
 For creating the final database table. You have to do some technical settings.

 After that click on the data class and select APPL0 (Master Data, transparent tables).

 The most important data classes are,


 APPL0    Master data
 APPL1    Transaction data
 APPL2    Organizational and customizing data
 Master data is data which is frequently read, but rarely updated.
 Transaction data is data which is frequently updated.
 Organizational And customizing data is data which is defined when the system is initialized and
then rarely changed.
 There are two more data classes available, USR and USR1. These are reserved for user
developments. The tables assigned to these data classes are stored in a table space for user
developments.

 Now click on the class category and select 0 to 2,600. As we do not have much data records right
now.

SAP(ABAP) Page 16
 The remaining settings should remain as it is.

Entering Records into Table:


 For entering Record you need to go into utilities -> Table contents -> Create Entities.

SAP(ABAP) Page 17
 Now an input field will be shown. Enter the required data and save is with CTRL+S
 In the status bar, the following line will be shown “Record Saved Successfully”

Viewing the Table in the Database:


 After the data is saved now you can see the data through Utilities -> Table Content -> Display.
 Click on the button execute and the list will be shown.

SAP(ABAP) Page 18
Creating a Program:
 Click on the ABAP editor, a window will appear.
 Enter the program name and move further by clicking on the create button.

 A screen will pop up for setting the attributes of the program that you want to create.
 In the title box, enter the short description of the program.
 The type option should be EXECUTABLE PROGRAM, the status option should be TEST
PROGRAM and the application option should be BASIS.
 Leave other things as it is.
 Click on the tick icon.

SAP(ABAP) Page 19
 Editor window will open.
 Program name will be written with report word.
 This word is mandatory, just like class word in programming language.
 Write your program and execute it.
 The table you made and the values that you store in the table will be shown to you.

SAP(ABAP) Page 20
 You can further add more things to make your data better looking.
 Like using ULINE. To separate different data.
 You can use / to break a line and proceed to next line.
 .SKIP 1 skips the line. If you increase the number, skipping of lines will increase too.
 You can also declare variables in the program.

SAP(ABAP) Page 21
Internal Tables:
 The use of internal tables is used for storing and formatting during the runtime.
 There are two ways of using internal tables, an old method and a new method.
 Old method use header records while new method separate work areas.

Difference in old and new style:

Old Style New Style

 Header Record  Separate work area.

 The have restrictions like you cannot make  In this you can make multi-dimensional
multi-dimensional tables. tables, in the newer style.

 It’s an old method, not a good practice.  This method is preferable, it’s a good
practice.

 SAP system limits the size of internal tables to around 2GB.


 Best practice to use internal tables, as small as possible.
 Internal tables hold data and records.
 They hold calculations and results.
 Key fields also used in internal tables, which offers more flexibility and that means you can
access data more easily.

SAP(ABAP) Page 22
Types of Tables:

Three types of hashed tables in SAP are. (Standard table, Sorted table, Hashed table)

 The Hashed table required key.


 They are comparatively fast than standard table and Sorted table.
 The standard table and sorted table worked through the index or through unique key as well.

Standard Table:
 As previously mentioned above they can work with key as well as index.
 There will be difficulty in accessing records when you have very large standard tables.
 You cannot define keys in the standard table, means that you can come across with many
repeated data throughout the table.
 Data fills quickly into the table.
 Writing data fast but reading data slow.
 Linear search approach.
 They contain duplicate entries due to index approach.
 Commonly used in SAP system.

Sorted Table:
 Unique can be defined into the tables.
 Removes data duplication issue.
 Write slower but reading fast.
 It has a binary approach.
 The data can be accessed via keys or index.
 In this table finding records is much quicker than standard tables, using keys.
 It sorts records into specific sequence.
 Preferable as compared to standard tables.

Hashed Table:
 Data cannot access through index, only keys will be used to access data.
 They are the fastest in accessing data and writing data..
 Preferable when you are creating tables with very large data.
 They use hash algorithm for the fast access of data.
 Duplicated entries are not inserted.
 Due to no duplication, resembles to original database.

Creating standard and sorted tables:

 For creating internal tables. Make a program in the ABAP editor.


 In my case it’s already made with the name ZBA_EMPLOYEE_LIST_03.

SAP(ABAP) Page 23
 In the line 14, Data is represents the creation of table.
 BEGIN OF declares table name, while OCCURS says that the table is being created and 0 says
that initially it will contain no record.
 Like statement declares field name in the internal tables.
 MOVE-CORRESPONDING means that the data is being transferred from database table to the
internal table fields.
 WRITE statement shows the results.

Creating internal table with separate work:

 Instead of using DATA, we use TYPES as it defines only line type.


 BEGIN OF statement with the line name says that the line starts.

SAP(ABAP) Page 24
 You can define table type too but not table itself.

 This is for sorted table.

 After table type is defined we declare table

 After the table declaration we define work area.

Modularizing Programs:
 Dividing a program into separate sub programs.
 It’s a separate component of software.
 It allows multiple users to work on different modules of the same program at a time.
 This module provides the facility to also integrate separate sub parts of the programs.
 Object-Oriented in nature.
 You can also debug separate sub programs.
 You can create include programs.
 Use se38 program creating window will be shown to you.
 Enter a program name zba_emplyee_Definition and use it in zba_mod_1.

SAP(ABAP) Page 25
SAP(ABAP) Page 26
 PERFORM statement is being used to perform sub routines.

SAP(ABAP) Page 27
 Now open the functional builder by pressing the Transaction code SE37.
 Enter *amount* in the functional module tab.
 You will witness many functional modules.
 Enter Spell_Amount and hit display button.

 The attribute tab has some info about processing type.


 Also it has some descriptive text.
 It also contains some general data.
 Import tab has the fields that are passed into the functional module.

SAP(ABAP) Page 28
 Once the code has been processed it is sent back to the calling program.
 The list field which can be changed by a functional module.

 If you execute it, the following fields will be shown uppercase/lowercase checkbox doesn’t
matter here.
 If you add the amount in the amount field the following In_Words field will translate that
amount into words.

Events:
 Events are processing blocks.
 To use them, one must have to use the key word.

SAP(ABAP) Page 29
 They do not have a special ending when the other code comes, it automatically gets finished.
 A diagram will elaborate everything.

 This is basically the flow of data in the SAP. That is how the data flows and what things are
shown on the selection screen.
 Everything is clearly explainable in the graphical representation.

Selection Screen:
 For creating selection screen, make a program ZBA_SCREENS_1.

 Add table ZBA_EMPLOYEE.


 Initialization is for the start of event.
 12th line shows that the field is being created and it has a last employee number.
 By WRITE command you can check that the WA_EMPLOYEE has the last employee number of
ZBA_EMPLOYEE.

SAP(ABAP) Page 30
 In the graphical representation of code, things are pretty clear.
 You can declare a new variable in the selection screen as well.
 You can also use checkboxes and radio buttons.

 Selection option is a complex selection.


 It will fetch data from the database.
 It’s an internal standard table.
 It gives ranges then, you can choose ranges.
 No-extension limits the multiple selections of data.

SAP(ABAP) Page 31
 `Text Elements are used to store texts displayed on the selection screen or output screen.
 These are not hard coded.

 When the selection field is filled there is an option to save data, the option is called variant.
 You can save it.
 This is for long purpose as you can do multiple options in the variant.
 You can limitize your information as well so that in future you won’t change it.

 Further you can modify, clear and refresh data according to you needs
 Here it is important to let people know that there is a difference between modify and update.

Modify Update

 In modify you can modify the existing data  In update you can only modify the existing
or if data’s not there you can add it to. data.

ALV (Application List View) Report:


 For Creating an ALV report.
 Create a new program.
 Add tables to be used.
 Type of ALV.

SAP(ABAP) Page 32
 Data declaration part.
 Make internal table.
 Selection option from which required data to be shown.
 SELECT query according to the requirement.

 Perform statements are used to perform sub-routines.


 The next picture will explain things in a better way.

SAP(ABAP) Page 33
The difference between Append and Insert is,

Append Insert

 This command inserts records at the end  This command inserts records at the given
of the line. line.

Refresh Clear

 Refresh clear all the contents of the  While clear delete the header line.
internal table.

SAP(ABAP) Page 34
 They both are same except refresh release memory of internal tables also from the system.
 For layout and its column width the code is given in the picture.

SAP(ABAP) Page 35
 Passing info to the internal table to be displayed as the output.
 It is also passing the structure of ALV report.
 REUSE_ALV_COMMENTERY_WRITE used to write on the grid, it’s a list body comment block.
 The last block runs once for every run of the ALV listing. It basically sets the okay-code.

SAP(ABAP) Page 36
Why we use ALV reports?

 Enhance readability and functionality.


 Use functional modules instead of write statement for displaying output.
 Can be used for sub reports as well.
 Also adjust columns exceeding than 255 per column.
 Can contain up to 90 columns in a display.
 It has two models list and grid.
 Reduces time and cost.
 Future enhancements are minimized.

ALV report with Join:


 This is the report where I used Inner join the rest of the thing is same.
 As far as I researched and experimented, FULL OUTER JOIN is not supported in SAP while LEFT
and RIGHT are supported though.

SAP(ABAP) Page 37
SAP(ABAP) Page 38
SAP(ABAP) Page 39
SAP(ABAP) Page 40
SAP(ABAP) Page 41
SAP(ABAP) Page 42
Table Differences:
Pooled Tables Clustered Tables Transparent Tables

 Logical table.  Indexes are schema  One to one relationship.


objects.

 Must be assign to table  They contain entry for  When one transparent is
pool. each indexed row and being created then one
are called clustered table is created in the
table. database.

 Store control data.  Their logical structure  Used to hold application


match with the physical data.
structure.

 Many to one  Must be assigned to


relationship. cluster table.

 Several pooled table can  Used to store temporary


be combined in a table data also.
pool.

 After these data then  Many to one


sorted into common relationship.
tables.

SAP(ABAP) Page 43
Note: Schema object are logical data storage structure.

Non-Cluster Tables: The major difference is that logical structure doesn’t match with the physical
structure.

Classical Reports:
 Simplest way of showing reports.
 Only one screen list for output.
 Outputs are being showed through write statements in the LOOP.
 These reports do not have sub reports.
 Takes much time in coding.
 In this we have to set each line in the repot.
 Contain few columns as compared to ALV.

Their structure is really easy. It has only four steps.

 Initialization.
 At selection screen.
 Start of selection and End of selection.
 Select statement for displaying the report.

They are only preferable when you have FI reports to deal with because they are too very complex to
deal with.

DynoPro:
 Dynamic programs concept are being used in module pool programming.
 This concept is also referred as screen programming.

It contains two things.

 Screen and flow logic.


 The concept of screen can be taken as all the things that are shown on the screen, their
designing, boxes, buttons and many more are considered in the screen part.
 The flow logic is the flow of data when you press the button, what will be next?
 How steps shows the moving of data.

SAP(ABAP) Page 44
Operators in ABAP:
 ABAP follow following operators. All of which are been used in the previous programs except
one. The names of the operators are.
 IF STATEMENT.
 IF ELSE STATEMENT.
 IF ELSEIF ELSE STATEMENT.
 CASE control structure. (New)

Case Control Structure:


 Processing is specified after CASE.
 The individual processing branches are introduced by WHEN followed by the value to be tested.
 The entire block is concluded by ENDCASE.
 The structure of the CASE statement is as follows

 After execution the code will give the following result, according to what we placed in the
surname.

SAP(ABAP) Page 45
Character Strings:
 There are two types of data types for the strings.
 TYPE N
 TYPE C
 Type C means that the type is character.
 Type N means that the type is numeric character.
 The declaration and initialization will be shown in the picture given below.

 This concatenation statement is used to concatenate two different fields.


 Sep type is used to give spaces by (1) default. If you want more spaces then you can add more.
 You can search particularly anything.

 You can replace data too.

 Sy-subrc, which identifies whether the search was successful or not.


 The second is Sy-fdpos, which, if the search is successful, is set to the position of the character
string searched.

 In the same way you can shift data as well.


 If you want the shifted data back then you can CIRCULAR statement to get all the data back.
 Split statement is used to split the data of the field into two or more fields.

SAP(ABAP) Page 46
 You can add data into subfields too. Means that you can point data to the position as well in the
field that you have declared.

 For the above code you can execute and see how this is working.

 Just examine the code and you will get to know how it is working.

SAP(ABAP) Page 47
View:

 A View acts like a database table only.


 It will not occupy storage space.
 A view acts similar to a virtual table, table that does not have any physical existence.
 A view is created by combining the data of one or more tables containing information about an
application object.
 Using views, you can represent a subset of the data contained in a table or you can join
multiple tables into a single virtual table.
 Data related to an application object is distributed among multiple tables by using database
views.
 They use the inner join condition to join the data of different tables.
 A maintenance view is used to display and modify the data stored in an application object.
 Every maintenance view has a maintenance status associated with it.
 We use projection view to mask unwanted fields and display only relevant fields in a table.
 Projection views must be defined over a single transparent table.
 A projection view contains exactly one table. We can't define selection conditions for
projection views.

Application Object:

 An object in the application system that maps a complex process or part of a process that is
relevant to supply chain event management (SCEM-relevant).
 You or a system can report events to an application object.

SAP(ABAP) Page 48
SY-SUBRC:
SY-SUBRC is a system component which contains return value which is set by ABAP statements. The
return value (an integer value like 0, 4, 8) is used to determine the execution status (successful, error,
warning and among others) of an ABAP statement.

 SY-SUBRC = 0 Source code table is not empty, contains no errors and is broken down into
tokens.
 SY-SUBRC = 1 Source code table is not empty and is broken down into tokens, but at least one
include program does not exist (can occur only in connection with the addition WITH INCLUDES).
 SY-SUBRC = 2 Source code table itab1 is empty or a blank line range was selected (applies to the
additions FROM and TO).
 SY-SUBRC = 4 Scanner detects error in source code.

 SY-SUBRC = 8 other error or RABAX (occurred on server side, error when calling web service) in
scanner.

Smartforms:
 Its transaction code is Smartforms.
 Use to implement Smart forms layout.
 Efficient way of designing layouts.
 You can design multiple layouts which SAP scripts won’t offer you.
 Routines can be written in Smartforms tool.

Architecture of Smartforms:
 The graphical representation gives a broad view of SAP smartforms.

SAP(ABAP) Page 49
 The three layered explains things clearly that how the data is retrieved? How it is use in ABAP
function module? And how it is send it to for printing purpose.
 The layout of data that is on the paper.

Advantages of Smartforms:
 They  help in making of forms without any programming knowledge due to graphical user
interface
 When activating the smart form the system automatically generates the function module and
at the runtime in forms of numbers (integers).
 To make any changes we have to use the Drag & Drop, Cut & Paste.
 Web Publishing is possible using the generated XML output.

Creating a Smartform:

 Open a smart form session with ‘smartforms’.


 Enter form and hit create button.
 If it’s made already then you can click on the display or change.

 After that you will enter into the following screen.

SAP(ABAP) Page 50
 Expand ‘PAGE_FIRST’ that is on the left side of the window and create a new text in the main
window.

 Now execute the through F8.


 A Functional module is generated.

(Remember: A functional module is always generated whenever a smartform is activated.)

 Further Execution through F8 leads you to the following.

SAP(ABAP) Page 51
 If you want to call functional module of the smartform we will use following program
mentioned below, which will give the same result as above.

SAP(ABAP) Page 52
 You can upload a file too.
 Use SE78 as your transaction code for graphics.
 Here by expanding the graphics option you upload the file.
 Sets its name and description and the type if it’s colored or black and white.

SAP(ABAP) Page 53
 Hit the save button and exit from the current session.
 Enter again into ‘Smartforms’ and create a new smart form and in the main window create a
new graphics and add the same as you mentioned during upload.

 After execution, you will get your desire file shown on your print screen as given below.

SAP(ABAP) Page 54
SAP(ABAP) Page 55
Smartform Global Settings:
 Go to transaction SMARTFORMS.
 Give a name to your form, with naming convention Y or Z.
 Press CREATE button.
 This will take you to SAP form builder screen.
 In the right hand side you can see a tree structure which contains Global settings, Pages and
windows   which are automatically created.
 Global settings node consists of, 
  Form Attributes
 Form Interface
 Global Definitions
 Pages and windows node consists of,
 First page
 Main window which are automatically created.
 FORM ATTRIBUTES  you have two tab pages 
 General Attributes
 Output options

 For form Interface.

SAP(ABAP) Page 56
 For Global definitions.
 Creating Form Routines in SAP Smartform documents help ABAP developers who are working with
SAP Smartforms documents keep their ABAP codes clean and create reusable form routines that can
be called within Smartforms.

 Conditions in the text or code in smartforms. Refers to some condition that you want to use and you
get the data according to it.
 It contains variables not from the internal tables.
 In this you add the variable apply the condition and then the value to which you want a
comparison with.

SAP(ABAP) Page 57
 The list of operators are,

SAP(ABAP) Page 58
Scenario:
Let us take a simple scenario of passing Material Number and Material description from Driver program
to the Smart Form.

 Create a smartform in the smartform session.


 In the form interface introduce fields as shown in the picture below.
 Create a text window in the main window.
 Insert the fields that you want to use through insert field option..
 Add them on the text with ‘&’ on the start and on the end. This basically refers to a field.
 After executing you get your desired output.

SAP(ABAP) Page 59
Transport Organizer:
 In the framework of the Change and Transport System (CTS), the Transport Organizer is a tool for
managing the objects that gather the changes carried on during the development and
configuration phases, and for transporting (i.e. copying) them to qualification system first, and then
to production system.
 The two kinds of objects used in the CTS are the Request and the Task.
 The Request is the main container, which contains zero to any number of Tasks. The CTS
automatically creates one task for each user who adds objects to the Request. In fact the objects are
added in the task itself.
 When you want to transport the Request, you have to first release all the tasks of the request, and
then the request itself. When it is released, the transport is done automatically or manually by the
administrator. The transport goes towards the systems and clients defined in the transport routes.
 SE09 and SE10 search/transport requests by user.
 STMS (SAP Transport Management System) to configure transport routes.
 For transport organizer the graphical representation is,

Request type:
 Customizing requests.
 Workbench requests.
 Transport of copies.
 Relocations.

SAP(ABAP) Page 60
Customization Request:
 When you create Customizing requests, the transport target is automatically assigned the standard
transport layer by the SAP system.
 A transport layer identifies the route that transportable dev. objects must follow. Typically in your
system you will have two layers.
 A layer usually called Zxxx (with xxx = SID of your development system) is used for your own
developments. Another layer called "SAP" is used for transporting SAP objects.
 There are local and transportable Workbench requests,
 There are three types of relocation.
 Relocations without package change (Move original location of the object to the target system).
 Relocation with package change (Easy transferable, you can change the original object location and
re-assign it to appropriate system).
 Relocation of completely packages (You can completely change the package).

 After display button.


 Copy the request number.
 And then go to the transaction ‘STMS’.

SAP(ABAP) Page 61
 The following screen will be appearing after this.

 Click on the truck icon, you will get the three import queues.

SAP(ABAP) Page 62
 Now double click on the QAS.
 You will enter into the system.
 Where you get the list of the reports that has been released to QAS server.
 The green shows that the required request is completed while the yellow sign shows that the
request is ready for import again.

SAP(ABAP) Page 63
Search Help:
 Search helps are objects that you can use to assign input help (F4 Help) to screen fields.
 You can do this by creating a search help in the ABAP Dictionary and attaching it to the
corresponding screen field.

 Give the name of the table.


 Give the fields of the table.
 Also give the data elements of the fields.
 The tab next to data elements checks whether you enter the data element matches with the actual
data element or not (checks it).
 Import and Export tabs should be checked too.

SAP(ABAP) Page 64
 Other things will be set by default.
 Save it.
 Check it.
 Activate it.
 Then execute.

 After the execution, the following screen will be appearing.

SAP(ABAP) Page 65
 Then you get your desired result.

SAP(ABAP) Page 66

You might also like