abap interview questions

W
Shared by: LBY2ks
Categories
Tags
-
Stats
views:
89
posted:
11/8/2011
language:
English
pages:
427
Document Sample
scope of work template
							ABAP Interview Questions & Answers

Set 1

1. What is an ABAP data dictionary? - ABAP 4 data dictionary describes the logical structures of the
objects used in application development and shows how they are mapped to the

underlying relational database in tables/views.

2. What are domains and data element? - Domains: Domain is the central object for describing the
technical characteristics of an attribute of an business objects. It describes the value

range of the field. Data Element: It is used to describe the semantic definition of the table fields like
description the field. Data element describes how a field can be displayed to end-user.

3. What is foreign key relationship? - A relationship which can be defined between tables and must be
explicitly defined at field level. Foreign keys are used to ensure the consistency of

data. Data entered should be checked against existing data to ensure that there are now contradictions.
While defining foreign key relationship cardinality has to be specified. Cardinality

mentions how many dependent records or how referenced records are possible.

4. Describe data classes.- Master data: It is the data which is seldom changed. Transaction data: It is the
data which is often changed. Organization data: It is a customizing data which is

entered in the system when the system is configured and is then rarely changed. System data: It is the
data which R/3 system needs for itself.

5. What are indexes? - Indexes are described as a copy of a database table reduced to specific fields.
This data exists in sorted form. This sorting form eases fast access to the field of the

tables. In order that other fields are also read, a pointer to the associated record of the actual table is
included in the index. The indexes are activated along with the table and are created

automatically with it in the database.




6. Difference between transparent tables and pooled tables. - Transparent tables: Transparent tables in
the dictionary have a one-to-one relation with the table in database. Its
structure corresponds to single database field. Table in the database has the same name as in the
dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the

dictionary have a many-to-one relation with the table in database. Table in the database has the
different name as in the dictionary. Pooled table are stored in table pool at the database

level.

7. What is an ABAP/4 Query? - ABAP/4 Query is a powerful tool to generate simple reports without any
coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is

the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists:
For analytical reports. - For creating a ABAP/4 Query, programmer has to create

user group and a functional group. Functional group can be created using with or without logical
database table. Finally, assign user group to functional group. Finally, create a query on the

functional group generated.

8. What is BDC programming? - Transferring of large/external/legacy data into SAP system using Batch
Input programming. Batch input is a automatic procedure referred to as

BDC(Batch Data Communications).The central component of the transfer is a queue file which receives
the data vie a batch input programs and groups associated data into “sessions”.

9. What are the functional modules used in sequence in BDC? - These are the 3 functional modules
which are used in a sequence to perform a data transfer successfully using BDC

programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are
specified in this functional modules. BDC_INSERT - It is used to insert the data for

one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.

10. What are internal tables? - Internal tables are a standard data type object which exists only during
the runtime of the program. They are used to perform table calculations on subsets of

database tables and for re-organizing the contents of database tables according to users need.




11. What is ITS? What are the merits of ITS? - ITS is a Internet Transaction Server. ITS forms an interface
between HTTP server and R/3 system, which converts screen provided data by
the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be
developed and tested in R/3 system. All transaction components, including those

used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of
automatic language processing in the R/3 system can be utilized to languagedependent HTML
documents at runtime.

12. What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the
associated flow logic Screen is also called as DynPro.



13. What are screen painter and menu painter? - Screen painter: Screen painter is a tool to design and
maintain screen and its elements. It allows user to create GUI screens for the

transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu
painter: Menu painter is a tool to design the interface components. Status, menu

bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen
painter and menu painter both are the graphical interface of an ABAP/4 application.

14. What are the components of SAP scripts? - SAP scripts is a word processing tool of SAP which has the
following components: Standard text. It is like a standard normal document.

Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats,
Character formats. Creating forms in the R/3 system. Every layout set consists of

Header, paragraph, and character string. ABAP/4 program.

15. What is ALV programming in ABAP? When is this grid used in ABAP? - ALV is Application List viewer.
Sap provides a set of ALV (ABAP LIST VIEWER) function modules which

can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the
readability and functionality of any report output. Cases arise in sap when the output

of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV
functions can help choose selected columns and arrange the different columns

from a report output and also save different variants for report display. This is a very efficient tool for
dynamically sorting and arranging the columns from a report output. The report

output can contain up to 90 columns in the display with the wide array of display options.

16. What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-
of-selection, top-of-page, end-of-page, At line-selection, At user-command, At

PF, Get, At New, At LAST, AT END, AT FIRST.
17. What is CTS and what do you know about it?- The Change and Transport System (CTS) is a tool that
helps you to organize development projects in the ABAP Workbench and in

Customizing, and then transport the changes between the SAP Systems and clients in your system
landscape. This documentation provides you with an overview of how to manage changes

with the CTS and essential information on setting up your system and client landscape and deciding on a
transport strategy. Read and follow this documentation when planning your

development project.

18. What are logical databases? What are the advantages/ dis-advantages of logical databases? - To read
data from a database tables we use logical database. A logical database

provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i) check
functions which check that user input is complete, correct, and plausible. ii) Meaningful

data selection. iii) Central authorization checks for database accesses. iv)good read access performance
while retaining the hierarchical data view determined by the application logic. dis

advantages: i)If you do not specify a logical database in the program attributes, the GET events never
occur. ii)There is no ENDGET command, so the code block associated with an event

ends with the next event statement (such as another GET or an END-OF-SELECTION).

19. What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal
table and database table. Data along with the action is stored in session ie data for

screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

20. How to upload data using CATT? - These are the steps to be followed to upload data through CATT:
Creation of the CATT test case & recording the sample data input. Download of the

source file template. Modification of the source file. Upload of the data from the source file.

21. What is Smart Forms? - Smart Forms allows you to create forms using a graphical design tool with
robust functionality, color, and more. Additionally, all new forms developed at SAP

will be created with the new Smart Form solution.



22. How can I make a differentiation between dependent and independent data? - Client dependent or
independent transfer requirements include client specific or cross client

objects in the change requests. Workbench objects like SAPScript are client specific; some entries in
customizing are client independent. If you display the object list for one change request,
and then for each object the object attributes, you will find the flag client specific. If one object in the
task list has this flag on, then that transport will be client dependent.http://abap-tutorials.com 2010

23. What is the difference between macro and subroutine? - Macros can only be used in the program
they are defined in and only after the definition are expanded at compilation /

generation. Subroutines (FORM) can be called from both the program they are defined in and other
programs. A MACRO is more or less an abbreviation for some lines of code that are used

more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is
(more or less) a subroutine that is called external. Since debugging a MACRO is not

really possible, prevent the use of them (I’ve never used them, but seen them in action). If the
subroutine is used only local (called internal) use a FORM. If the subroutine is called external

(used by more than one program) use a FUNCTION.




ABAP Interview Questions & Answers

Set 2

http://abap-tutorials.comhttp://abap-tutorials.com 2010
Q: Is there any standard SAP report which gives a count of the number of times a program is executed?

A: Try transaction STAT

Q: When we create a customer the information is updated in structure RF02D and the some tables like
KNA1 are updated. How can we find the tables for master data transactions?

A: Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> follow the customizing based
tree for your application. Double click on a lowest hierarchy level to get for the correct

marked development class. Here you can find all the tables, views, logical databases etc. used for a
system operation.

Q: How can we use CAD with SAP ?

A: Third party tools from Eigner + Partner provide interfaces to SAP. Another third party software -
Fastlook Plus from Kamel Software enables you to view all of the Autocad formats.

Q: How can I access SAP through Internet?

A: SAP has its own Internet transaction Server (ITS) . Other products include Haht, WebObjects,
NetDynamics etc. Each product has its' own architecture.

However to access the database, access paths SAP GUI or RFC Channel have to be used.

Q: How can we transport the standard text?

A: Refer note 3355 in OSS for a complete explanation. The SAPscript objects that should be transported
must be written in a transport request.

The entries are as follows:

R3TR FORM NAME (NAME = Name of the layout set)

R3TR STYL NAME (NAME = Name of the style)

R3TR TEXT OBJECT,NAME,ID,L

(OBJECT = Text object, NAME = Text name, ID = Text ID, L = Text language)

If you want to transport a number of texts, you can use report RSTXTRAN to insert the individual text
keys into a correction. The transport request must be entered and released via the

transport system.

Q: How to find what transactions a particular user was running for a given period in the past (Eg: from 1

st
of a month )

A: You may use the transaction - STAT.

Q: We want protect/lock a field so that only selected people can change the value while others can only
read. How to set the authorizations?

A: Create an authorization object for change mode. Loop at screen in the user exit and set input to 0.
Check the user based on sy-uname and the authorization. Decide whether input should

be 0 or 1.

Q: How to lock an user defined transaction for some time during which no user can access the same?

A: Use transaction SM01. Scroll through the transactions and check against the transaction to be locked.
And after the maintenance is over, go back to SM01 and uncheck the same to

unlock.

BDC

Q: Our ABAP program is working properly in Foreground. Can I schedule it for background processing on
the weekend?

A: SAP standard program RSBDCSUB helps you to schedule the job. Create a variant for RSBDCSUB with
the BDC session name.

Q: How can we send a mail to the user intimating him that his report/BDC is completed in background?

A: You can use FUNCTION RS_SEND_MAIL_FOR_SPOOLLIST

If Unix is being used, you may send a report to any internet mail with the following:

REPORT ZSNDMAIL .

DATA: COMND(200) type c.

DATA: RESULT(200) type c occurs 100 with header line.

PARAMETERS: FILE(60) type c lower case default '/sapdata/sd_outbound/testmail.dat'.

PARAMETERS: SUBJECT(60) type c lower case.

PARAMETERS: EMAIL(60) type c lower case.

INITIALIZATION.

TRansLATE EMAIL TO LOWER CASE.
START-OF-SELECTION.

TRansLATE EMAIL TO LOWER CASE.

CONCATENATE 'cat' FILE '| elm -s &Quot;' subject '&Quot;' email into comnd seperated by space.

CALL 'SYSTEM' ID 'COMMAND' FIELD comnd 'TAB' FIELD UNIX_RESULTS-*SYS*.

Loop at Results.

write: /1 results.

endloop

end-of-selection.

SAPScript

Q: We get the total number of pages as expected by using 'SAPSCRIPT-FORMPAGES' in a duplex layout.
In our case duplex case is always 'Terms & Conditions'. We do not want the number

of pages as in duplex printing. What is the best possible solution?

A: On the Terms & Conditions page, Change the Page counter mode to 'HOLD' to keep the page counter
from incrementing when you print the Term & Conditions.

Q: Can I Print a logo on an Invoice?

A: Save a Logo using Paintshop Pro or Corel Draw as Tiff file. Use RSTXLDMC to convert the logo to
standard text in SapScript. When the program is executed, the path and file name have

to be correctly specified.

Process could be like the following:

Run RSTXLDMC

Enter file name C:\MAIL\COMPLOGO.TIF

Resolution for Tiff file

Absolute X-position

Absolute Y-position

Absolute positioning

Reserved height

Shift to right
UOM = CM

Text title

Line width for text = 132

Text name ZHEX-MACRO-COMPLOGO

Text ID ST

Text language = E

Postscript scalinghttp://abap-tutorials.com 2010

Width & Height according to PS scaling

Number of Tiff gray levels (2,4,9) 2

Then Create a new window 'COMP' with attributes;

Window COMP description Company Logo

Window type CONST

Left margin 7.00 CH window width 10.00 CH

Upper margin LN window height 8.00 LN

Finally in the text element , mention

/: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.

Please note that if object name is not indicated as 'ZHEX...', the logo may not be printed!

You will not be able to see the logo in a test print. The same will be printed in actual printout.

If you are using two logos in the same layout, the names of the logos should be unique. Say 'ZHEX-
MACRO-LOGO1' and 'ZHEX-MACRO-LOGO2'. Else all the information will be overwritten.

If the logo is not EXACTLY TIFF 6.0 , the same will not be printed.

See OSS notes 5995, 18045, 39031 for some inputs.

RFC

Q: We want to move a SAP table to an Access table using TABLE_EXPORT_TO_MSACCESS_RFC

Importing parameters are

DBNAME
DEST

FLG_APPEND

FLG_POPUP

LANGU

The table has three columns:

TABNAM

MANDT

SDATA

We have no Exporting parameters.

How shall we set the parameters?

A: Install the PS utilities, which are part of SAPGUI install CD. You may run report RIACCESS from SE38.
Go to SALE -> Communication -> Define RFC Destination. Setup two RFC

destinations PS_ACCESS_1 and PS_ACCESS_2 and will have to get them to point to wdpsastr.exe and
wdpsatab.exe respectively. Then execute RIACCESS and choose PS_ACCESS_1 to

generate access tables. Please note that Access only supports tables with up 255 fields.

Q: We want an RFC do the following transactions - MB1A, MB1C,>MB01 (goods receipt/issue).

A: Call the RFC INBOUND_IDOC_PROCESS with IDOC_CONTROL and IDOC_DATA. The structure in the
field sdata in the IDOC_DATA are e1mbxyh and e1mbxyi.

Transports

Q: In a Dev instance, we want to transport a modification to a layout set from one client to another.
What is the best way?

A: use transaction SE71. Choose Utilities->Copy from Client. Layout sets need not be transported
between clients , via transport requests DEVKxxxxxx.

Q: We need to keep track of the transports that need to flow through to other systems (ie, DEV, TST,
TRN, PRD etc). Is there a way do this?

A: SAPCRAFT enables you to control the CTS from DEV system. This keeps track of all transports at all
stages and enables you to allocate Import, export and Authorization functions to

specific user.
Tables

Q: We specify the logical database. And we want a field that is not present in any of the tables defaulted
in logical database. How can we want to add this additional field from a different

table?

A: . Presume you have a

logical database

table 1

table 2

table 3

Define the required field as additional field say fld of table 1, table 2 or table 3

and then in the code section define.

Perform get_f1d(zxxxxxxx) using f1d.

Form zxxxxxxx could be like;

Form get_f1d using f.

Select * from where 'conditions'

f = table4 - f1d.

Q:We need to download an internal table to the Presentation Server(local workstation). Whenever we
run the program, the same file has to be saved as a separate file in sequential order.

Ex: 0001.txt, 0002.txt etc. Where can we store the last file number?

A: SAP has a table TVARV for storing the variants.

A record may be created in TVARV for all the programs that require this kind of incremental records.

For Ex: the record could be 100Zmm10001 MM sequence rec where first part consists of client code and
the program being run. Client code is required because TVARV does not has a field

for client code. The second part is the description indicating the purpose what the record is created. This
entire string may be posted in the Name field (char - 30).

The Type field ( char- 1) may be populated with P or S (Parameter or Selection)
Low field (char- 45) may be populated with '0001' when run first time and increment it by one in your
program for downloading of the internal table.

Batch input / Direct input

Q: We are calling transaction VL01 in batch input to create deliveries using a program for delivery due
list. How ever we areunable to create deliveries for transport stock orders. Why?

A: Batch-inputs cannot be used to fill the &Quot;delivery due list&Quot; screen because it is not a
dynpro. This is a standard SAP report. A SAP report (check with &Quot;System ->

Status&Quot;) may be called using SUBMIT sentence with the appropriate options . It is preferred to call
a report than create a Batch-input program.

Q: What are some sample Direct input data transfer programs?

A: In MM for Material Master data - RMDATIND

FI - for Accounting Documents - RFBIBL00

PP - for Independent requirements - RM06IN00

CA - for Classification data - RCCLBI03




ABAP Interview Questions & Answers

Set 3

http://abap-tutorials.comhttp://abap-tutorials.com 2010
Q1. Which one of the following commands is used in drill-down reporting?

A. END-OF-PAGE

B. LEAVE SCREEN

C. MODULE SET_SCREEN

D. ON VALUE-REQUEST

E. AT LINE-SELECTION

ANS._______________________

Q2. Which INCLUDE contains standard

subroutines used in BDC programs?

1.      BDCRSSUB

2.      RSSUBBDC

3. BDCRECXX

4. RSBDCJOB

ANS._______________________




Q3. Table zinfo Entries:

Id      name       http://abap-tutorials.com 2010

sales     sales2
Field Type

C      C      P    P

a1      Smith

100.00        50.00

a1

Jones      100.00      50.00

a2      Bob       100.00

50.00

a3      Bob

100.00        50.00

a4

Mike       100.00      50.00

a5      Mary       100.00

50.00

a5      Mary

100.00        50.00http://abap-tutorials.com 2010

Using the above information, what is the result of

the following code?

Loop at zinfo.

At new name.

Sum.

Write: /

zinfo-id, zinfo-name, zinfo-sales.

Endat.

Endloop.
1.   a1 Smith 100.00

a1 Jones 100.00

a2 Bob 200.00

a4 Mike 100.00

a5 Mary 100.00

2.   a1 Jones 200.00

a2 Bob 200.00

a4 Mike 100.00

a5 Mary 100.00 http://abap-tutorials.com 2010

a5 Mary

100.00

3.   a1 Smith 100.00

a1 Jones 100.00

a2 Bob 100.00

a3 Bob

100.00

a4 Mike 100.00

a5 Mary 200.00

4.   a1 Smith 200.00

a2 Bob

100.00

a3 Bob 100.00

a4 Mike 100.00

a5 Mary 200.00

5.   a1 Jones
200.00

a2 Bob 200.00

a4 Mike 100.00 http://abap-tutorials.com 2010

a5 Mary 100.00

ANS.______________________________

Q4. Which return code is associated with a failed

authority check due to lack of user authorization for the chosen action?

1.    0

2.    4

3.    8

4.    12

5.    24

ANS.______________________________

Q5.

data: x type I value 5,



y type I value 10.

     Do 2 times. http://abap-tutorials.com 2010

     Perform calculate using x

changing y.

Enddo.

 Form calculate using px like x

changing py like y.

Statics z type I.

py = px + z.
Z = z + 1.

px = px + 1.

Endform.

What are the values of x, y, and z

after execution?

1.      x = 7, y = 7, z = 2

2.      x = 7, y = 15, z = 2

3.      x = 5, y = 8, z =

0 http://abap-tutorials.com 2010

4.      x = 5, y = 6, z = 0

5.      x = 5, y =

10, z = 1

ANS.______________________________

Q6. data: itab1 like itab occurs 0 with header line,

        itab2 like itab occurs 0 with header line.

     Loop at itab1.

Append itab2.

Endloop.

     Free: itab2.

Write: itab1, /itab2.

If the Contents of Itab1 =

Header 0

line 1 http://abap-tutorials.com 2010

What is the output of the above program?

1.      Header 0
Header 0

2.     Header 0

line 1

Header 0

line 1

3.     line 1

4.       Header 0

line 1

5.     Header 0

ANS.______________________________

Q7. Background jobs viewed in SM50 are of which process type?

1.     BTC http://abap-tutorials.com 2010

2.     SPO

3.

BKG

4.     DIA

5.     UPD

ANS.______________________________

Q8.

data: f1(12)

type c value 'Test Variant',

      f2(6) type c,

      f3(8)

type c.

     Move: f1 to f2,
       f2 to

f3.http://abap-tutorials.com 2010

What do f1, f2, and f3 contain after executing the above code?

1.     f1: 'Test Variant'



f2: 'ariant'

f3: ' Variant'




2.

f1: 'Test Variant'

f2: 'Test V'

f3: 'Test Var'

3.     f1: 'Test Variant'

f2: 'ariant'

f3: ' ariant' http://abap-tutorials.com 2010

4.    f1: 'Test Variant'

f2: 'Test V'

f3: 'Test V '

5.    f1: 'Test Variant'

f2: 'Test V'

f3: 'st Varia'

ANS.______________________________

Q9.

REPORT ZTEST.
TABLES:

MARC.

DATA: WERKS LIKE MARC-WERKS.

Which one of the following contains the length

definition of WERKS?

1.    Table MARC http://abap-tutorials.com 2010

2.    The Domain characteristics

3.    Program

ZTEST

The Data Element definition

The DATA statement

ANS.______________________________

Q10. field name module check_validity

on input.



Which statement is correct regarding the above code?

1.    The module is processed during PBO.

2.    The module is processed only if a value has been entered in that field.

3.    The module is processed only if the user presses F4 on that field.

4.    The module is processed if a field in the chain has a value.

The module

is processed only if the value of the field is not the initial value.http://abap-tutorials.com 2010

ANS.______________________________

Q11. data: begin of alpha,

        c1 value 'A',
c2 value 'B',

c3 value 'C',

c4 value 'D',

c5 value 'E',

       c6 value 'F',

       end of alpha.

Data wa(1)

type c value 'X'.

Do 3 times varying wa from alpha-c1 next alpha-c3.

Write wa no-gap.

Enddo.

What is the output of the above code?

ACF

ACC

ABC http://abap-tutorials.com 2010

ACA

ACE

ANS.______________________________

Q12.

Which INCLUDE contains standard subroutines used in BDC programs?

1.     BDCINCLUDE

2.     RSBDCSUB

3.     BDCRECXX

4.     RSBDCINC

5.     BDCSUBMIT
ANS.______________________________

Q12. Which one of the following is INCORRECT regarding tables for data clusters?

1.      The table is divided into logically related areas, defined http://abap-tutorials.com 2010

by a two-character ID.

2.      The area ID should be named RELID.

3.      The field STRTF2 is the last field in the key.

4.      The table should be a cluster table.

The table ends with the fields

CLUSTR and CLUSTD.

ANS.______________________________

Q13.

     data: word(8) value 'ABCDEFGH'.

Shift word.

Write: / word.

Shift word right.

Shift word

circular.

Write: / word.

What is the Output for this?

ANS.______________________________http://abap-tutorials.com 2010

Q14. data:

begin of itab occurs 3,

        field1 type I,

field2(10) type c,

end of itab.
   Move: 10 to

itab-field1,

      'Corp1' to itab-field2.

   Append itab sorted by field1.

Move: 5 to itab-field1,

      'Corp2' to itab-field2.

Append itab sorted by field1.

Move: 15 to itab-field1,

      'Corp3' to itab-field2.

Append itab http://abap-tutorials.com 2010

sorted by field1.

   Move: 6 to itab-field1,

      'Corp4' to itab-field2.

Append itab

sorted by field1.

Move: 10 to itab-field1,

     'Corp5' to itab-field2.

Append itab

sorted by field1.

Loop at itab.

Write: / itab-field1,

itab-field2

Endloop.

What is the output of the above code after

execution?
1.    5 Corp2 http://abap-tutorials.com 2010

6 Corp4

10 Corp1

10

Corp5

15 Corp3

2.    15 Corp3

10 Corp1

10 Corp5

3.    6 Corp4

10 Corp5

15 Corp3

4.    15 Corp5

10 Corp4

6 Corp3

5 Corp2

5.    15 Corp3

6 Corp1

5 Corp4

ANS.______________________________http://abap-tutorials.com 2010

Q15. Which one of the following is an

INVALID structure declaration?

1.    data: struc type t_struc.

2.    data: begin of struc,

     field1,
field2,

     end of struc.

3.      data: struc like line of itab.

4.      data: struc like

mara-matnr.

data: begin of struc.

       Include structure s_type.

End of struc.

ANS.______________________________http://abap-tutorials.com 2010

Q16. Your program specs call for you to read the first 10 records from a text

file      (fname1), and write them out to another text file (fname2).

Which block of code will accomplish the result desired in the above scenario?

1.      open dataset fname1 for input in text mode.

Open dataset fname2 for output in text mode.

Do 10 times.

Read fname1 into hold_var.

Write hold_var to fname2.

Enddo.

2.      open dataset fname1 for output in text mode.

Open dataset fname2 for input.

Do 10

times.

Read file fname1 into hold_var.

Transfer hold_var to fname2.

Enddo.http://abap-tutorials.com 2010
3.   open file fname1 for input.

Open file fname2 for output.

Do 10 times.

Read

file fname1 into hold_var.

Transfer hold_var into fname2.

Enddo.

4.   open

dataset fname1 for output in text mode.

Open dataset fname2 for input in text mode.

Do 10 times.

Read

dataset fname1 into hold_var.

Transfer hold_var to fname2.

Enddo.

5.

open file fname1 for output.

Open file fname2 for input.

Read dataset fname1 into hold_var 10 times. http://abap-tutorials.com 2010

Transfer hold_var to fname2.

ANS.______________________________

Q17.

DATA: carrid LIKE sflight-carrid,

connid LIKE sflight-connid,

date LIKE sflight-fldate.
1. Select

sflight~carrid sflight~connid sflight~fldate

2. Into (carrid, connid, date) from

3. Sflight as sflight INNER JOIN

Spfli as spfli

4. On sflight~carrid = spfli~carrid

5. And sflight~connid gt spfli~connid

6. Where

spfli~fldate lt '19990101'.

7. Write: / carrid, connid, date. http://abap-tutorials.com 2010

8. Endselect.

Which line in the above code contains a syntax error ?

Line 1

Line

3

Line 4

Line 5

Line 6

ANS.______________________________

Q18. Which one of the following is an

INCORRECT form of the WRITE statement?

1.     write x under y

currency us.

2.     write x no-sign.

3.     write http://abap-tutorials.com 2010
x left-justified no-gap.

4.      write x no-decimals.

5.      write x no-zero.

ANS.______________________________

Q19. 1. Tables: ztable.

     2. Data: itab like ztable occurs 0 with

header line.

3. Select * into table itab from ztable.

4. Loop at itab.

5. Itab-field1 = 'XYZ'.

6. Modify itab.

7. Endloop.

8. Update ztable from itab.

     Initial state of ztable

-----------------------------

      field1 field2

-----------------------------

       ABC 123 http://abap-tutorials.com 2010

       XYZ 456

DEF 123

XYZ 789

GHI 789

Given the initial state of itab, how many

updates to ztable will occur after executing the above code?

a.     0
b.      1

c.      2

d.      3

e.      5

ANS.______________________________

Q20.

Data: field1(4) value 'Test',

field2 type I value 10,

field3(6) value ' Test2'. http://abap-tutorials.com 2010

Data: field4 type I value 20.

Write: field1, 5 ':', field2,

/ field3+1, 5 ':', field4.

What is the output of the above code after execution?

1.   Test: 10

Test2:

2.   Test: 10

Test2: 20

3.   Test:10

Test2:20

4.   Test: 10

Test: 20

5.      Test: 10

Test:

ANS.______________________________http://abap-tutorials.com 2010

Q21. 1. SUBMIT (PROG) AND RETURN
2. USING

SELECTION-SET 'MASS-MAINT'

3. WITH CREDAT EQ SY-DATUM

4. VIA JOB JOB_NAME NUMBER JOB_ID

5. TO SAP-SPOOL

6. DESTINATION PRINT_NAME

7. COPIES 1

8. IMMEDIATELY ' '

9. COVER TEXT 'MASS MAINT'

10.

KEEP IN SPOOL 'X'

11. LINE-COUNT 65

12. LINE-SIZE 132

13. LAYOUT 'X_65_132'

14. INCLUDE SPOOL

DYNPRO.

The above code is used to submit a program as part of a dynamically created job. Which of http://abap-
tutorials.com 2010

the above lines contains a syntax error? (Presuming all used variables are declared correctly.)

Line 1

Line 4

Line 6

Line 10

Line

14

ANS.______________________________
Q22.

Which one of the following is output to the job log when included in an ABAP program running in the

background?

1.     print function modules

2.     Submit statements

3.     report parameters

4.     Write statements

message statements

ANS.______________________________http://abap-tutorials.com 2010

Q23.

1. Must use mara-matnr's

conversion exit

2. Is a required field

3. Appears as 100 on the selection screen

4. Check for a valid mara

-matnr

Which one of the following is the correct way to define a selection-screen parameter (n) with

the above properties?

1.   parameters: n like mara-matnr default 100

obligatory.

2.   parameters: n type I default '100'.

3.   parameters:

n type I default 100 required.

At selection-screen on n.

Select single * from mara where matnr = n.
If sy-http://abap-tutorials.com 2010

subrc ne 0.

Message e000 with 'Incorrect number'.

Endif.

4.

parameters: n like mara-matnr default 100 obligatory.

At selection-screen on n.

Select single * from mara where

matnr = n.

If sy-subrc ne 0.

Message e000(00) with 'Incorrect number'.

Endif.

parameter: n type mara-matnr value 100.

ANS.______________________________

Q24. 1 TABLES: MARC.

2 DATA: BEGIN OF ITAB OCCURS 0,

3 FIELD1(5),

4 FIELD2(5), http://abap-tutorials.com 2010

5 END OF ITAB.

6 READ ITAB WITH KEY MATNR = '12345'.

7 IF SY-SUBRC = 0.

8

WRITE:/ ITAB-MATNR.

9 ENDIF.

In which line the syntax error exits.
ANS.______________________________

Q25.When referring to the

COLLECT statement, which one of the following is correct?

1.

The COLLECT statement will add up ALL fields in an internal table.

2.      When using

COLLECT, all of the fields that are not part of the table key must have a numeric type.http://abap-
tutorials.com 2010

3.      If an entry with the same key already exists, the COLLECT statement appends a new

line to the table.

4.      When using COLLECT on a sorted table, the system finds

existing lines using a sequential search.

Using COLLECT, you can have duplicate entries in the resulting

itab.

ANS.______________________________

Q26. Which WHERE clause

would select all programs that start with 'ZR_'?

1.      where

program like 'ZR#_%' ESCAPE '#'

2.      where program like 'ZR*_%'

3.      where program = 'ZR_*'

4.      where program =

'ZR%_*'

where program like 'ZR%_%' ESCAPE '%'http://abap-tutorials.com 2010

ANS.______________________________

Q27. To ensure that related lines appear on the same
page of a report list, which statement would you use?

1.     group

2.     new-page group

3.     reserve

4.     hide

write onblock

ANS.______________________________

Q28.

Loop at itab.

Write itab.

Endloop.

From where is the written line derived in http://abap-tutorials.com 2010

the above loop statement?

1.     sy-subrc

2.     sy-lisel

3.     The table work area

4.     sy-index

The table header

ANS.______________________________

Q29.

data: begin of

itab occurs 0,

       num1 type I,

num2 type I,

num3 type I,
mark,



     end of itab.

Delete from itab where mark eq 'D'. http://abap-tutorials.com 2010

Itab entries:

123D

234

345D

456D

789d

789D

Given the ITAB entries, what are the contents of ITAB after executing the above code?

1.    234

345D

456D

789d

789

D



2.    234

3.    78

9d

7 8 9 Dhttp://abap-tutorials.com 2010

4.    123D

234
345D

456D

789

d

5.   234

789d

ANS.______________________________

Q30. Which statement retrieves data from a LOGICAL database?

1.    SET

2.    LET

3.    SELECT

4.    RETRIEVE

5.   GET

ANS.______________________________http://abap-tutorials.com 2010

Q31. Program specifications ask for error checking on a selection-screen

which contains a parameter inside a frame. Which event below would you

use to ensure the above specification is met?

1.    at selection-screen

2.    at selection-screen on block b1

3.    check selection-screen

4.    selection-screen on field f1

5.    selection-screen check block b1

ANS.______________________________

Q32. You press F1(Help), then F9(Technical char) on a screen field to get its parameter ID. Where

is the parameter ID linked to the screen field?
1.     The help definition

2.     Table PARAM

3.     The screen definition

4.     The domain

5.     The data element

ANS.______________________________http://abap-tutorials.com 2010

Q33. Which one of the following commands is used inside an ABAP program to go into debug mode?

debug

stop

break-point

break at

/h

ANS.______________________________

Q34. Which one of the following statements about Pooled and Cluster tables is correct?

1.     Pooled and Cluster tables can be joined.

2.     All table entries in a Cluster table are stored in field VARKEY.

3.     Pooled and Cluster tables physically exist in the database.

4.     All key fields of a Pooled table must contain integer data types.

Pooled and Cluster tables share information from multiple tables.

ANS.______________________________
ABAP Interview Questions & Answers

Set 4

http://abap-tutorials.comhttp://abap-tutorials.com 2010

1. If a table does not have MANDT as part of the primary key, it is ____.

A: A structure

B: Invalid

C: Client-independent

D: Not mandatory

2. In regard to CALL, which of the following is NOT a valid statement?

A: CALL FUNCTION

B: CALL SCREEN

C: CALL TRANSACTION

D: CALL PROGRAM

3. Name the type of ABAP Dictionary table that has these characteristics:

Same number of fields as the database table

Same name as database table

Maps 1:1 to database table

A: Pooled

B: Cluster

C: Transparent
D: View

4. An event starts with an event keyword and ends with:

A: Program execution.

B: END-OF-EVENT.

C: Another event keyword.

D: END-EVENT.

5. What is the system field for the current date?

A: SY-DATUM

B: SY-DATE

C: SY-DATID

D: SY-SDATE

6. The following code indicates:

SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab

WHERE fld1 IN sfld1.

A: Add rows to the existing rows of itab.

B: Add rows to itab after first deleting any existing rows of itab.

C: Select rows from tab1 for matching itab entries.

D: Nothing, this is a syntax error. http://abap-tutorials.com 2010

7. You may change the following data object as shown below so that it equals 3.14.

CONSTANTS: PI type P decimals 2 value '3.1'.

PI = '3.14'.

A: True

B: False

8. The SAP service that ensures data integrity by handling locking is called:

A: Update
B: Dialog

C: Enqueue/Dequeue

D: Spool

9. Which of these sentences most accurately describes the GET VBAK LATE. event?

A: This event is processed before the second time the GET VBAK event is processed.

B: This event is processed after all occurrences of the GET VBAK event are completed.

C: This event will only be processed after the user has selected a basic list row.

D: This event is only processed if no records are selected from table VBAK.

10. Which of the following is not a true statement in regard to a hashed internal table type?

A: Its key must always be UNIQUE.

B: May only be accessed by its key.

C: Response time for accessing a row depends on the number of entries in the table.

D: Declared using internal table type HASHED TABLE.

11. TO include database-specific SQL statements within an ABAP program, code them between:

A: NATIVE SQL_ENDNATIVE.

B: DB SQL_ENDDB.

C: SELECT_ENDSELECT.

D: EXEC SQL_ENDEXEC.

12. To measure how long a block of code runs, use the ABAP statement:

A: GET TIME .

B: SET TIME FIELD .

C: GET RUN TIME FIELD .

D: SET CURSOR FIELD .

13. When a secondary list is being processed, the data of the basic list is available by default.

A: True
B: False

14. Given: http://abap-tutorials.com 2010

DATA: BEGIN OF itab OCCURS 10,

qty type I,

END OF itab.

DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.

LOOP AT itab WHERE qty > 10.

WRITE: /1 itab-qty.

ENDLOOP.

This will result in:

A: Output of only those itab rows with a qty field less than 10

B: Output of the first 10 itab rows with a qty field greater than 10

C: A syntax error

D: None of the above

15. After a DESCRIBE TABLE statement SY-TFILL will contain

A: The number of rows in the internal table.

B: The current OCCURS value.

C: Zero, if the table contains one or more rows.

D: The length of the internal table row structure.

16. You may declare your own internal table type using the TYPES keyword.

A: True

B: False

17. After adding rows to an internal table with COLLECT, you should avoid adding more rows with
APPEND.

A: True

B: False
18. Which of the following is not a component of control break processing when looping at an internal
table?

A: AT START OF

B: AT FIRST

C: AT LAST

D: AT NEW

19. A dictionary table is made available for use within an ABAP program via the TABLES statement.

A: True

B: False

20. Which of the following would be best for hiding further selection criteria until a function is chosen?

A: AT NEW SELECTION-SCREEN http://abap-tutorials.com 2010

B: SELECTION-SCREEN AT LINE-SELECTION

C: SUBMIT SELECTION-SCREEN

D: CALL SELECTION-SCREEN

21. What must you code in the flow logic to prevent a module from being called unless a field contains a
non-initial value (as

determined by its data type)?

A: ON INPUT

B: CHAIN

C: FIELD

D: ON REQUEST

22. The AT USER-COMMAND event is triggered by functions defined in the ____.

A: screen painter

B: ABAP report

C: menu painter status

D: ABAP Dictionary
23. In regard to a function group, which of the following is NOT a true statement?

A: Combines similar function modules.

B: Shares global data with all its function modules.

C: Exists within the ABAP workbench as an include program.

D: Shares subroutines with all its function modules.

24. In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.

A: EXCLUDING

B: IMMEDIATELY

C: WITHOUT

D: HIDE

25. In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT
a true statement?

A: Fields in PBO are transported directly from PAI.

B: Fields with identical names are transported to the ABAP side.

C: Fields not defined in FIELD statements are transported first.

D: Fields that are defined in FIELD statements are transported when their corresponding module is
called.

26. The order in which an event appears in the ABAP code determines when the event is processed.

A: True

B: False

27. A field declared as type T has the following internal representation:

A: SSMMHH

B: HHMMSS http://abap-tutorials.com 2010

C: MMHHSS

D: HHSSMM

28. Which of the following is NOT a component of the default standard ABAP report header?
A: Date and Time

B: List title

C: Page number

D: Underline

29. Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list report, what
event is processed when

the button is clicked?

A: AT USER-COMMAND.

B: AT PFn.

C: AT SELECTION-SCREEN.

D: END-OF-SELECTION.

30. In regard to field selection, what option of the SELECT statement is required?

A: FOR ALL ENTRIES

B: WHERE

C: INTO

D: MOVE-CORRESPONDING

31. The following program outputs what?

report zjgtest1

write: /1 'Ready_'.

PARAMETER: test.

INITIALIZATION.

write: /1 'Set_'.

START-OF-SELECTION.

write: /1 'GO!!'.

A: Set_ GO!! (each on its own line)

B: Set_ Ready_ GO!! (all on their own lines)
C: Ready_ GO!! (each on its own line)

D: Ready_ Set_ GO!! (all on their own lines)

32. To declare a selection criterion that does not appear on the selection screen, use:

A: NO-DISPLAY

B: INVISIBLE

C: MODIF ID

D: OBLIGATORY http://abap-tutorials.com 2010

33. An internal table that is nested within another internal table should not contain a header line.

A: True

B: False

34. What is output by the following code?

DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab.

itab-letter = 'A'. APPEND itab. itab-letter = 'B'. APPEND itab.

itab-letter = 'C'. APPEND itab. itab-letter = 'D'. APPEND itab.

LOOP AT itab.

SY-TABIX = 2.

WRITE itab-letter.

EXIT.

ENDLOOP.

A: A

B: A B C D

C: B

D: B C D

35. To select all database entries for a certain WHERE clause into an internal table in one step, use

A: SELECT_INTO TABLE itab_
B: SELECT_INTO itab_

C: SELECT_APPENDING itab

D: SELECT_itab_

36. After a successful SELECT statement, what does SY-SUBRC equal?

A: 0

B: 4

C: 8

D: Null

37. This selection screen syntax forces the user to input a value:

A: REQUIRED-ENTRY

B: OBLIGATORY

C: DEFAULT

D: SELECTION-SCREEN EXCLUDE

38. If the following code results in a syntax error, the remedy is:

DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1

WITH HEADER LINE.

itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab. http://abap-tutorials.com 2010

itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.

SORT itab.

LOOP AT itab.

write: /1 itab-field1, itab-field2.

ENDLOOP.

A: There is no syntax error here

B: Remove the SORT statement

C: Change INSERT to APPEND
D: Add a WHERE clause to the loop

39. If this code results in an error, the remedy is:

SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3.

WRITE: /1 tab1-fld1, tab1-fld2.

ENDSELECT.

A: Add a SY-SUBRC check.

B: Change the WHERE clause to use fld1 or fld2.

C: Remove the /1 from the WRITE statement.

D: Add INTO (tab1-fld1, tab1-fld2).

40. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an index
number.

A: True

B: False

41. To allow the user to enter values on the screen for a list field, use:

A: OPEN LINE.

B: SET CURSOR FIELD.

C: WRITE fld AS INPUT FIELD.

D: FORMAT INPUT ON.

42. Before a function module may be tested, it must first be:

A: Linked

B: Authorized

C: Released

D: Active

43. To include a field on your screen that is not in the ABAP Dictionary, which include program should
contain the data

declaration for the field?
A: PBO module include program

B: TOP include program

C: PAI module include program

D: Subroutine include program http://abap-tutorials.com 2010

44. If a table contains many duplicate values for a field, minimize the number of records returned by
using this SELECT

statement addition.

A: MIN

B: ORDER BY

C: DISTINCT

D: DELETE

45. The system internal table used for dynamic screen modification is named:

A: ITAB

B: SCREEN

C: MODTAB

D: SMOD

46. Within the source code of a function module, errors are handled via the keyword:

A: EXCEPTION

B: RAISE

C: STOP

D: ABEND

47. Which system field contains the contents of a selected line?

A: SY-CUCOL

B: SY-LILLI

C: SY-CUROW

D: SY-LISEL
48. The following statement writes what type of data object?

WRITE: /1 'Total Amount:'.

A: Text literal

B: Text variable

C: In-code comment

D: Text integer

49. For the code below, second_field is of what data type?

DATA: first_field type P, second_field like first_field.

A: P

B: C

C: N

D: D

50. Which of the following describes the internal representation of a type D data object? http://abap-
tutorials.com 2010

A: DDMMYYYY

B: YYYYDDMM

C: MMDDYYYY

D: YYYYMMDD

51. A BDC program is used for all of the following except:

A: Downloading data to a local file

B: Data interfaces between SAP and external systems

C: Initial data transfer

D: Entering a large amount of data

52. In regard to PERFORM, which of the following is NOT a true statement?

A: May be used within a subroutine.

B: Requires actual parameters.
C: Recursive calls are allowed in ABAP.

D: Can call a subroutine in another program.

53. What is the transaction code for the ABAP Editor?

A: SE11

B: SE38

C: SE36

D: SE16

54. In regard to HIDE, which of the following is NOT a true statement?

A: Saves the contents of variables in relation to a list line's row number.

B: The hidden variables must be output on a list line.

C: The HIDE area is retrieved when using the READ LINE statement.

D: The HIDE area is retrieved when an interactive event is triggered.

55. Database locks are sufficient in a multi-user environment.

A: True

B: False

56. The complete technical definition of a table field is determined by the field's:

A: Domain

B: Field name

C: Data type

D: Data element

57. In regard to LEAVE, which of the following is NOT a true statement?

A: May be used to return immediately to a calling program.

B: May be used to stop the current loop pass and get the next.

C: May be used to start a new transaction. http://abap-tutorials.com 2010

D: May be used to go to the next screen.
58. The following code indicates:

SELECT fld6 fld3 fld2 fld1 FROM tab1 INTO CORRESPONDING FIELDS OF TABLE itab

WHERE fld3 = pfld3.

A: The order of the fields in itab does not matter.

B: Fill the header line of itab, but not the body.

C: Table itab can only contain fields also in table tab1.

D: None of the above.

59. The ABAP statement below indicates that the program should continue with the next line of code if
the internal table itab:

CHECK NOT itab[] IS INITIAL.

A: Contains no rows

B: Contains at least one row

C: Has a header line

D: Has an empty header line

60. What will be output by the following code?

DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.

itab-fval = 1. APPEND itab.

itab-fval = 2. APPEND itab.

FREE itab.

WRITE: /1 itab-fval.

A: 2

B: 0

C: blank

D: 1

61. To allow the user to enter a range of values on a selection screen, use the ABAP keyword:

A: DATA.
B: RANGES.

C: PARAMETERS.

D: SELECT-OPTIONS.

62. If an internal table is declared without a header line, what else must you declare to work with the
table's rows?

A: Another internal table with a header line.

B: A work area with the same structure as the internal table.

C: An internal table type using the TYPES statement.

D: A PARAMETER. http://abap-tutorials.com 2010

63. Assuming an internal table contains 2000 entries, how many entries will it have after the following
line of code is

executed?

DELETE itab FROM 1500 TO 1700.

A: This is a syntax error.

B: 1801

C: 1800

D: 1799

64. To remove lines from a database table, use ____.

A: UPDATE

B: MODIFY

C: ERASE

D: DELETE

65. All of the following may be performed using SET CURSOR except:

A: Move the cursor to a specific field on a list.

B: Move the cursor to a specific list line.

C: Move the cursor to a specific pushbutton, activating that function.
D: Move the cursor to a specific row and column on a list.

66. When is it optional to pass an actual parameter to a required formal parameter of a function
module?

A: The actual parameter is type C.

B: The formal parameter contains a default value.

C: The formal parameter's \"Reference\" attribute is turned on.

D: It is never optional.

67. Coding two INITIALIZATION events will cause a syntax error.

A: True

B: False

68. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method for improving
performance.

A: True

B: False

69. To save information on a list line for use after the line is selected, use this keyword.

A: APPEND

B: EXPORT

C: WRITE

D: HIDE

70. To bypass automatic field input checks, include this in PAI. http://abap-tutorials.com 2010

A: AT EXIT-COMMAND

B: ON INPUT

C: ON REQUEST

D: LEAVE TO SCREEN 0.

71. Within a function module's source code, if the MESSAGE_RAISING statement is executed, all of the
following system fields

are filled automatically except:
A: SY-MSGTY

B: SY-MSGNO

C: SY-MSGV1

D: SY-MSGWA

72. The following code indicates:

REPORT ZLISTTST.

START-OF-SELECTION.

WRITE: text-001.

FORMAT HOTSPOT ON.

WRITE: text-002.

FORMAT HOTSPOT OFF.

AT LINE-SELECTION.

WRITE / text-003.

A: Text-002 may not be selected.

B: The value of text-002 is stored in a special memory area.

C: Text-002 may be clicked once to trigger the output of text-003.

D: None of the above.

73. The ____ type of ABAP Dictionary view consists of one or more transparent tables and may be
accessed by an ABAP

program using Open SQL.

A: Database view

B: Projection view

C: Help view

D: Entity view

74. A concrete field is associated with a field-symbol via ABAP keyword

A: MOVE
B: WRITE

C: ASSIGN

D: VALUE

75. The output for the following code will be:

report zabaprg.

DATA: char_field type C.

char_field = 'ABAP data'. http://abap-tutorials.com 2010

WRITE char_field.

A: ABAP data

B: A

C: Nothing, there is a syntax error

D: None of the above

76. Page footers are coded in the event:

A: TOP-OF-PAGE.

B: END-OF-SELECTION.

C: NEW-PAGE.

D: END-OF-PAGE.

77. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is displayed and is the
best event for

assigning default values to selection criteria.

A: True

B: False

78. The TABLES statement declares a data object.

A: True

B: False

79. Assuming tab1-fld7 is not a key field, how can you prevent reading all the table rows?
SELECT fld1 fld2 fld3 FROM tab1 INTO (fld4, fld5, fld6)

WHERE fld7 = pfld7.

WRITE: /1 fld4, fld5, fld6.

ENDSELECT.

A: Take fld7 out of the WHERE clause.

B: Create an index in the ABAP Dictionary for tab1-fld7.

C: Use INTO TABLE instead of just INTO.

D: Take the WRITE statement out of the SELECT_ENDSELECT.

80. Which of the following is NOT a required attribute when creating an ABAP program?

A: Application

B: Title

C: Status

D: Type

81. When creating a transparent table in the ABAP Dictionary, which step automatically creates the
table in the underlying

database?

A: Adding technical settings to the table

B: Checking the table syntax http://abap-tutorials.com 2010

C: Saving the table

D: Activating the table

82. Within the ABAP program attributes, Type = 1 represents:

A: INCLUDE program

B: Online program

C: Module pool

D: Function group

E: Subroutine pool
83. If this code results in an error, the remedy is:

SELECT fld1 SUM( fld1 ) FROM tab1 INTO_

A: Remove the spaces from SUM( fld1 ).

B: Move SUM( fld1 ) before fld1.

C: Add GROUP BY f1.

D: Change to SUM( DISTINCT f1 ).

84. Which keyword adds rows to an internal table while accumulating numeric values?

A: INSERT

B: APPEND

C: COLLECT

D: GROUP

85. Assuming itab has a header line, what will be output by the following code?

READ TABLE itab INDEX 3 TRANSPORTING field1.

WRITE: /1 itab-field1, itab-field2.

A: The contents of the third row's itab-field1.

B: The contents of the third row's itab-field1 and itab-field2.

C: The contents of the third row's itab-field2.

D: Nothing.

86. The following code indicates:

SELECTION-SCREEN BEGIN OF BLOCK B1.

PARAMETERS: myparam(10) type C,

Myparam2(10) type N,

SELECTION-SCREEN END OF BLOCK.

A: Draw a box around myparam and myparam2 on the selection screen.

B: Allow myparam and myparam2 to be ready for input during an error dialog.
C: Do not display myparam and myparam2 on the selection screen.

D: Display myparam and myparam2 only if both fields have default values.

87. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so that it
appears as follows? http://abap-tutorials.com 2010

FRUIT QTY PRICE

Apples 12 22.50

Apples 9 18.25

Oranges 15 17.35

Bananas 20 10.20

Bananas 15 6.89

Bananas 5 2.75

A: SORT itab DESCENDING BY QTY PRICE.

B: SORT itab BY PRICE FRUIT.

C: SORT itab.

D: SORT itab BY PRICE DESCENDING.

88. Which keyword adds a line anywhere within an internal table?

A: APPEND

B: MODIFY

C: ADD

D: INSERT

89. To read a single line of an internal table, use the following:

A: LOOP AT itab. _ ENDLOOP.

B: READ itab.

C: SELECT SINGLE * FROM itab.

D: READ TABLE itab.

90. Which Open SQL statement should not be used with cluster databases?
A: UPDATE

B: MODIFY

C: DELETE

D: INSERT

91. To include a field on your screen that is not in the ABAP Dictionary, which include program should
contain the data

declaration for the field?

A: PBO module include program

B: TOP include program

C: PAI module include program

D: Subroutine include program

92. This flow logic statement is used to make multiple fields open for input after an error or warning
message.

A: GROUP

B: FIELD-GROUP

C: CHAIN

D: LOOP AT SCREEN http://abap-tutorials.com 2010

93. Given:

PERFORM subroutine USING var.

The var field is known as what type of parameter?

A: Formal

B: Actual

C: Static

D: Value
ABAP Interview Questions & Answers

Set 5

http://abap-tutorials.comhttp://abap-tutorials.com 2010

1. What is the typical structure of an ABAP/4 program?

HEADER ,BODY,FOOTER.

2. What are field symbols and field groups.?

Have you used "component idx of structure" clause with field groups?

Field symbols:-

Field groups :-

3. What should be the approach for writing a BDC program?

STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED
"CONVERSION".

STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".

STEP 3: DEPENDING UPON THE BDC TYPE i)call transaction(Write the program explicity)

ii) create sessions (sessions are created and processed.if success data will transfer).

4. What is a batch input session?

BATCH INPUT SESSION is an intermediate step between internal table and database table.

Data along with the action is stored in session ie data for screen fields, to which screen it is
passed,program name behind it,

and how next screen is processed.

5. What is the alternative to batch input session?

Call transaction.
6. A situation: An ABAP program creates a batch input session.

We need to submit the program and the batch session in back ground. How to do it?

Please go to SM36 and create background job by giving job name,job class and job steps (JOB
SCHEDULING)

8. What are the problems in processing batch input sessions?

How is batch input process different from processing online?

PROBLEMS:-

i) If the user forgets to opt for keep session then the session will be automatically removed from the
session queue(log

remains). However if session is processed we may delete it manually.

ii)if session processing fails data will not be transferred to SAP database table.

10. What are the different types of data dictionary objects?

tables, structures, views, domains, data elements, lock objects, Matchcode objects.

11. How many types of tables exists and what are they in data dictionary?

4 types of tables

i)Transparent tables - Exists with the same structure both in dictionary as well as in database exactly
with the same data and

fields. Both Opensql and Nativesql can be used.http://abap-tutorials.com 2010

ii)Pool tables & iii)Cluster tables -

These are logical tables that are arranged as records of transparent tables.one cannot use native sql on
these tables

(only opensql).They are not managable directly using database system tools.

iv)Internal tables - .

12. What is the step by step process to create a table in data dictionary?

Step 1: creating domains(data type,field length,range).

step 2: creating data elements(properties and type for a table

field).
step 3: creating tables(SE11).

13. Can a transparent table exist in data dictionary but not in the data base physically?

No. Transporent tables do exist with the same structure, both in the dictionary as well as in database,
exactly with the same

data and the fields.

14. What are the domains and data elements?

DOMAINS : FORMAL DEFINITION OF THE DATA TYPES.THEY SET ATTRIBUTES SUCH AS DATA
TYPE,LENGTH,RANGE.

DATA ELEMENT : A FIELD IN R/3 SYSTEM IS A DATA ELEMENT.

15. Can you create a table with fields not referring to data elements?

YES. eg:- ITAB LIKE SPFLI.here we are referening to a data object(SPFLI) not data element.

16. What is the advantage of structures? How do you use them in the ABAP programs?

The most important advantage of the structures is that they have global existence (i.e.; these could be
used by any other

program without creating it again).

17. What does an extract statement do in the ABAP program?

Once you have declared the possible record types as field groups and defined their structure, you can fill
the extract dataset

using the following statements:

EXTRACT .

When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds
the first extract record

to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset

EXTRACT HEADER.

When you extract the data, the record is filled with the current values of the corresponding fields.

As soon as the system has processed the first EXTRACT statement for a field group , the structure of the
corresponding extract
record in the extract dataset is fixed. You can no longer insert new fields into the field groups and
HEADER. If you try to modify

one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs.
http://abap-tutorials.com 2010

By processing EXTRACT statements several times using different field groups, you fill the extract dataset
with records of

different length and structure. Since you can modify field groups dynamically up to their first usage in an
EXTRACT statement,

extract datasets provide the advantage that you need not determine the structure at the beginning of
the program.

18. What is a collect statement? How is it different from append?

If an entry with the same key already exists, the COLLECT statement does not append a new line, but
adds the contents of the

numeric fields in the work area to the contents of the numeric fields in the existing entry.

19. What is open sql vs native sql?

ANS:-

20. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?

21. What is the meaning of ABAP/4 editor integrated with ABAP/4 data dictionary?

22. What are the events in ABAP/4 language?

Initialization, At selection-screen,Start-of-selection,end-of-selection,top-of-page,end-of-page, At line-
selection,At usercommand,At PF,Get,At New,At LAST,AT END, AT FIRST.

23. What is an interactive report?

What is the obvious diff of such report compared with classical type reports?

An Interactive report is a dynamic drill down report that produces the list on users choice.

diff:-

a) THE LIST PRODUCED BY CLASSICAL REPORT DOESN'T allow user to interact with the system

the list produced by interactive report allows the user to interact with the system.

b) ONCE A CLASSICAL REPORT EXECUTED USER LOOSES CONTROL.IR USER HAS CONTROL.
c) IN CLASSICAL REPORT DRILLING IS NOT POSSIBLE.IN INTERACTIVE DRILLING IS POSSIBLE.

24. What is a drill down report?

Its an Interactive report where in the user can get more relavent data by selecting explicitly.

25. How do you write a function module in SAP? Describe.

Creating function module:-

                 - se37-creating funcgrp,funcmodule by assigning
attributes,importing,exporting,tables,exceptions.

                 - SE38-in pgm click pattern and write function name- provide
export,import,tables,exception values.

26. What are the exceptions in function module?

COMMUNICATION_FAILURE

SYSTEM_FAILURE http://abap-tutorials.com 2010

27. What is a function group?

GROUP OF ALL RELATED FUNCTIONS.

28. How are the date and time field values stored in SAP?

DD.MM.YYYY. HH:MM:SS

30. Name a few data dictionary objects?

TABLES,VIEWS,STRUCTURES,LOCK OBJECTS,MATCHCODE OBJECTS.

31. What happens when a table is activated in DD?

It is available for any insertion,modification and updation of records by any user.

32. What is a check table and what is a value table?

Check table will be at field level checking.

Value table will be at domain level checking ex: scarr table is check table for carrid.

33. What are match codes? describe?

It is a similar to table index that gives list of possible values for either primary keys or non-primary keys.

34. What transactions do you use for data analysis?
35. What is table maintenance generator?

36. What are ranges? What are number ranges?

max,min values provided in selection screens.

37. What are select options and how are they different from parameters?

select options provide ranges where as parameters do not.

SELECT-OPTIONS declares an internal table which is automatically filled with values or ranges

of values entered by the end user. For each SELECT-OPTIONS , the system creates a selection table.

SELECT-OPTIONS FOR .

A selection table is an internal table with fields SIGN, OPTION, LOW and HIGH.

The type of LOW and HIGH is the same as that of .

The SIGN field can take the following values: I Inclusive (should apply) E Exclusive (should not apply)

The OPTION field can take the following values: EQ Equal GT Greater than NE Not equal BT Between LE
Less

than or equal NB Not between LT Less than CP Contains pattern GE Greater than or equal NP No
pattern.

Select Options vs Parameters

PARAMETERS allow users to enter a single value into an internal field within a report.

SELECT-OPTIONS allow users to fill an internal table with a range of values.

For each PARAMETERS or SELECT-OPTIONS statement you should define text elements by choosing

Goto - Text elements - Selection texts - Change. http://abap-tutorials.com 2010

Eg:- Parameters name(30).

when the user executes the ABAP/4 program,an input field for 'name' will appear on the selection
screen.You can change the

comments on the left side of the input fields by using text elements as described in Selection Texts.

38. How do you validate the selection criteria of a report?

And how do you display initial values in a selection screen?

validate :- by using match code objects.
display :- Parameters default 'xxx'.

select-options for spfli-carrid.



39. What are selection texts?

40. What is CTS and what do you know about it?

The Change and Transport System (CTS) is a tool that helps you to organize development projects in the
ABAP Workbench and

in Customizing, and then transport the changes between the SAP Systems and clients in your system
landscape.

This documentation provides you with an overview of how to manage changes with the CTS and
essential information on setting

up your system and client landscape and deciding on a transport strategy. Read and follow this
documentation when planning

your development project.

For practical information on working with the Change and Transport System, see Change and Transport
Organizer and

Transport Management System.

41. When a program is created and need to be transported to prodn does selection texts always go with
it? if not how do you

make sure? Can you change the CTS entries? How do you do it?

42. What is the client concept in SAP? What is the meaning of client independent?

43. Are programs client dependent?

Yes.Group of users can access these programs with a client no.

44. Name a few system global variables you can use in ABAP programs?

SY-SUBRC,SY-DBCNT,SY-LILLI,SY-DATUM,SY-UZEIT,SY-UCOMM,SY-TABIX.....

SY-LILLI IS ABSOLUTE NO OF LINES FROM WHICH THE EVENT WAS TRIGGERED.

45. What are internal tables? How do you get the number of lines in an internal table?

How to use a specific number occurs statement?
i)It is a standard data type object which exists only during the runtime of the program.

They are used to perform table calculations on subsets of database tables and for re-organising the
contents of database tables

according to users need.http://abap-tutorials.com 2010

ii)using SY-DBCNT.

iii)The number of memory allocations the system need to allocate for the next record population.

46. How do you take care of performance issues in your ABAP programs?

Performance of ABAPs can be improved by minimizing the amount of data to be transferred.

The data set must be transferred through the network to the applications, so reducing the amount OF
time and also reduces the

network traffic.

Some measures that can be taken are:

- Use views defined in the ABAP/4 DDIC (also has the advantage of better reusability).

- Use field list (SELECT clause) rather than SELECT *.

- Range tables should be avoided (IN operator)

- Avoid nested SELECTS.

i)system tools

ii)field symbols and field groups.

ans:-

Field Symbols : Field symbols are placeholders for existing fields. A Field Symbol does not physically
reserve space for a

field,but points to a field which is not known until runtime of the program.

eg:- FIELD-SYMBOL [].

Field groups : A field group combines several fields under one name.At runtime,the INSERT command is
used to define which

data fields are assigned to which field group.
There should always be a HEADER field group that defines how the extracted data will be sorted,the
data is sorted by the fields

grouped under the HEADER field group.

47. What are datasets?

The sequential files(ON APPLICATION SERVER) are called datasets. They are used for file handling in SAP.

48. How to find the return code of a statement in ABAP programs?

Using function modules.

49. What are interface/conversion programs in SAP?

CONVERSION : LEGACY SYSTEM TO FLAT FILE.

INTERFACE : FLAT FILE TO SAP SYSTEM.

50. Have you used SAP supplied programs to load master data?

51. What are the techniques involved in using SAP supplied programs? Do you prefer to write your own
programs to load master

data? Why?

52. What are logical databases? What are the advantages/disadvantages of logical databases?
http://abap-tutorials.com 2010

To read data from a database tables we use logical database. A logical database provides read-only
access to a group of related

tables to an ABAP/4 program.

advantages

The programmer need not worry about the primary key for each table.Because Logical database knows
how the different tables

relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.

i)An easy-to-use standard user interface.

ii)check functions which check that user input is complete,correct,and plausible.

iii)meaningful data selection.

iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the
application logic.

disadvantages

i)If you donot specify a logical database in the program attributes,the GET events never occur.

ii)There is no ENDGET command,so the code block associated with an event ends with the next event

statement (such as another GET or an END-OF-SELECTION).

53. What specific statements do you using when writing a drill down report?

AT LINE-SELECTION,AT USER-COMMAND,AT PF.

54. What are different tools to report data in SAP? What all have you used?

55. What are the advantages and disadvantages of ABAP/4 query tool?



56. What are the functional areas? User groups? and how does ABAP/4 query work in relation to

these?

57. Is a logical database a requirement/must to write an ABAP/4 query?

59. What are Change header/detail tables? Have you used them?

60. What do you do when the system crashes in the middle of a BDC batch session?

we will look into the error log file (SM35).

61. What do you do with errors in BDC batch sessions?

We look into the list of incorrect session and process it again. To correct incorrect session we analyize
the session to determine

which screen and value produced the error.For small errors in data we correct them interactively
otherwise

modify batch input program that has generated the session or many times even the datafile.

62. How do you set up background jobs in SAP? What are the steps? What are the event driven batch
jobs?

go to SM36 and create background job by giving job name,job class and job steps(JOB SCHEDULING)
63. Is it possible to run host command from SAP environment? How do you run? http://abap-
tutorials.com 2010



64. What kind of financial periods exist in SAP? What is the relavent table for that?

65. Does SAP handle multiple currencies? Multiple languages?

Yes.

66. What is a currency factoring technique?

67. How do you document ABAP/4 programs? Do you use program documentation menu option?

68. What is SAPscript and layout set?

The tool which is used to create layout set is called SAPscript. Layout set is a design document.

69. What are the ABAP/4 commands that link to a layout set?

Control commands,system commands,

70. What is output determination?

71. What are IDOCs?

IDOCs are intermediate documents to hold the messages as a container.

72. What are screen painter? menu painter? Gui status?

dynpro - flow logic + screens.

menu painter -

GUI Status - It is subset of the interface elements(title bar,menu bar,standard tool bar,push buttons)
used for a certain screen.

The status comprises those elements that are currently needed by the transaction.

73. What is screen flow logic? What are the sections in it? Explain PAI and PBO.

The control statements that control the screen flow.

PBO - This event is triggered before the screen is displayed.

PAI - This event is responsible for processing of screen after the user enters the data and clicks the
pushbutton.

74. Overall how do you write transaction programs in SAP?
Create program-SE93-create transcode-Run it from command field.

75. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is
the other type of screen

painter called?

76. What are step loops? How do you program pagedown pageup in step loops?

step loops are repeated blocks of field in a screen.

77. Is ABAP a GUI language?

Yes.

ABAP IS AN EVENT DRIVEN LANGUAGE.http://abap-tutorials.com 2010

78. Normally how many and what files get created when a transaction program is written?

What is the XXXXXTOP program?

ABAP/4 program.

DYNPRO

79. What are the include programs?

When the same sequence of statements in several programs are to be written repeadly they are coded
in include programs

(External programs) and are included in ABAP/4 programs.

80. Can you call a subroutine of one program from another program?

Yes- only external subroutines Using 'SUBMIT' statement.

81. What are user exits? What is involved in writing them? What precations are needed?

82. What are RFCs? How do you write RFCs on SAP side?

83. What are the general naming conventions of ABAP programs?

Should start with Y or Z.

84. How do you find if a logical database exists for your program requrements?

SLDB-F4.

85. How do you find the tables to report from when the user just tell you the transaction he uses? And
all the underlying data is
from SAP structures?

Transcode is entered in command field to open the table.Utilities-Table contents-display.

86. How do you find the menu path for a given transaction in SAP?

87. What are the different modules of SAP?

FI,CO,SD,MM,PP,HR.

89. How do you get help in ABAP?

HELP-SAP LIBRARY,by pressing F1 on a keyword.

90. What are different ABAP/4 editors? What are the differences?

91. What are the different elements in layout sets?

PAGES,Page windows,Header,Paragraph,Character String,Windows.

92. Can you use if then else, perform ..etc statements in sap script?

yes.

93. What type of variables normally used in sap script to output data?

94. How do you number pages in sapscript layout outputs?

95. What takes most time in SAP script programming?

LAYOUT DESIGN AND LOGO INSERTION.http://abap-tutorials.com 2010

96. How do you use tab sets in layout sets?

97. How do you backup sapscript layout sets? Can you download and upload? How?

98. What are presentation and application servers in SAP?

The application layer of an R/3 System is made up of the application servers and the message server.
Application programs in

an R/3 System are run on application servers. The application servers communicate with the
presentation components, the

database, and also with each other, using the message server.

99. In an ABAP/4 program how do you access data that exists on a presentation server vs on an
application server?

i)using loop statements.
ii)flat

100. What are different data types in ABAP/4?

Elementary -

predefined C,D,F,I,N,P,T,X.

userdefined TYPES.

ex: see in intel book page no 35/65

Structured -

predefined TABLES.

userdefined Field Strings and internal tables.

101. What is difference between session method and Call Transaction?

102. Setting up a BDC program where you find information from?

103. What has to be done to the packed fields before submitting to a BDC session.

fields converted into character type.

104. What is the structure of a BDC sessions.

BDCDATA (standard structure).

105. What are the fields in a BDC_Tab Table.

program,dynpro,dynbegin,fnam,fval.

106. What do you define in the domain and data element.

Technical details like

107. What is the difference between a pool table and a transparent table and how they are stored at the
database level.

ii)Pool tables is a logical representation of transparent tables .Hence no existence at database level.
Where as transparent tables

are physical tables and exist at database level.

108. What is cardinality? http://abap-tutorials.com 2010

For cardinality one out of two (domain or data element) should be the same for Ztest1 and Ztest2 tables.
M:N
Cardinality specifies the number of dependent(Target) and independent (source) entities which can be
in a relationship.




ABAP Interview Questions & Answers

Set 6

http://abap-tutorials.comhttp://abap-tutorials.com 2010

What is a table pool?

A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary. The definition
of a pool consists of at

least two key fields and a long argument field (VARDATA).

What are pooled tables?

These are logical tables, which must be assigned to a table pool when they are defined. Pooled tables
can be used to store

control data (such as screen sequences or program parameters).

What are local objects?

Local objects (Dev class$TMP) are independent of correction and transport system.

What is the max. no. Of structures that can be included in a table or structure? To how many tables can
an append structure be

assigned?

Nine, One.

What is the difference between a Substructure and an Append Structure?


include….

                ppend structure, the table itself remains unchanged and the reference originates in the
append
structure.

Can you delete a domain, which is being used by data elements?

No.

What are conversion routines?

Non-standard conversions from display format to sap internal format and vice-versa are implemented
with so called conversion

routines.http://abap-tutorials.com 2010

It is not possible to create an ABAP/4 program, which contains only Subroutines (T/F).

F

Data can be passed between calling programs and the subroutines using Parameters.

Apart from the structure and selections of the LDB the GET statements in the report determines the
behavior of the database at

runtime.

Is it true that the Logical Database reads the data from the database tables using Select Statements
(T/F).

Yes. We are coding that in Database part of LDB.

The UNDER Command allows for vertical alignment of fields one below the other.

If SY-UZEIT has the value 6:34:45 it can be displayed as 063445 using No Edit Mask.

To execute a page break under the condition that less than a certain number of lines is left on a page is
achieved by RESERVE n

lines.

How would you define a field symbol?

FIELD-SYMBOLS<FS>.

In relation to module pool programming scrollable fields have a ___________ that is smaller than the
_________. – Visible

length, defined length.

The message type determines ______ and __________. – Where the message is displayed, what action
the user can/must take
on the current screen.http://abap-tutorials.com 2010

The different types of windows are ______ , _______ , _________ ( Main, VAR and CONST) Each page
can consist of up to

________ main windows (99).

What are the 2 principal advantages of forms over reports? – Forms have font control and have graphic
elements, forms can be

event triggered.

What are the different buffering types for tables? – single record generic and full.

When transferring data into the SAP system, we can refer to 2 types of transfers. Name them. –
conversions and interfaces.

Name the 5 different types of work processes. – dialog, update, enqueue, spool, background.

Which two events are triggered by pressing the F1 and F4 keys respectively in Dialog Programming? –
POV and POH Requestshttp://abap-tutorials.com 2010

1. What information does the SAP data dictionary store? - Metadata

2. _____________ provides the interface between the ABAP dictionary and the underlying DBMS. –
Database Utility.

3. What are the basic objects of the ABAP Dictionary? – tables, data elements and domains.

4. A field is not a dictionary object. True/False – true

5. What are table fields defined by in SAP R/3? – data elements and domains.

6. A domain specifies the _______________ and ________________ of a field. – technical
characteristics, allowed values

7. What represents the relationships between tables in the ABAP dictionary. – Foreign keys

8. In order to have a foreign key relationship established in SAP, the fields involved must share the same
______________

and that ________________ must have a ___________________ specified. – domain, domain, value
table.

9. What is the difference between a value table and a check table? – value table contains set of allowed
values attached to

a domain, check is that which is referenced by a foreign key.
10. When creating foreign key relationships you should always specify the ______________ cardinality
of that relationship.

11. In the instance the primary of a check table has multiple values, what are the different types of
assignments that may be

made for each field while creating the foreign key relationship? – field-by-field, assignment, partial
foreign key, constant

foreign key.

12. Name the 5 different table types in the SAP ABAP dictionary. – transparent, structures, pool tables,
cluster tables, views.

13. SAP stores __________ data and ____________ exclusively in transparent tables. – master,
transaction.

14. What type of data is stored by pool tables? – control data e.g. screen sequences or program
parameters.

15. Name the different data classes tables in the ABAP dictionary may be assigned to. – master data
(appl0), transaction

data (appl1), organization and customizing data (appl2) and user data (user).

16. What are the different buffering types for tables? – single record generic and full.

17. Groups of fields may be added to customer tables using ____________. – substructures.

18. Groups of fields may be added to SAP delivered tables using ____________ and _____________. –
append structures

and customizing includes.

19. In the case of nested structures upto how many nesting levels are allowed? – 9

20. In a nested chain, TRANSP table types may exist

a) once – correct answer

b) twice

c) thricehttp://abap-tutorials.com 2010

d) none of the above

21. What is the difference between an elementary search help and a collective search help?
22. Name the different points at which a search help might be attached in the exact order in which the
system checks for

them. – field, table, data element.

23. The CLEAR <field> statement sets a field back to its default value – True/False ans: false.

24. Explain in brief what happens if the logical outcome of a CHECK statement evaluates to false in case
the CHECK

statement is in a loop, outside a loop but within a subroutine and both outside a loop and outside a
subroutine.

25. The ___________ statement unconditionally terminates a loop, subroutine or program. – EXIT

26. An internal table type is defined using the ____________ statement wheras an internal table object
is created using the

_____________ statement. – TYPES, DATA.

27. In case of internal tables, where user-defined key is used differentiate between unique and non-
unique keys. –

additional records with the same key would be permitted in case of the latter.

28. If an internal table is created using the initial size addition then what problem is faced while using
the statement

APPEND <internal table> SORTED BY <field>? – number of entries in the table exceeding the initial size
clause are

deleted.

29. Write the different variants of the READ TABLE clause. – read table <internal table>, read table
<internal table> with key

<key>, read table <internal table> with key <key> binary search, read table <internal table> index <i>.

30. Differentiate between the CLEAR, REFRESH AND FREE internal table statements. – clear initializes all
fields in the header

line, refresh deletes all table lines but the storage space is not released and header line remains
unchanged and free

releases the storage space for the table and the header line remains unchanged.

31. Name the three methods by which parameters may be passed to a subroutine. – pass by value, pass
by value and result
and pass by reference.

32. ________ and ___________ are the two statements that can be used to define new variables within
subroutines with

type length and default values. – data, statics

33. Name the 5 different types of work processes. – dialog, update, enqueue, spool, background.

34. Name the different options available for scheduling jobs. – immediate, date/time, after job, after
event, at operation

mode.

35. Which function module should be used for creating a local file when the user is not to be allowed to
enter the file name

and the file type. – ws_download

36. When transferring data into the SAP system, we can refer to 2 types of transfers. Name them. –
conversions and

interfaces.

37. Name the different fields of the BDCDATA structure along with their descriptions.

38. ABAP is an __________ programming language. – event-driven

39. ________________________ event allows a programmer to display headers for detail lists. – top-of-
page-during lineselection

40. Name the different events in ABAP reporting in the order in which they are triggered.

41. In all programs GUI refers to 5 components. Name them. – Function key assignments, standard
toolbar, application

toolbar, menu bar and titlebar.

42. Which system field is automatically updated when the at line-selection event is triggered? – Sy-lisel.

43. Which statement is used to store specific fields from the user’s selected line? – Hide

44. What syntax is used for storing the contents of a specified line number into the sy-lisel system field?
– read line

45. What check needs to be done in case of a read line statement to prevent endless looping? – system
field sy-subrc to be

checked.http://abap-tutorials.com 2010
46. What syntax is used for retrieving both the field name and its value that the user selected on the
report? – get cursor

field <variable 1> value <variable 2>

47. How can the default size of 132 columns be overridden in case a report? – line-size command.

48. When you refer to any field in ABAP program component or flow logic it refers to the ___________
field and not the

___________ field. - program, screen.

49. All I/O templates are automatically checked by the system for _____________ and _____________
and I/O templates

painted from the ABAP dictionary are checked for _____________ and _______________. – required
field, proper

format, foreign key value, valid value.

50. Name the different types of messages. – success, information, abend, exit, warning, error.

51. Which syntax is used for keeping screen fields open for input even after erroneous entries in case of
dialog

programming? – chain endchain

52. Name the 2 types of locks as used in SAP. – database locks and logical locks

53. Name the function module used for handling user-defined lock objects. – enqueue – dequeue

54. In the instance the dialog program leads from one screen to the next, the ___________ are carried
forth while the

________________ are automatically released by the system. – logical locks, database locks

55. Which two events are triggered by pressing the F1 and F4 keys respectively in Dialog Programming?
– POV and POH

Requests
ABAP Interview Questions & Answers

Set 7

http://abap-tutorials.comhttp://abap-tutorials.com 2010

1. What guarantees the integration of all application modules?

  The R/3 basis system guarantees the integration of all application modules. The R/3 basis s/w
provides the run time

environment for the R/3 applications ensures optimal integration, defines a stable architectural frame
for system

enhancements, and contains the administration tools for the entire system.One of the main tasks of the
basis system is

to guarantee the portability of the complete system.

2. What are the central interfaces of the R/3 system?

  Presentation Interface.

Database Interface.

Operating system Interface.

3. Which interface controls what is shown on the p.c.?

Presentation Interface.

4. Which interface converts SQL requirements in the SAP development system to those of the database?

Database Interface.

5. What is SAP dispatcher?

SAP dispatcher is the control agent that manages the resources for the R/3 applications.

6. What are the functions of dispatcher?

Equal distribution of transaction load to the work processes.
Management of buffer areas in main memory.

Integration of the presentation levels.

Organization of communication activities.

7. What is a work process?

A work process is where individual dialog steps are actually processed and the work is done. Each work
process

handles one type of request.http://abap-tutorials.com 2010

8. Name various work processes of R/3 system?

  Dialog or Online (processes only one request at a time).

Background (Started at a specific time)

Update (primary or secondary)

Enque (Lock mechanism).

Spool (generated online or during back ground processing for printing).

9. Explain about the two services that are used to deal with communication.

Message Service: Used by the application servers to exchange short internal messages, all system
communications.

Gateway Service: Enables communication between R/3 and external applications using CPI-C protocol.

10. Which work process triggers database changes?

Update work process.

11. Define service (within R/3)?

A service is a process or group of processes that perform a specific system function and often provide an
applicationprogramming interface for other processes to call.

12. What are the roll and page areas?

Roll and page areas are SAP R/3 buffers used to store user contexts (process requests). The SAP
dispatcher assigns

process requests to work processes as they are queued in the roll and page areas.

Paging area holds data from the application programs.
Roll area holds data from previous dialog steps and data that characterize the user.

13. What are the different layers in R/3 system?

Presentation Layer.

Application Layer.

Database Layer.http://abap-tutorials.com 2010

14. What are the phases of background processing?

Job Scheduling.

Job Processing.

Job Overview.

15. What components of the R/e system initiate the start of background jobs at the specified time?

The batch scheduler initiates the start of background job. The dispatcher then sends this request to an
available

background work process for processing.

16. Define Instance.

An instance is an administrative unit in which components of an R/3 systems providing one or more
services are

grouped together. The services offered by an instance are started and stopped at random. All
components are

parameterized using a joint instance profile. A central R/3 system consists of a single instance in which
all-necessary

SAP services are offered. Each instance uses separate buffer areas.

17. From hardware perspective, every information system can be divided into three task areas
Presentation,

Application Logic and Data Storage.

The R/3 Basis software is highly suitable for use in multi-level client/server architectures.

18. What are R/3 Basis configurations?

A central system with centrally installed presentation software.
Two-level client/server system with rolled out presentation software.

Two-level client/server system. Presentation and Application run on the same computer.

Three-level client/server system. Presentation, Application and database each run on separate
computers.

19. What is a Service in SAP terminology?

A service refers to something offered by a s/w component.

20. What is Server in SAP terminology?

A component can consist of one process or a group and is then called the server for the respective
service.

21. What is a client in SAP terminology?http://abap-tutorials.com 2010

A S/W component that uses the service (offered by a s/w component) is called a Client. At the same
time these clients

may also be servers for other services.

22.What is a SAP system?

The union of all s/w components that are assigned to the same databases is called as a SAP system.

23. What is the means of communications between R/3 and external applications?

The means of communication between R/2,R/3 and external applications is via the CPI-C handler or SAP
Gateway,

using the CPI-C Protocol.

24. What is the protocol used by SAP Gateway process?

The SAP Gateway process communicates with the clients based on the TCP/IP Protocol.

25. Expand CPI-C.

Common Program Interface Communication.

26. What is a Spool request?

Spool requests are generated during dialog or background processing and placed in the spool database
with information

about the printer and print format. The actual data is places in the Tem Se (Temporary Sequential
objects).
27. What are different types of Log records?

V1 and V2. V1 must be processed before V2. But, we can have more than one V2 logs.

28. What are the types of Update requests?

An update request can be divided into one primary (V1) and several Secondary update components (V2).
Time-critical

operations are placed in V1 component and those whose timing is less critical are placed in V2
components. If a V1

update fails, V2 components will not be processed.

29. Dialog work processes perform only one dialog step and then available for the next request.

30. Explain what is a transaction in SAP terminology.

In SAP terminology, a transaction is series of logically connected dialog steps.

31. Explain how SAP GUI handles output screen for the user.http://abap-tutorials.com 2010

The SAP front-end s/w can either run on the same computer or on different computers provided for that
purpose. User

terminal input is accepted by the SAP terminal program SAP GUI, converted to SAP proprietary format
and sent to the

SAP dispatcher. The dispatcher coordinates the information exchange between the SAP GUIs and the
work processes.

The dispatcher first places the processing request in request queues, which it then processes. The
dispatcher dispatches

the requests one after another, to the available work process. The actual processing takes place in the
work process.

When processing is complete, the result of a work process is returned via the dispatcher to the SAP GUI.
The SAP

GUI interprets the received data and generates the output screen for the user.

BDC

1.    What is full form of BDC Session?

Batch Data Communication Session.

2. What are the steps in a BDC session?
The first step in a BDC session is to identify the screens of the transaction that the program will process.
Next step is

to write a program to build the BDC table that will be used to submit the data to SAP. The final step is to
submit the

BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION
command.

3.      How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à STATUS command from any menu.

4. How do you save data in BDC tables?

The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.

5. What is the last entry in all BDC tables?

In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value
of ‘/11’.

6. What is a multiple line field?

A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.

7. How do you populate data into a multiple line field?

To populate data into a multiple line field, an index is added to the field name to indicate which line is to
be populated

by the BDC session (Line index).

8. Write the BDC table structure.

BDC table structurehttp://abap-tutorials.com 2010

FIELD             TYPE                  DESCRIPTION

Program            CHAR (8)              Program name of transaction.

DynPro            CHAR (4)               Screen number of transaction.

DynBegin           CHAR (1)              Indicator for new screen.

Fnam              CHAR (35)              Name of database field from screen.

Fval              CHAR (80) Value to submit to field.
9.     Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

10. Does the BDC-INSERT function allow multiple transactions to be processed by SAP?

Yes.

11. What is the syntax for „CALL TRANSACTION‟?

CALL TRANSACTION trans [using bdctab MODE mode].

Three possible entries are there for MODE.

            A      -       Show all screens.

E       -       Show only screens with errors.

N       -       Show no screens.

1. What are the layers of data description in R/3?

        The external layer.

The ABAP/4 layer.

The database layer.http://abap-tutorials.com 2010

2. Define external layer?

The external layer is the plane at which the user sees and interacts with the data, that is, the data
format in the user

interface. This data format is independent of the database system used.

3. Define ABAP/4 layer?

The ABAP/4 layer describes the data formats used by the ABAP/4 processor.

4. Define Database layer?

     The database layer describes the data formats used in the database.

5. What is a Data Class?

The Data class determines in which table space the table is stored when it is created in the database.

6. What is a Size Category?

The Size category describes the probable space requirement of the table in the database.
7. How many types of size categories and data classes are there?

There are five size categories (0-4) and 11 data classes only three of which are appropriate for
application tables:

    APPL0- Master data (data frequently accessed but rarely updated).

APPL1- Transaction data (data that is changed frequently).

APPL2- Organizational data (customizing data that is entered when system is configured and then rarely

changed).

The other two types are:

      USR

USR1 – Intended for customer’s own developments.

8. What are control tables?

The values specified for the size category and data class are mapped to database-specific values via
control tables.

9. What is the function of the transport system and workbench organizer? http://abap-tutorials.com
2010

The function of the transport system and the Workbench Organizer is to manage any changes made to
objects of the

ABAP/4 Development Workbench and to transport these changes between different SAP systems.

10. What is a table pool?

A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary. The definition
of a pool consists of

at least two key fields and a long argument field (VARDATA).

11. What are pooled tables?

These are logical tables, which must be assigned to a table pool when they are defined. Pooled tables
can be used to store

control data (such as screen sequences or program parameters).

12. What is a table cluster?
A table cluster combines several logical tables in the ABAP/4 Dictionary. Several logical rows from
different cluster tables

are brought together in a single physical record. The records from the cluster tables assigned to a cluster
are thus stored in

a single common table in the database.

13. How can we access the correction and transport system?

Each time you create a new object or change an existing object in the ABAP/4 Dictionary, you branch
automatically to the

Workbench Organizer or correction and transport system.

14. Which objects are independent transport objects?

Domains, Data elements, Tables, Technical settings for tables, Secondary indexes for transparent tables,
Structures, Views,

Matchcode objects, Matchcode Ids, Lock objects.

15. How is conversion of data types done between ABAP/4 & DB layer?

Conversion between ABAP/4 data types and the database layer is done within the database interface.

16. How is conversion of data types done between ABAP/4 & external level?

Conversion between the external layer and the ABAP/4 layer is done in the SAP dialog manager DYNP.

17. What are the Data types of the external layer?

ACCP, Char, CLNT, CUKY, CURR, DATS, DESC, FLTP, INT1, INT2, INT4, LANG, LCHR, LRAW, NUMC, PREC,
QUAN, RAW, TIMS,

UNIT,VARC.

18. What are the Data types of the ABAP/4 layer? http://abap-tutorials.com 2010

Possible ABAP/4 data types:

C: Character.

D: Date, format YYYYMMDD.

F: Floating-point number in DOUBLE PRECISION (8 bytes).

I: Integer.
N: Numerical character string of arbitrary length.

P: Amount of counter field (packed; implementation depends on h/w platform).

S: Time Stamp YYYYMMDDHHMMSS.

V: Character string of variable length, length is given in the first two bytes.

X: Hexadecimal (binary) storage.

19. How can we set the table spaces and extent sizes?

You can specify the extent sizes and the table space (physical storage area in the database) in which a
transparent table is to

be stored by setting the size category and data class.

20. What is the function of the correction system?

The correction system manages changes to internal system components. Such as objects of the ABAP/4
Dictionary.

21. What are local objects?

Local objects (Dev class$TMP) are independent of correction and transport system.

22. What is a Development class?

Related objects from the ABAP/4 repository are assigned to the same development class. This enables
you to correct and

transport related objects as a unit.

23. What is a data dictionary? http://abap-tutorials.com 2010

Data Dictionary is a central source of data in a data management system. Its main function is to support
the creation and

management of data definitions. It has details about

       what data is contained?

What are the attributes of the data?

       What is the relationship existing between the various data elements?

24. What functions does a data dictionary perform?

In a data management system, the principal functions performed by the data dictionary are
        Management of data definitions.

Provision of information for evaluation.

Support for s/w development.

Support form documentation.

Ensuring that the data definitions are flexible and up-to-date.

25. What are the features of ABAP/4 Dictionary?

The most important features are:

        Integrated to aABAP/4 Development Workbench.

Active in the runtime environment.

26. What are the uses of the information in the Data dictionary?

The following information is directly taken from the Data dictionary:

        Information on fields displayed with F1 help.

Possible entries for fields displayed with F4 help.

Matchcode and help views search utilities.

27. What are the basic objects of the data dictionary? http://abap-tutorials.com 2010

        Tables

        Domains

Data elements

Structures

Foreign Keys

28. What are the aggregate objects in the data dictionary?

Views

Match codes

Lock objects.

29. In the ABAP/4 Dictionary Tables can be defined independent of the underlying database (T/F).
True.

30. ABAP/4 Dictionary contains the Logical definition of the table.

31. A field containing currency amounts (data type CURR) must be assigned to a reference table and a

reference field. Explain.

As a reference table, a system containing all the valid currencies is assigned or any other table, which
contains a field with

the currency key format. This field is called as reference field. The assignment of the field containing
currency amounts to

the reference field is made at runtime. The value in the reference field determines the currency of the
amount.

32. A field containing quantity amounts (data type QUAN) must be assigned to a reference table and a

reference field. Explain?

As a reference table, a system table containing all the valid quantity units is assigned or any other table,
which contains a

field with the format or quantity units (data type UNIT). This field is called as reference field.

The assignment of the field containing quantity amounts to the reference field is made at runtime. The
value in the

reference field determines the quantity unit of the amount.

33. What is the significance of Technical settings (specified while creating a table in the data dictionary)?
By

specifying technical settings we can control how database tables are created in the database. The

technical settings allows us to http://abap-tutorials.com 2010

        Optimize storage space requirements.

Table access behavior.

Buffering required.

Changes to entries logged.

34. What is a Table attribute?
The table’s attributes determine who is responsible for maintaining a table and which types of access
are allowed for the

table. The most important table attributes are:

        Delivery class.

Table maintenance allowed.

Activation type.

35. What is the significance of Delivery Class?

      The delivery class controls the degree to which the SAP or the customer is responsible for table
maintenance.

        Whether SAP provides the table with or without contents.

Determines the table type.

Determines how the table behaves when it is first installed, at upgrade, when it is transported, and
when a

client copy is performed.

36. What is the max. no. Of structures that can be included in a table or structure.

Nine.

37. What are two methods of modifying SAP standard tables?

        Append Structures and

Customizing Includes.

38. What is the difference between a Substructure and an Append Structure?

In case of a substructure, the reference originates in the table itself, in the form of a statement
include….http://abap-tutorials.com 2010

      In case of an append structure, the table itself remains unchanged and the reference originates in
the append

structure.

39. To how many tables can an append structure be assigned.

One.
40. If a table that is to be extended contains a long field, we cannot use append structures why?

Long fields in a table must always be located in the end, as the last field of the table. If a table has an
append structure the

append line must also be on the last field of the table.

41. Can we include customizing include or an append structure with Pooled or Cluster tables?

No.

42. What are the two ways for restricting the value range for a domain?

        By specifying fixed values.

By stipulating a value table.

43. Structures can contain data only during the runtime of a program (T/F)

True.

44. What are the aggregate objects in the Dictionary?

        Views

Match Code.

Lock Object.

45. What are base tables of an aggregate object?

   The tables making up an aggregate object (primary and secondary) are called aggregate object.

46. The data of a view is not physically stored, but derived from one or more tables (t/f)

True.

47. What are the 2 other types of Views, which are not allowed in Release 3.0? http://abap-
tutorials.com 2010

        Structure Views.

Entity Views.

48. What is a Match Code?

   Match code is a tool to help us to search for data records in the system. Match Codes are an efficient
and user-friendly

search aid where key of a record is unknown.
49. What are the two levels in defining a Match Code?

       Match Code Object.

Match Code Id.

50. What is the max no of match code Id‟s that can be defined for one Match code object?

A match code Id is a one character ID that can be a letter or a number.

51. Can we define our own Match Code ID‟s for SAP Matchcodes?

Yes, the number 0 to 9 are reserved for us to create our own Match Code Ids for a SAP defined
Matchcode object.

52. What is an Update type with reference to a Match code ID?

If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated.
The update type

stipulates when the matchcode is to be updated and how it is to be done. The update type also specifies
which method is to

be used for Building matchcodes. You must specify the update type when you define a matchcode ID.

53. Can matchcode object contain Ids with different update types?

Yes.

54. What are the update types possible?

The following update types are possible:

       Update type A: The matchcode data is updated asynchronously to database changes.

Update type S: The matchcode data is updated synchronously to database changes.

Update type P: The matchcode data is updated by the application program.http://abap-tutorials.com
2010

       Update type I: Access to the matchcode data is managed using a database view.

Update type L: Access to the matchcode is achieved by calling a function module.

55. What are the two different ways of building a match code object?

A match code can be built in two different ways:
       Logical structure: The matchcode data is set up temporarily at the moment when the match code
is accessed.

(Update type I, k).

Physical Structure: The match code data is physically stored in a separate table in the database. (Update
type

A, S, P).

56. What are the differences between a Database index and a match code?

      Match code can contain fields from several tables whereas an index can contain fields from only
one table.

Match code objects can be built on transparent tables and pooled and cluster tables.

57. What is the function of a Domain?

A domain describes the technical settings of a table field.

A domain defines a value range, which sets the permissible data values for the fields, which refers to this

domain.

A single domain can be used as basis for any number of fields that are identical in structure.

58. Can you delete a domain, which is being used by data elements?

No.

59. What are conversion routines?

      Non-standard conversions from display format to sap internal format and vice-versa are
implemented with so

called conversion routines.

60. What is the function of a data element?

A data element describes the role played by a domain in a technical context. A data element contains
semantic information.

61. Can a domain, assigned to a data element be changed? http://abap-tutorials.com 2010

Yes. We can do so by just overwriting the entry in the field domain.

62. Can you delete data element, which is being used by table fields.
No.

63. Can you define a field without a data element?

Yes. If you want to specify no data element and therefore no domain for a field, you can enter data type
and field length

and a short text directly in the table maintenance.

64. What are null values?

If the value of a field in a table is undefined or unknown, it is called a null value.

65. What is the difference between a structure and a table?

Structures are constructed the almost the same way as tables, the only difference using that no
database table is generated

from them.

66. What is a view?

A view is a logical view on one or more tables. A view on one or more tables i.e., the data from a view is
not actually

physically stored instead being derived from one or more tables.

67. How many types of Views are there?

       Database View

Help View

Projection View

Maintenance View

68. What is Locking?

When two users simultaneously attempt to access the same data record, this is synchronized by a lock
mechanism.

69. What is database utility? http://abap-tutorials.com 2010

Database utility is the interface between the ABAP/4 Dictionary and the underlying the SAP system.

70. What are the basic functions of Database utility?

The basic functions of database utility are:
        Create database objects.

Delete database objects.

Adjust database objects to changed ABAP/4 dictionary definition.

71. What is Repository Info. Systems?

It is a tool with which you can make data stored in the ABAP/4 Dictionary available.

1. Does every ABAP/4 have a modular structure?

Yes.

2. What is Modularization and its benefits?

If the program contains the same or similar blocks of statements or it is required to process the same
function several times,

we can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we
make them easy to

read and improve their structure. Modularized programs are also easier to maintain and to update.

3. Name the ABAP/4 Modularization techniques.

·      Source code module.

· Subroutines.

· Functions.

4. How can we create callable modules of program code within one ABAP/4 program?

·        By defining Macros.

· By creating include programs in the library.

5. M is the attribute type of the module program.

6. Is it possible to pass data to and from include programs explicitly? http://abap-tutorials.com 2010

No. If it is required to pass data to and from modules it is required to use subroutines or function
modules.

7. What are subroutines?

Subroutines are program modules, which can be called from other ABAP/4 programs or within the same
program.
8. What are the types of Subroutines?

·     Internal Subroutines: The source code of the internal subroutines will be in the same ABAP/4
program as the

calling procedure (internal call).

· External Subroutines: The source code of the external subroutines will be in an ABAP/4 program other
than

the calling procedure.

9. It is not possible to create an ABAP/4 program, which contains only Subroutines (T/F).

False.

10. A subroutine can contain nested form and endform blocks. (T/F)

False.

11. Data can be passed between calling programs and the subroutines using Parameters.

12. What are the different types of parameters?

   Formal Parameters: Parameters, which are defined during the definition of subroutine with the
FORM statement.

Actual Parameters: Parameters which are specified during the call of a subroutine with the PERFORM
statement.

13. How can one distinguish between different kinds of parameters?

·        Input parameters are used to pass data to subroutines.

· Output parameters are used to pass data from subroutines.

14. What are the different methods of passing data?

· Calling by reference: During a subroutine call, only the address of the actual parameter is transferred to
the

formal parameters. The formal parameter has no memory of its own, and we work with the field of the
calling

program within the subroutine. If we change the formal parameter, the field contents in the calling
program

also changes.http://abap-tutorials.com 2010
·      Calling by value: During a subroutine call, the formal parameters are created as copies of the
actual

parameters. The formal parameters have memory of their own. Changes to the formal parameters have
no

effect on the actual parameters.

·       Calling by value and result: During a subroutine call, the formal parameters are created as copies
of the actual

parameters. The formal parameters have their own memory space. Changes to the formal parameters
are

copied to the actual parameters at the end of the subroutine.

15. The method by which internal tables are passed is By Reference.

16. How can an internal table with Header line and one without header line be distinguished when
passed to a

subroutine?

   Itab [] is used in the form and endform if the internal table is passed with a header line.

17. What should be declared explicitly in the corresponding ABAP/4 Statements to access internal tables

without header lines & why?

Work Area. This is required as the Work Area is the interface for transferring data to and from the table.

18. A subroutine can be terminated unconditionally using EXIT. (T/F)

True.

19. A subroutine can be terminated upon a condition using CHECK Statement.

20. Function Modules are also external Subroutines. (T/F).

   True.

21. What is the difference between the function module and a normal ABAP/4 subroutine?

In contrast to normal subroutines function modules have uniquely defined interface. Declaring data as
common parts is not

possible for function modules. Function modules are stored in a central library.

22. What is a function group?
A function group is a collection of logically related modules that share global data with each other. All
the modules in the

group are included in the same main program. When an ABAP/4 program contains a CALL FUNCTION
statement, the system

loads the entire function group in with the program code at runtime. Every function module belongs to a
function group.http://abap-tutorials.com 2010

23. What is the disadvantage of a call by reference?

During a call by reference damage or loss of data is not restricted to the subroutine, but will instantly
lead to changes to the

original data objects.

24. A function module can be called from a transaction screen outside an ABAP/4 program. (T/F).

True.

25. What is an update task?

It is an SAP provided procedure for updating a database.

26. What happens if a function module runs in an update task?

The system performs the module processing asynchronously. Instead of carrying out the call
immediately, the system waits

until the next database update is triggered with the ‘COMMIT WORK’ command.

27. The function modules are created and stored in the Function Library.

28. When a function module is activated syntax checking is performed automatically. (Y/N)

True.

29. What is the use of the RAISING exception?

The raising exception determines whether the calling program will handle the exception itself or leave
the exception to the

system.

30. What is the difference between internal tables and extract datasets?

·      The lines of an internal table always have the same structure. By using extract datasets, you can
handle groups
of data with different structure and get statistical figures from the grouped data.

· You have to define the structure of the internal table at the beginning. You need not define the
structure of

the extract dataset.

· In contrast to internal tables, the system partly compresses exact datasets when storing them. This
reduces

the storage space required.

· Internal tables require special work area for interface whereas extract datasets do not need a special
work

area for interface.http://abap-tutorials.com 2010

31. It is possible to assign a local data object defined in a subroutine or function module to a field group.

(T/F).

False.

32. What is the difference between field-group header and other field groups?

The header field group is a special field group for the sort criteria. The system automatically prefixes any
other field groups

with the header field group.

33. Can a filed occur in several field groups.

Yes. But it leads to unnecessary data redundancy.

34. When sorting the extract dataset the fields used as default sort key lie in the Header field group.

35. What does the insert statement in extract datasets do?

   It defines the fields of a field group.

36. What does the extract statement do in extract datasets?

The data is written to virtual memory by extract commands.

37. A field-groups statement or an insert statement reverses storage space and transfers values. (T/F).

False.

38. While using extract datasets it is required to have a special workarea for interface (T/F)
False.

39. The LOOP-ENDLOOP on extract datasets can be used without any kind of errors (T/F)

False. It causes runtime errors.

40. The Maximum no of key fields that can be used in a header is 50.

41. While sorting field groups we cannot use more than one key field (T/F).

False.

42. While sorting, if the main storage available is not enough, the system writes data to an external help
file. The

SAP profile parameter, which determines this help file, is DIR_SORTTMP.http://abap-tutorials.com 2010

43. The extract statements in field groups can be used before or after processing the sort statements.
(T/F)

     FALSE.

REPORT GENERATION – FORMATTING

1. The alignment of a type „c‟ field in a report is left Aligned.

2. In the statement Write:/15(10) Ofal-lifnr. what do the number 15 and 10 stand for

     15 stand for the offset on the screen and 10 stands for the field length displayed.

3.    Specify the default alignment for the following field types:

‘D’ – Left, ‘F’-Right, ‘N’-Left, ‘I’-Right, ‘T’-Left.

4. If s_time has the value „123456‟ how would you get an output of 12:34:56 with a single „Write:‟

statement.

Write:s_time using edit mask’--:--:--‘.

5. In order to suppress the leading zeroes of a number field the keywords used are NO-ZERO.

6. The total no of date formats that can be used to display a date during output is MM/DD/YY,

DD/MM/YY, DD/MM/YYYY, MM/DD/YYYY, MMDDYY, DDMMYY, YYMMDD.

7. The UNDER Command allows for vertical alignment of fields one below the other.

8. In order to concatenate strings only for output purposes the command NO-GAP can be used in
conjunction with the „Write‟ statement.

9. The no of decimal places for output can be defines within a write statement. (T/F).

TRUE. Write:/<F> decimals 2.

10. Data can be moved from one field to another using a „Write:‟ Statement and stored in the desired
format.

(T/F).

TRUE. Write: Date_1 to Date_2 format DD/MM/YY.

11. In the statement Write:/15(10) lfa1-lifnr. The values 15 and 11 can also be defined by variables (T/F).

False.

12. Differentiate between the following two statements if any.

ULINE.http://abap-tutorials.com 2010

Write: sy-uline.

No-difference. Except that uline is used outside the ‘Write’ Statement.

13. In order to skip a single line the number of lines need not be given as an assignment (T/F)

TRUE.

14. The “SKIP TO LINE line number” is dependent on the LINE-COUNT statement included in the report

statement of the program.

15. In order to skip columns the command used is POSITION <n>.

16. In order to have boldfaced text as output the command used is Write:<f>INTENSIFIED.

17. Background and foreground colors can be interchanged using the command Format Inverse.

18. In order to restore the system defaults for all changes made with the format statement is Format
Reset.

19. Like ULINE the statement VLINE is used to insert vertical lines. (T/F).

False.

20. Suppressing the number signs (+/-) is carried out using the addition NO-SIGNS to the Write
statement. (T/F). False.

21. If SY-UZEIT has the value 6:34:45 it can be displayed as 063445 using No Edit Mask.
22. If the variable “Text” has the value „ABCDEF‟ the output for the statement “Write:/Text+2(3)” will
be

“CDE”

23. The fields specified by select-options and parameters statement cannot be grouped together in the

selection screen. (T/F). False.

24. When calling an external report the parameters or select-options specified in the external report
cannot

be called. (T/F)

FALSE.

25. Selection Texts in the text elements of the program helps in changing the displayed names of
variables in

the parameters statement.

26. Type F datatype cannot be used to define parameters.

27. Rounding off of values can be carried out using the write statement. (T/F). TRUE

28. How would you define the exponents for a type „f‟ field?

Exponent <e>.

29. How would you format the output as left, centered or right-justified using the write statement.

Left-justified, Centered, Right-justified.http://abap-tutorials.com 2010

30. If the same formatting options were used for a WRITE statement that follows the FORMAT
statement,

which settings would take precedence.

The settings in the Write Statement.

31. For each new event, the system resets all formatting options to their default values (T/F)

TRUE.

32. All formatting options have the default value OFF. (T/F).

TRUE.

33. How would you set the formatting options statically and dynamically within a report? Statically:
FORMAT <option1>*ON|OFF+….

Dynamically: FORMAT <option1> = <var1><option2>=<var2>….

34. The page footer is defined using the statement END-OF-PAGE.

35. The processing block following END-OF-PAGE is processed only if you reserve lines for the footer in
the

LINE-COUNT option of the REPORT statement. (T/F)

TRUE.

36. To execute a page break under the condition that less than a certain number of lines is left on a page
is

achieved by RESERVE n lines.

37. The RESERVE statement only takes effect if output is written to the subsequent page. No blank pages

are created and it defines a block of lines that must be output as a whole. (T/F). TRUE.

38. To set the next output line to the first line of a block of lines defined with the RESERVE statement the

statement BACK is used.

39. What is the limit for the length of a page if the page length is not specified in the report statement.
60,000

lines.

40. How would you start the printing process from within the program while creating a list?

NEW-PAGE PRINT ON.

41. You can change the width of pages within list levels triggered by page breaks. (T/F).

FALSE.

42. Hotspots are special areas of an output list used to trigger events. (T/F) TRUE.

43. To designate fields as hotspots at runtime, use FORMAT HOTSPOT = <h>.http://abap-tutorials.com
2010

44. Horizontal lines created with ULINE and blank lines created with SKIP can be formatted as hotspots.

(T/F). FALSE.

45. How would you suppress the display of a parameter on the selection screen?
Parameters <p> ………..No-Display.

46. Can you assign a matchcode object to a parameter? If so how?

Yes. PARAMETERS <p>……..MATCHCODE OBJECT <obj>……..

47. For each SELECT-OPTIONS statement, the system creates a selection table. (T/F)

TRUE.

48. To position a set of parameters or comments on a single line on the selection screen, you must
declare the

elements in a block enclosed by

SELECTION-SCREEN BEGIN OF LINE.

..……

SELECTION-SCREEN END OF LINE.

49. How can Symbols or R/3 icons be output on the screen?

  WRITE <symbol-name>AS SYMBOL.

WRITE <icon-name> AS ICON.

50. In the standard setting, you cannot create empty lines with the WRITE statement alone. (T/F). TRUE.

REPORTING – GENERAL

1. The system field, which indicates success or failure of a SQL operation, is SY-SUBRC.

2. What is the syntax for specifying database table name at runtime in SELECT statement.

NAME = ‘SPFL1’.

SELECT * FROM (NAME).http://abap-tutorials.com 2010

.………………

.………………

ENDSELECT.

3. How do you read selected lines of database table into an internal table in packages of predefined size.

SELECT * FROM <SPFLI>INTO TABLE <ITAB>PACKAGE SIZE<N>.

Where n is variable.
4. Name the WILDCARD characters which are used for comparisons with character strings & numeric

strings. „%‟ and „-„.

5. In SELECT statements can you specify a variable in WHERE condition or a part of the condition, if so

what is the syntax.

SELECT * FROM <table>WHERE <var1><condition><var or const>.

6. Name the ABAP/4 key words, which are used to change the contents of database table.

UPDATE or MODIFY.

7. How to specify a client for database table processing.

TABLES SPFLI.

SELECT * FROM SPFLI CLIENT SPECIFIED WHERE MANDT BETWEEN ‘001’ AND ‘003’.

..……

ENDSELECT.

8. How do you write a DATA object from ABAP/4 program to ABAP/4 memory and restore the same
from

memory to program.

EXPORT <f1>*FROM <g1>+<f2>*FROM <g2>+…. TO MEMORY ID <key>.

The ID <key>, which can be up to 32 characters long, identifies the data in memory.

9. What are DATA CLUSTERS? http://abap-tutorials.com 2010

You can group any complex internal data objects of an ABAP/4 program together in data clusters and
store them

temporarily in ABAP/4 memory or for longer periods in databases. You can store data clusters in special
databases of the

ABAP/4 Dictionary. These databases are known as ABAP/4 cluster databases and have a predefined
structure. Storing a

data cluster is specific to ABAP/4. Although you can also access cluster databases using SQL statements,
only ABAP/4

statements are able to decode the structure of the stored data cluster.
10. Statements used to delete data objects in ABAP/4 memory FREE MEMORY [ID <key>].

11. How will you create a file on application server.

Open dataset <dsn> for output.

12. ABAP/4 statement for opening a file on application server for reading Open dataset <dsn> for input.

13. How will you transfer data into a file in application server?

Data fname(60) value ‘mYFILE’.

Data num type i.

Open dataset fname for output.

Do 10 times.

Num = Num +1.

Transfer num to fname.

Enddo.     …….etc.

14. Name the function modules to write data from an Internal Table to the Presentation Server.

DOWNLOAD and WS_DOWNLOAD.

15. Name the function module that can be used to give information about files on Presentation Server
and

about its Operating System.

WS_QUERY.

16. Name the ABAP/4 key word, which is used to clear the Headerline of an Internal Table.

CLEAR<itab>.

17. Name the function modules to read data from Presentation Server into an Internal Table.
http://abap-tutorials.com 2010

UPLOAD and WS_UPLOAD.

18. Name the ABAP/4 keywords to initialize an Internal Table with and without headerline.

REFRESH <itab>.

19. How to determine the attributes of an internal table?
DESCRIBE TABLE <itab>[LINES <lin>] [OCCURS <occ>].

20. Name the ABAP/4 key word for searching a string in an Internal Table.

SEARCH <itab> FOR <str><options>.

The different options (<options>) for the search in an internal table are:

ABBREVIATED

Searches table<itab>for a word containing the character string specified in <str>, where other characters
might separate the

characters. The first letter of the word and the string <str> must be the same.

STARTING AT<lin1>

Searches table<itab> for <str>, starting at line <line1>. <\lin1> can be a variable.

ENDING AT<n2>

Searches table <itab>for <str>upto line<lin2>. <lin2>can be a variable.

AND MARK

If the search string is found, all the characters in the search string (and all the characters in between
when using

ABBREVIATED) are converted to upper case.

21. What are the different attributes that can be assigned to a variant?

The different attributes that can be assigned to a variant are….

Description

Enter a short, meaningful description of the variant. This may be upto 30 characters long.

Background onlyhttp://abap-tutorials.com 2010

Specify whether you want to use the variant in background processing only, or in online environment as
well.

Protected variant.

Mark the field if you want to protect your variant against being changed by other users.

Do not display variant.
Mark this field if you want the variant name to be displayed in the catalog only, but not in the F4 value
list.

For the selections you cover in a variant, you can enter the following attributes:

Type

The system displays whether the field is a parameter or a select option.

Protected

Mark this field for each field on the selection screen you want to protect from being overwritten. Values
that you mark this

way are displayed to the users, but they cannot change them, that are they are not ready to accept
input.

Invisible

If you mark this column, the system will not display the corresponding field on the selection screen the
user sees when

starting the report program.

Variable

Mark this column if you want to set the value for this field at runtime.

22. Is it possible to create new dynamic programs during runtime of an ABAP/4 program? If so how?

To create new dynamic programs during the runtime of an ABAP/4 program, you must use an internal
table. For this

purpose, you should create this internal table with one character type column and a line width of 72.
You can use any

method you like from Filling Internal Tables to write the code of your new program into the internal
table. Especially, you

can use internal fields in which contents are dependent on the flow of the program that you use to
create a new one, to

influence the coding of the new program dynamically. The following example shows how to proceed in
principal:

DATA CODE (72) OCCURS 10.

APPEND ‘REPORT ZDYN1.’
TO CODE.http://abap-tutorials.com 2010

APPEND ‘WRITE/”Hello, I am dynamically created!”.’

TO CODE.

Two lines of a very simple program are written into the internal table CODE.

In the next step you have to put the new module, in the above example it is a report, into the library. For
this purpose you

can use the following statement:

Syntax

INSERT REPORT <prog>FROM <itab>.

The program <prog> is inserted in your present development class in the R/3 Repository. If a program
with this name does

not already exists, it is newly created with the following attributes:

Title: none,

Type: 1 (Reporting),

Application: S (Basis).

You can specify the name of the program <prog> explicitly within single quotation marks or you can
write the name of a

character field, which contains the program name. The name of the program must not necessarily be
the same as given in

the coding, but it is recommended to do so. <itab> is the internal table containing the source code. For
the above example

you could write:

INSERT REPORT ‘ZDYN1’ FROM CODE.

Or

DATA REP (8).

REP = ‘ZDYN1’

INSERT REPORT REP FROM CODE.
23. Data types can be elementary or structured (T/F).

TRUE.

24. The amount of memory associated with a data type is ZERO.

25. Data objects are the physical units a program uses at runtime. (T/F). http://abap-tutorials.com 2010

TRUE.

26. The data object does not occupy any space in memory. (T/F)

FALSE.

27. What are the three hierarchical levels of data types and objects?

Program-independent data, defined in the ABAP/4 Dictionary.

Internal data used globally in one program.

Data used locally in a procedure (subroutine, function module)

28. How would you find the attributes of a data type or data object?

DESCRIBE FIELD <f> [LENGTH <l.] [TYPE <t> [COMPONENTS <n>]]

         [OUTPUT-LENGTH <o>] [DECIMALS <d>]

         [EDIT MASK <m>].

29. The components of a field string cannot have different data types. (T/F).

FALSE.

30. Field strings are also called as Record or Structures.

31. If a field string is aligned (Left, centered, right justified etc.), the filler fields are also added to the
length

of the type C field. (T/F).

TRUE.

32. You cannot assign a local data object defined in a subroutine or function module to a field group.
(T/F)

TRUE.

33. Field group reserves storage space for the fields, and does not contain pointers to existing fields
(T/F).
False.

34. Defining a field group as „HEADER‟ is optional (T/F)

FALSE.http://abap-tutorials.com 2010

35. How would you define a field symbol?

FIELD-SYMBOLS<FS>.

36. Which function module would you use to check the user‟s authorization to access files before
opening a

file?

AUTHORITY_CHECK_DATASET

37. Name the function module used to convert logical file names to physical file names in ABAP/4
programs.

FILE_GET_NAME.

38. Parameters, which are defined during the definition of a subroutine with the FORM statement, are
called

Formal Parameters.

39. Parameters which are specified during the call of a subroutine with the PERFORM statement are
called

Actual Parameters.

40. In subroutines internal tables that are passed by TABLES, are always called by value and result. (T/F)

FALSE. They are called by reference.

INTERACTIVE REPORTING

1.      What is interactive reporting?

It helps you to create easy-to-read lists. You can display an overview list first that contains general
information and provide

the user with the possibility of choosing detailed information that you display on further lists.

2. What are the uses of interactive reporting?

The user can actively control data retrieval and display during the session. Instead of an extensive and
detailed list, you
create a basic list with condensed information from which the user can switch to detailed displays by
positioning the cursor

and entering commands. The detailed information appears in secondary lists.

3. What are the event key words in interactive reporting?

Event Keyword                                 Event

AT LINE-SELECTION                   Moment at which the user selects a line by double clicking on it or by

positioning the cursor on it and pressing F2.http://abap-tutorials.com 2010

AT USER-COMMAND                       Moment at which the user presses a function key.

TOP-OF-PAGE DURING                   Moment during list processing of a

LINE-SELECTION                       secondary list at which a new page starts.

4. What is secondary list?

It allows you to enhance the information presented in the basic list. The user can, for example, select a
line of the basic list

for which he wants to see more detailed information. You display these details on a secondary list.
Secondary lists may

either overlay the basic list completely or you can display them in an extra window on the screen. The
secondary lists can

themselves be interactive again.

5. How to select valid lines for secondary list?

To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the
processing block ENDOF-SELECTION, delete the contents of one or more fields you previously stored for
valid lines using the HIDE statement. At

the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement
stored field contents

there. After processing the secondary list, clear the work area again. This prevents the user from trying
to create further

secondary lists from the secondary list displayed.

6. How to create user interfaces for lists?
The R/3 system automatically, generates a graphical user interface (GUI) for your lists that offers the
basic functions for list

processing, such as saving or printing the list. If you want to include additional functionality, such as
pushbuttons, you must

define your own interface status. To create a new status, the Development Workbench offers the Menu
Painter. With the

Menu Painter, you can create menus and application toolbars. And you can assign Function Keys to
certain functions. At the

beginning of the statement block of AT END-OF-SELECTION, active the status of the basic list using the
statement: SET PFSTATUS ‘STATUS’.

7. What is interactive reporting?

A classical non-interactive report consists of one program that creates a single list. Instead of one
extensive and detailed list,

with interactive reporting you create basic list from which the user can call detailed information by
positioning the cursor

and entering commands. Interactive reporting thus reduces information retrieval to the data actually
required.

8. Can we call reports and transactions from interactive reporting lists?

Yes. It also allows you to call transactions or other reports from lists. These programs then use values
displayed in the list as

input values. The user can, for example, call a transaction from within a list of change the database table
whose data is

displayed in the list.

9. What are system fields for secondary lists? http://abap-tutorials.com 2010

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-STARO          Number of the first line of the first page displayed of the list from which the event was
triggered (counting

starts with 1). Possibly, a page header occupies this line.

SY-STACO          Number of the first column displayed in the list from which the event was triggered
(counting starts with

1).

SY-UCOMM           Function code that triggered the event.

SY-PFKEY Status of the displayed list.

10. How to maintain lists?

To return from a high list level to the next-lower level (SY-LSIND), the user chooses Back on a secondary
list. The system

then releases the currently displayed list and activates the list created one step earlier. The system
deletes the contents of

the released list. To explicitly specify the list level, into which you want to place output, set the SY-lsind
field. The system

accepts only index values, which correspond to existing list levels. It then deletes all existing list levels
whose index is

greater or equal to the index specify. For example, if you set SY-LSIND to 0, the system deletes all
secondary lists and

overwrites the basic list with the current secondary list.

11. What are the page headers for secondary lists?

On secondary lists, the system does not display a standard page header and it does not trigger the
event. TOP-OF-PAGE. To

create page headers for secondary list, you must enhance TOP-OF-PAGE: Syntax TOP-OF-PAGE DURING
LINE-SELECTION.

The system triggers this event for each secondary list. If you want to create different page headers for
different list levels,
you must program the processing block of this event accordingly, for example by using system fields
such as SY-LSIND or SYPFKEY in control statements (IF, CASE).

12. How to use messages in lists? http://abap-tutorials.com 2010

ABAP/4 allows you to react to incorrect or doubtful user input by displaying messages that influence the
program flow

depending on how serious the error was. Handling messages is mainly a topic of dialog programming.
You store and

maintain messages in Table T100. Messages are sorted by language, by a two-character ID, and by a
three-digit number.

You can assign different message types to each message you output. The influence of a message on the
program flow

depends on the message type. In our program, use the MESSAGE statement to output messages
statically or dynamically

and to determine the message type.

Syntax:REPORT <rep> MESSAGE-ID <id>.

13. What are the types of messages?

A message can have five different types. These message types have the following effects during list
processing:

:(A (=Abend.

:(E (=Error) or W (=Warning.

:(I (=Information.

:(S (=Success.

14. What are the user interfaces of interactive lists?

If you want the user to communicate with the system during list display, the list must be interactive. You
can define specific

interactive possibilities in the status of the list’s user interface (GUI). To define the statuses of interfaces
in the R/3 system,

use the Menu Painter tool. In the Menu Painter, assign function codes to certain interactive functions.
After an user action
occurs on the completed interface, the ABAP/4 processor checks the function code and, if valid, triggers
the corresponding

event.

15. What are the drill-down features provided by ABAP/4 in interactive lists?

ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-
COMMAND (pressing

a button). You can use these events to move through layers of information about individual items in a
list.

16. What is meant by stacked list?

A stacked list is nothing but secondary list and is displayed on a full-size screen unless you have specified
its coordinates

using the window command.

17. Is the basic list deleted when the new list is created?

No. It is not deleted and you can return back to it using one of the standard navigation functions like
clicking on the back

button or the cancel button.http://abap-tutorials.com 2010

18. What is meant by hotspots?

A Hotspot is a list area where the mouse pointer appears as an upright hand symbol. When a user points
to that area (and

the hand cursor is active), a single click does the same thing as a double-click. Hotspots are supported
from R/3 release

3.0c.

19. What is the length of function code at user-command?

Each menu function, push button, or function key has an associated function code of length FOUR (for
example, FREE),

which is available in the system field SYUCOMM after the user action.

20. Can we create a gui status in a program from the object browser?

Yes. You can create a GUI STATUS in a program using SET PF-STATUS.

21. In which system field does the name of current gui status is there?
The name of the current GUI STATUS is available in the system field SY-PFKEY.

22. Can we display a list in a pop-up screen other than full-size stacked list?

Yes, we can display a list in a pop-up screen using the command WINDOW with the additions starting at
X1 Y1 and ending at

X2 Y2 to set the upper-left and the lower-right corners where x1 y1 and x2 y2 are the coordinates.

23. What is meant by hide area?

The hide command temporarily stores the contents of the field at the current line in a system-controlled
memory called the

HIDE AREA. At an interactive event, the contents of the field are restored from the HIDE AREA.

24. When the get cursor command used in interactive lists?

If the hidden information is not sufficient to uniquely identify the selected line, the command GET
CURSOR is used. The GET

CURSOR command returns the name of the field at the cursor position in a field specified after the
addition field, and the

value of the selected field in a field specified after value.

25. How can you display frames (horizontal and vertical lines) in lists?

You can display tabular lists with horizontal and vertical lines (FRAMES) using the ULINE command and
the system field SYVLINE. The corners arising at the intersection of horizontal and vertical lines are
automatically drawn by the system.

26. What are the events used for page headers and footers?

The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.http://abap-
tutorials.com 2010

27. How can you access the function code from menu painter?

From within the program, you can use the SY-UCOMM system field to access the function code. You can
define individual

interfaces for your report and assign them in the report to any list level. If you do not specify self-
defined interfaces in the

report but use at least one of the three interactive event keywords. AT LINE-SELECTION, AT PF<nn>, OR
AT USERCOMMAND in the program, the system automatically uses appropriate predefined standard
interfaces. These standard
interfaces provide the same functions as the standard list described under the standard list.

28. How the at-user command serves mainly in lists?

The AT USER-COMMAND event serves mainly to handle own function codes. In this case, you should
create an individual

interface with the Menu Painter and define such function codes.

29. How to pass data from list to report?

ABAP/4 provides three ways of passing data:

---Passing data automatically using system fields

---Using statements in the program to fetch data

---Passing list attributes

30. How can you manipulate the presentation and attributes of interactive lists?

---Scrolling through Interactive Lists.

---Setting the Cursor from within the Program.

---Modifying List Lines.

31. How to call other programs?

Report                               Transaction

Call and return     SUBMIT AND RETURN                   CALL TRANSACTION

Call without return SUBMIT                              LEAVE TO TRANSACTION

You can use these statements in any ABAP/4 program.

32. What will exactly the hide statement do? http://abap-tutorials.com 2010

For displaying the details on secondary lists requires that you have previously stored the contents of the
selected line from

within the program. To do this, ABAP/4 provides the HIDE statement. This statement stores the current
field contents for

the current list line. When calling a secondary list from a list line for which the HIDE fields are stored, the
system fills the
stored values back into the variables in the program. In the program code, insert the HIDE statement
directly after the

WRITE statement for the current line. Interactive lists provide the user with the so-called ‘INTERACTIVE
REPORTING’ facility.

For background processing the only possible method of picking the relevant data is through ‘NON
INTERACTIVE REPORT’ .

After starting a background job, there is no way of influencing the program. But whereas for dialog
sessions there are no

such restrictions.

33. How many lists can a program can produce?

Each program can produce up to 21 lists: one basic list and 20 secondary lists. If the user creates a list on
the next level (that

is, SY-LSIND increases), the system stores the previous list and displays the new one. Only one list is
active, and that is

always the most recently created list.

    FALSE.

1. What is a transaction?

-     A transaction is dialog program that change data objects in a consistant way.

2. What are the requirements a dialog program must fulfill?

A dialog program must fulfil the following requirements

-     A user friendly user interface.

- Format and consistancey checks for the data entered by the user.

- Easy correction of input errors.

- Access to data by storing it in the data bases.

    3. What are the basic components of dialog program?

-     Screens (Dynpros)

- Each dialog in an SAP system is controlled by dynpros.A dynpros consists of a screen

And its flow logic and controls exactly one dialog step.
- ABAP/4 module Pool.http://abap-tutorials.com 2010

  Each dynpro refers to exactly one ABAP/4 dialog program .Such a dialog program is also        called a
module pool

,since it consists of interactive modules.

4.What is PBO and PAI events?

PBO- Process Before Output-It determines the flow logic before displaying the screen.

PAI-Process After Input-It determines the flowlogic after the display of the screen and after receiving
inputs from the User.

5. What is dynpro?What are its components ?

-      A dynpro (Dynamic Program) consists of a screen and its flow logic and controls exactly one dialog
steps.

- The different components of the dynpro are :

Flow Logic: calls of the ABAP/4 modules for a screen .

Screen layout: Positions of the text, fields, pushbuttons and so on for a screen

Screen Attributes: Number of the screen, number of the subsequent screen, and others

Fields attributes: Definition of the attributes of the individual fields on a screen.

6. What is a ABAP/4 module pool?

-Each dynpro refers to exactly one ABAP/4 dialog program.Such a dialog program is also called

a module pool ,since it consists on interactive modules.

7..Can we use WRITE statements in screen fields?if not how is data transferred from field data to screen
fields?

-We cannot write field data to the screen using the WRITE statement.The system instead transfers data
by comparing screen

fields names with ABAP/4 variable names.If both names are the same,it

transfers screen fields values to ABAP/4 programs fields and Vice Versa.This happens immediately after
displaying the

screen.

8.Can we use flow logic control key words in ABAP/4 and vice-versa?
-     The flow control of a dynpro consists os a few statements that syntactically ressemble ABAP/4
statements

.However ,we cannot use flow control keywords in ABAP/4 and vice-versa.

9.What is GUI status? How to create /Edit GUI status?http://abap-tutorials.com 2010

-A GUI status is a subset of the interface elements used for a certain screen.The status comprises

those elements that are currently needed by the transaction .The GUI status for a transaction may be
composed of the

following elements:

-Title bar.

-Mneu bar.

-Application tool bar

-Push buttons.

To create and edit GUI status and GUI title,we use the Menu Painter.

10. How does the interection between the Dynpro and the ABAP/4 Modules takes place?

-A transaction is a collection os screens and ABAP/4 routines, controlled and executed by a Dialog
processor. The Dialog

processor processes screen after the screen, thereby triggering the appropriate

ABAP/4 processing of each screen .For each screen,the system executes the flow logic that contains the
corresponding

ABAP/4 processing.The controls passes from screen flow logic to ABAP/4 code and back.

11. How does the Dialog handle user requests?

-    when an action is performed ,the system triggers the PROCESS AFTER INPUT event.The data
passed includes

field screen data data entered by the user and a function code. A functioncode is a technical name that
has

been allocated in a screen Painter or Menu Painter to a meny entry,a push button,the ENTER key or a
function

Key of a screen.An internal work field(ok-code)in the PAI module evaluates the function code,and the
appropriate action is taken.

12. What is to be defined for a push button fields in the screen attributes?

-     A function code has to be defined in the screen attributes for the push buttons in a screen.

13. How are the function code handles in Flow Logic?

      - When the User selects a function in a transaction ,the system copies the function code into a
specially

designated work field called OK_CODE.This field is Global in ABAP/4 Module Pool.The OK_CODE can
then be evaluated in the

corresponding PAI module. The function code is always passed in Exactly the same way , regardless of
Whether it comes

from a screen’s pushbutton,a menu option ,function key or other GUI element.

14.What controls the screen flow?http://abap-tutorials.com 2010

-     The SET SCREEN and LEAVE SCREEN statements controls screen flow.

14. The Function code currently active is ascertained by what Variable?

-     The function code currently active in a Program can be ascertained from the SY-UCOMM Variable.

15. The function code currently active is ascertained by what variable ?

-     By SY-UCOMM Variable.

16. What are the “field” and “chain” Statements?

-     The FIELD and CHAIN flow logic statements let you Program Your own checks.FIELD and CHAIN tell
the system

Which fields you are checking and Whether the System should Perform Checks in the flow logic or call
an

ABAP/4 Module.

17. What is an “on input filed” statements?

-     ON INPUT

The ABAP/4 module is called only if a field contains the Value other than the initial Value.This initial
Value is

determined by the filed’s Dta Type: blanks for character Fields
,Zeroes for numerics. If the user changes the Fields Value back t o its initial value,ON INPUT does not
trigger a

call.

18. What is an “on request Field” statement?

-        ON REQUEST

The ABAP/4 Module is called only if the user has entered the value in the field value since the last screen
display

The Value counts as changed Even if the User simply types in the value that was already there .In
general ,the ON.

REQUEST condition is triggered through any

Form of” MANUAL INPUT’.

19. What is an on”*-input filed” statement?

ON *-INPUT

-      The ABAP/4 module is called if the user has entered the “*” in the first character of the field, and
the field has

the attribute *-entry in the screen Painter.You can use this option in Exceptional cases where you want
to check

only fields with certain Kinds of Input.http://abap-tutorials.com 2010

20. What are conditional chain statement?

ON CHAIN-INPUT similar to ON INPUT.

The ABAP/4 module is called if any one of the fields in the chain contains a value other than its initial
value(blank or nulls).

ON CHAIN-REQUEST

This condition functions just like ON REQUEST, but the ABAP/4 module is called if any one of the fields in
the chain changes

value.

21. What is “at exit-command:?

The flowlogic Keyword at EXIT-COMMAND is a special addition to the MODULE statement in the Flow
Logic .AT EXITCOMMAND lets you call a module before the system executes the automatic fields checks.
22. Which Function type has to be used for using “at exit-command” ?

-   To Use AT EXIT – COMMAND ,We must assign a function Type “E” to the relevant function in the
MENU

Painter OR Screen Painter .

23. What are the different message types available in the ABAP/4 ?

-         There are 5 types of message types available.

- E: ERROR

- W-WARNING

- I –INFORMATION

- A-ABNORMAL TERMINATION.

- S-SUCCESS

24. Of the two “ next screen “ attributes the attributes that has more priority is -------------------.

Dynamic.

25. Navigation to a subsequent screen can be specified statically/dynamically. (TRUE/FALSE).

              TRUE.

26. Dynamic screen sequence for a screen can be set using ------------- and ----------------- commands
http://abap-tutorials.com 2010

     Set Screen, Call screen.

27. The commands through Which an ABAP/4 Module can “branch to “ or “call” the next screen are

    1.------------,2--------------,3---------------,4------------.

-         Set screen<scr no>,Call screen<scr no> ,Leave screen, Leave to screen <scr no>.

      28. What is difference between SET SCREEN and CALL SCREEN ?



-     With SET SCREEN the current screen simply specifies the next screen in the chain , control
branches to this

next screen as sonn as th e current screen has been processed .Return from next screen to current
screen is not
automatic .It does not interrupt processing of the current screen.If we want to branch to the next screen

without finishing the current one ,use LEAVE SCREEN.

-      With CALL SCREEN , the current (calling) chain is suspended , and a next screen (screen chain) is
called .The

called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0
.Sometime we

might want to let an user call a pop up screen from the main application screen to let him enter
secondary

information.After they have completed their enteries, the users should be able to close the popup and
return

directly to the place where they left off in the main screen.Here comes CALL SCREEN into picture .This
statement

lets us insert such a sequence intp the current one.

29. Can we specify the next screen number with a variable (*Yes/No)?

-     Yes

30. The field SY-DYNR refers to--------------

Number of the current screen.

31. What is dialog Module?

-    A dialog Module is a callable sequence of screens that does not belong to a particular
transaction.Dialog

modules have their module pools , and can be called by any transaction.

32. The Syntex used to call a screen as dialog box (pop up)is---------

CALL SCREEN <screen number.>

STARTING AT <start column><start line>http://abap-tutorials.com 2010

ENDING AT <end column> <end line>

33. What is “call mode”?

-     In the ABAP/4 WORLD each stackable sequence of screens is a “call mode”, This is IMP because of
the way u
return from the given sequence .To terminate a call mode and return to a suspended chain set the “next

screen” to 0 and leave to it:

   LEAVE TO SCREEN 0 or (SET SCREEN 0 and LEAVE SCREEN) .When u return to          the suspended chain
execution

resumes with the statement directly following the original CALL SCREEN statement.The original
sequence of screens

in a transaction (that is , without having stacked any additional call modes),you returned from the
transaction

altogether.

34. The max number of calling modes stacked at one time is?

-     NINE

35. What is LUW or Data base Transaction ?

-     A “LUW”(logical unit of work) is the span of time during which any database updates must be
performed in an

“all or nothing” manner .Either they are all performed (committed),or they are all thrown away (rolled
back).In

the ABAP/4 world , LUWs and

-     Transactions can have several meanings:

LUW (or “database LUW” or “database transaction”)

This is the set of updates terminated by a database commit. A LUW lasts, at most, from one screen
change to the

next (because the SAP system triggers database commits automatically at every screen change).

36. What is SAP LUW or Update Transaction?

Update transaction (or “SAP LUW”)

This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last much longer than a
database LUW,

since most update processing extends over multiple transaction screens. The programmer terminates an
update

transaction by issuing a COMMIT WORK statement.
37. What happens if only one of the commands SET SCREEN and LEAVE SCREEN is used without using
the other?

If we use SET SCREEN without LEAVE SCREEN, the program finishes processing for the current screen
before

branching to <scr no>. If we use LEAVE SCREEN without a SET SCREEN before it, the current screen
process will be

terminated and branch directly to the screen specified as the default next-screen in the screen
attributes.http://abap-tutorials.com 2010

38. What is the significance of the screen number ‘0’?

In “calling mode”, the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to
the previous

call level. That is, if you have called a screen sequence with CALL SCREEN leaving to screen 0 terminates
the

sequence and returns to the calling screen. If you have not called a screen sequence, LEAVE TO SCREEN
0

terminates the transaction.

39. What does the ‘SUPPRESS DIALOG’ do?

Suppressing of entire screens is possible with this command. This command allows us to perform screen
processing

“in the background”. Suppresing screens is useful when we are branching to list-mode from a
transaction dialog

step.

40. What is the significance of the memory table ‘SCREEN’?

At runtime, attributes for each screen field are stored in the memory table called ‘SCREEN’. We need not
declare

this table in our program. The system maintains the table for us internally and updates it with every
screen change.

41. What are the fields in the memory table ‘SCREEN’?

Name             Length         Description

NAME              30            Name of the screen field
GROUP1            3             Field belongs to field group 1

GROUP2 3 Field belongs to field group 2

GROUP3 3 Field belongs to field group 3

GROUP4 3 Field belongs to field group4

ACTIVE           1             Field is visible and ready for input.

REQUIRED          1             Field input is mandatory.

INPUT            1             Field is ready for input.

OUTPUT            1             Field is display only.

INTENSIFIED       1             Field is highlightedhttp://abap-tutorials.com 2010

INVISIBLE        1             Field is suppressed.

LENGTH            1             Field output length is reduced.

DISPLAY_3D        1             Field is displayed with 3D frames.

VALUE_HELP        1             Field is displayed with value help.

42. Why grouping of fields is required? What is the max no of modification groups for each field?

If the same attribute need to be changed for several fields at the same time these fields can be grouped
together.

We can specify up to four modification groups for each field.

43. What are the attributes of a field that can be activated or deactivated during runtime?

Input, Output, Mandatory, Active, Highlighted, Invisible.

44. What is a screen group? How it is useful?

Screen group is a field in the Screen Attributes of a screen. Here we can define a string of up to four
characters

which is available at the screen runtime in the SY-DNGR field. Rather than maintaining field selection
separately for

each screen of a program, we can combine logically associated screens together in a screen group.

45. What is a Subscreen? How can we use a Subscreen?
A subscreen is an independent screen that is displayed in a n area of another (“main”) screen. To use a
subscreen

we must call it in the flow logic (both PBO and PAI) of the main screen. The CALL SUBSCREEN stratement
tells the

system to execute the PBO and PAI events for the subscreen as part of the PBO or PAI events of the
main screen.

The flow logic of your main program should look as follows:

PROCESS BEFORE OUTPUT.

CALL SUBSCREEN <area> INCLUDING ‘<program>’ ’<screen>’.

PROCESS AFTER INPUT.

CALL SUBSCREEN <area>.

Area is the name of the subscreen area you defined in your main screen. This name can have up to ten
characters.

Program is the name of the program to which the subscreen belongs and screen is the subscreen’s
number.

46. What are the restrictions on Subscreens?http://abap-tutorials.com 2010

Subscreens have several restrictions. They cannot:

·       Set their own GUI status

· Have a named OK code

· Call another screen

· Contain an AT EXIT-COMMAND module

· Support positioning of the cursor.

47. How can we use / display table in a screen?

ABAP/4 offers two mechanisms for displaying and using table data in a screen. These mechanisms are
TABLE

CONTROLS and STEP LOOPS.

48. What are the differences between TABLE CONTROLS and STEP LOOPS?
TABLE CONTROLS are simply enhanced STEP LOOPS that display with the look and feel of a table widget
in a desktop

application. But from a programming standpoint, TABLE CONTROLS and STEP LOOPS are almost exactly
the same.

One major difference between STEP LOOPS and TABLE CONTROLS is in STEP LOOPS their table rows can
span more

than one time on the screen. By contrast the rows in a TABLE CONTROLS are always single lines, but can
be very

long. (Table control rows are scrollable). The structure of table control is different from step loops. A
step loop, as

a screen object, is simply a series of field rows that appear as a repeating block. A table control, as a
screen object

consists of: I) table fields (displayed in the screen ) ii) a control structure that governs the table display
and what the

user can do with it.

49. What are the dynapro keywords?

FIELD, MODULE, SELECT, VALUES and CHAIN are the dynapro keywords.

50. Why do we need to code a LOOP statement in both the PBO and PAI events for each table in the
screen?

We need to code a LOOP statement in both PBO and PAI events for each table in the screen. This is
because the

LOOP statement causes the screen fields to be copied back and forth between the ABAP/4 program and
the screen

field. For this reason, at least an empty LOOP….ENDLOOP must be there.

51. The field SY-STEPL refers to the index of the screen table row that is currently being processed. The
system

variable SY-stepl only has a meaning within the confines of LOOP….ENDLOOP processing. Outside the
loop, it

has no valid value.

52. How can we declare a table control in the ABAP/4 program?http://abap-tutorials.com 2010
Using the syntax controls <table control name> type tableview using screen <scr no>.

53. Differentiate between static and dynamic step loops.

Step loops fall into two classes: Static and Dynamic. Static step loops have a fixed size that cannot be
changed at

runtime. Dynamic step loops are variable in size. If the user re-sizes the window the system
automatically increases

or decreases the number of step loop blocks displayed. In any given screen you can define any number
of static step

loops but only a single dynamic one.

54. What are the two ways of producing a list within a transaction?

By submitting a separate report.

By using leave to list-processing.

55. What is the use of the statement Leave to List-processing?

Leave to List-processing statement is used to produce a list from a module pool. Leave to list processing
statement

allows to switch from dialog-mode to list-mode within a dialog program.

56. When will the current screen processing terminates?

A current screen processing terminates when control reaches either a Leave-screen or the end of PAI.

57. How is the command Suppress-Dialog useful?

Suppressing entire screens is possible using this command. This command allows us to perform screen
processing

“in the background”. The system carries out all PBO and PAI logic, but does not display the screen to the
user.

Suppressing screens is useful when we are branching to list-mode from a transaction dialog step.

58. What happens if we use Leave to list-processing without using Suppress-Dialog?

If we don’t use Suppress-Dialog to next screen will be displayed but as empty, when the user presses
ENTER, the

standard list output is displayed.
59. How the transaction that are programmed by the user can be protected?

By implementing an authority check.

60. What are the modes in which any update tasks work?

Synchronous and Asynchronous.http://abap-tutorials.com 2010

61. What is the difference between Synchronous and Asynchronous updates?

A program asks the system to perform a certain task, and then either waits or doesn’t wait for the task
to finish. In

synchronous processing, the program waits: control returns to the program only when the task has been

completed. In asynchronous processing, the program does not wait: the system returns control after
merely logging

the request for execution.

62. SAP system configuration incluedes Dialog tasks and Update tasks.

63. Dialog-task updates are Synchronous updates.

64. Update –task updates are Asynchronous updates.

65. What is the difference between Commit-work and Rollback-Work tasks?

Commit-Work statement “performs” many functions relevant to synchronized execution of tasks.
Rollback-work

statement “cancels: all reuests relevant to synchronized execution of tasks.

66. What are the different database integrities?

·     Semantic Integrity.

· Relational Integrity.

· Primary Key Integrity.

· Value Set Integrity.

· Foreign Key integrity and

· Operational integrity.

67. All SAP Databases are Relational Databases.

68. What is SAP locking?
It is a mechanism for defining and applying logical locks to database objects.

69. What does a lock object involve?

The tables.

The lock argument.http://abap-tutorials.com 2010

70. What are the different kinds of lock modes?

Shared lock

Exclusive lock.

Extended exclusive list.

71. How can a lock object be called in the transaction?

By calling Enqueue<lock object> and Dequeue<lock object> in the transaction.

72. What are the events by which we can program “help texts” and display “possible value lists”?

-PROCESS ON HELP-REQUEST (POH).

-PROCESS ON VALUE-REQUEST (POV).

73. What is a matchcode?

A matchcode is an aid to finding records stored in the system whenever an object key is required in an
input field

but the user only knows other (non-key) information about the object.

74. In what ways we can get the context sensitive F1 help on a field?

-     Data element documentation.

- Data element additional text in screen painter.

- Using the process on help request event.

75. What is roll area?

A roll area contains the program’s runtime context. In addition to the runtime stack and other
structures, all local

variables and any data known to the program are stored here.

76. How does the system handle roll areas for external program components?
-     Transactions run in their own roll areas.

- Reports run in their own roll areas.http://abap-tutorials.com 2010

-     Dialog modules run in their own roll areas

- Function modules run in the roll area of their callers.

77. Does the external program run in the same SAP LUW as the caller, or in a separate one?

- Transactions run with a separate SAP LUW

- Reports run with a separate SAP LUW.

- Dialog modules run in the same SAP LUW as the caller

- Function modules run in the same SAP LUW as the caller.

The only exceptions to the above rules are function modules called with IN UPDATE TASK (V2 function
only) or

IN BACKGROUND TASK (ALE applications). These always run in their own (separate) update transactions.

78. What are function modules?

Function modules are general-purpose library routines that are available system-wide.

79. What are the types of parameters in the function modules?

In general, function module can have four types of parameters:

-     EXPORTING: for passing data to the called function.

- IMPORTING: for receiving data returned from the function module.

- TABLES: for passing internal tables only, by reference (that is, by address).

- CHANGING: for passing parameters to and from the function.

80. What is the difference between Leave Transaction and Call Transaction?

In contrast to LEAVE TO TRANSACTION, the CALL TRANSACTION statement causes the system to start a
new SAP

LUW. This second SAP LUW runs parallel to the SAP LUW for the calling transaction.

81. How can we pass selection and parameter data to a report?

There are three options for passing selection and parameter data to the report.http://abap-
tutorials.com 2010
-     Using SUBMIT…WITH

- Using a report variant.

- Using a range table.

82. How to send a report to the printer instead of displaying it on the screen?

We can send a report to the printer instead of diplaying it on the screen. To do this, use the keywords
TO SAPSPOOL:

SUBMIT RSFLFIND…TO SAP-SPOOL DESTINATION ‘LT50’.

83. How can we send data to external programs?

Using SPA/GPA parameters(SAP memory).

Using EXPORT/IMPORT data (ABAP/4 memory)

84. What are SPA/GPA parameters (SAP memory)

SPA/GPA parameters are field values saved globally in memory. There are two ways to use SPA/GPA
parmeters:

By setting field attributes in the Screen Painter.

By using the SET PARAMETER or GET PARAMETER statements
ABAP Interview Questions & Answers

Set 8

http://abap-tutorials.comhttp://abap-tutorials.com 2010

SAP TERMINOLOGY

Master data is a collection of information about a person or an object, e.g. a cost object, vendor, or G/L
account. For example, a

vendor master record contains not only general information such as the vendor‟s name and address,
but also specific information,

such as payment terms and delivery instructions. Generally for end users, master data is reference data
that you will look up and

use, but not create or change.

Transactional data is data related to a single business event such as a purchase requisition or a request
for payment. When you

create a requisition, for example, SAP creates an electronic document for that particular transaction.
SAP gives the transaction a

document number and adds the document to the transaction data that is already in the system.
Whenever you complete a

transaction in SAP, that is, when you create, change, or print a document in SAP, this document number
appears at the bottom of

the screen.

Workflow

A routing tool in SAP that forwards documents for review or approval. For example, a requisition that
needs to be approved is sent
to the appropriate approver's inbox. Workflow is also used to route journal vouchers, credit card
charges, and other documents in

SAP.

Cost Object:

A Cost Object collects expenses and revenues for a particular purpose, such as a research project. In SAP
there are three types

of cost objects: Cost Center, Internal Order, and WBS (Work Breakdown Structure) Element (see below
for definition).

Cost Center:

General or operating Cost Objects are known in SAP as Cost Centers. Cost Centers are budgeted on the
fiscal year.

Internal Order:

A non-sponsored Cost Object (for example, funding from the MIT Provost) used to track costs over
periods other than fiscal years.

Internal Orders are often created to track gifts or endowments at MIT.

WBS Element: WBS Elements are funded by outside sponsors and are used to track costs of a particular
research project over

the entire span of its activity. They may also be created to track other sponsored activities, such as gifts.

G/L Account: http://abap-tutorials.com 2010

G/L accounts are also called Cost Elements in SAP. They are a classification by expense or revenue type.
In the CO (Controlling)

module of SAP, the term Cost Element is used. In the FI (Financial) module, the term G/L Account is
used. These terms are used

interchangeably for reporting, requisitions, and journal vouchers.



Add a single record to a database table

insert into <database table> values <work area>

Inserting all lines from an internal table into a database table:

insert <database table> from table <internal table>
Delete all records

Select    * from zmellemtab.

  delete zmellemtab.

 endselect.

Deleting records using records from an internal table

delete employees from table itab.http://abap-tutorials.com 2010




BASIS LAYER

What are the central interfaces of the R/3 system ?

- Presentation interface

     Database interface

    Operating system interface

Which interface controls what is shown on the p.c. ?

- Presentation interface

Which interface converts SQL requirements in the SAP development system to those of the
database ?

- Database interface

What is SAP dispatcher ?

- SAP dispatcher is the control agent which manages the

resources for the R/3 applications.

What are the functions of dispatcher ?
- Equal distribution of transaction load to the work processes

   Management of buffer areas in main memory

Integration of the presentation levels

      Organization of communication activies

What is a work process ?http://abap-tutorials.com 2010

- A work process is where     individual dialog steps are actually processed and the work is done.
Each work

process handles one type of request.

Name various work processes of R/3 system ?

1) Dialog or Online ( processes only one request at a time )

   2) Background ( started at a specified time )

3) Update ( primary or secondary )

4) Enque( lock mechanism )

5) Spool ( generated online or during back ground processing For printing )

What are the types of Update requests ?

- An update request can be divided into one primary (V1) and several Secondary update components
(V2). Time-critical

operations are placed in V1 component and those whose timing are less critical are placed in V2
components. If a V1

update fails, V2 components will not be processed.

What are the roll and page areas ?

- Roll and page areas are SAP R/3 buffers used to store user contexts ( process requests ) . The
SAP dispatcher

assigns process requests to work processes as they are received. If the work process is
unavailable the

process requests are queued in the roll and page areas.

Paging area holds data from the application programs.
Roll area holds data from previous dialog steps and data that characterizes user.

What is a Spool request ?

- Spool requests are generated during dialog or background processing and placed in the spool database
with information

about the printer and print format. The actual data is placed in the Tem Se (Temporary Sequential
objects).

What are the different database integrities ?

- Semantic integrity

- Relational integrity

- Primary key integrityhttp://abap-tutorials.com 2010

- Value set integrity

- Foreign key integrity and

- Operational integrity.

DATA DICTIONARY .

Type of a table or structure



  The table type determines how the logical table description defined in

the ABAP/4 Dictionary is reproduced on the database.

There are the following table types:

o transparent table

o structure

o append structure



For internal purposes, such as storing control data or update texts, there are in addition the following
table types:

o pooled table

o cluster table
o generated view structure



Transparent table

  There is a physical table on the database for each transparent table. The names of the physical tables
and

   the logical table definition in the ABAP/4 Dictionary correspond.



  All business data and application data are stored in transparent tables.



Structure                                        http://abap-tutorials.com 2010

  No data records exist in the database for a structure. Structures are used for the interface definition
between programs or

between screens and programs.



Append structure

   An append structure defines a set of fields which belong to another table or structure but which are
treated in the correction

administration as its own object. Append structures are used to support modifications.



Pooled table

  Pooled tables can be used to store control data (e.g. screen sequences, program parameters or
temporary

  data). Several pooled tables can be combined to form a table pool. The table pool corresponds to a

 physical table on the database in which all the records of the allocated pooled tables are stored.



Cluster table
  Cluster tables contain continuous text, for example, documentation. Several cluster tables can be
combined to form a table

cluster. Several logical lines of different tables are combined to form a physical record in this table type.
This permits object-byobject storage or bject-by-object access. In order to combine tables in clusters, at
least parts of the keys must agree. Several

cluster tables are stored in one corresponding table on the database.



Generated view structure

  In activation a structure is generated for a view. This structure serves as interface for the runtime
environment. It does not

generally appear in the ABAP/4 Dictionary.

What is a Data Class?

  The Data class determines in which tablespace the table is stored when it is created in the database.

What is a Size Category?

The Size category describes the probable space requirement of the table in the database.

How Many types of size categories and data classes are there?

There are five size categories (0-4) and 11 data classes, only three of which are appropriate for
application tables:

- APPL0 - Master data (data frequently accessed but rarely updated)http://abap-tutorials.com 2010

- APPL1 - Transaction data (data that is changed frequnetly)

- APPL2 - Organisational data (customizing data that is entered when system is

configured and then rarely changed)

What are control tables?

  The values specified for the size category and data class are mapped to database-specific values via
control tables.

What is the function of the transport system and workbench organiser?

  The function of the transport system and the Workbench Organizer is to manage any changes made to
objects of the ABAP/4
Development Workbench and to transport these changes between different SAP systems.

What is a table pool?

A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary. The definition
of a pool consists of at

least two key fields and a long argument field (VARDATA).

What are pooled tables?

These are logical tables which must be assigned to a table pool when they are defined. Pooled tables can
be used to store

control data (such as screen sequences or program parameters).

 What is a table cluster?

   A table cluster combines several logical tables in the ABAP/4 Dictionary. Several logical rows from
different cluster tables are

brought together in a single physical record. The records from the cluster tables assigned to a cluster are
thus stored in a single

common table in the database.

Which objects are independent transport objects?

   Domains, Data elements, Tables, Technical settings for tables,

Secondary indexes for transparent tables, Structures, Views,

Matchcode objects, Matchcode IDs, Lock objects.

What are the Data types of the external layer?

ACCP, CHAR, CLNT, CUKY,CURR, DATS, DEC, FLTP, INT1,INT2, INT4, LANG, LCHR,LRAW, NUMC, PREC,

QUAN,RAW ,TIMS, UNIT, VARC.http://abap-tutorials.com 2010

What are the Data types of the ABAP/4 layer?

   Possible ABAP/4 data types:

C: Character.

   D: Date, format YYYYMMDD.

F: Floating-point number in DOUBLE PRECISION (8 bytes).
I: Integer.

N: Numerical character string of arbitrary length.

P: Amount or counter field (packed; implementation depends on hardware platform).

   S: Time stamp YYYYMMDDHHMMSS.

T: Time of day HHMMSS.

V: Character string of variable length, length is given in the first

     two bytes.

X: Hexadecimal (binary) storage.

How can we set the tablespaces and extent sizes ?

You can specify the extent sizes and the tablespace (physical storage area in the database) in which a
transparent table is to

be stored by setting the size category and data class.

What is a data dictionary ?

Data dictionary is a central source of data in a data management system. Its main function is to support
the .It has details

about

- What data is contained ?

- What are the attributes of the data ?

- What is the relationship existing between the various data elements ?

What functions does a data dictionary perform ?

In a data management system, the principal functions performed by the data dictionary are

- Management of data definitions

- Provision of information for evaluationhttp://abap-tutorials.com 2010

- Support for software development

- Support form documentation

- Ensuring that the data definitions are flexible and up-to-date.
A field containing currency amounts (data type CURR) must be assigned to a reference table and a
reference field.

Explain.

As a reference table, a system table containing all the valid currencies is assigned or any other table
which contains a field with

the currency key format. This field is called as reference field. The assignment of the field containing
currency amounts to the

reference field is made at runtime. The value in the reference field determines the currency of the
amount.

What is the significance of Technical settings (specified while creating a table in the data dictionary) ?

By specifying technical settings we can control how database tables are created in the database.The
technical settings allows us

to

- optimize storage space requiremnets

- table access behaviour

- buffering required

- changes to entries logged

What is the significance of Delivery Class ?

- The delivery class controls the degree to which the SAP or the customer is responsible for table
maintenance

- whether SAP provides the table with or without contents.

- determines the table type.

- determines how the table behaves when it is first installed, at upgrade, when it is transported, and
when a client copy is

performed.

What is the maximum number of structures that can be included in a table or structure

- Nine.

What are the two methods of modifying Sap standard tables ?
- Append Structures andhttp://abap-tutorials.com 2010

- Customizing Includes.

What is the difference between a Substructure and an Append Structure ?

- In case of a substructure, the reference originates in the table itself, in the forma of a statement
.include... .

- In case of an append structure, the table itself remains unchanged and the refrence originates in the
append

structure.

What are the two ways for restricting the value range for a domain ?

- By specifying fixed values.

- By stipulating a value table.

What is a Match Code ?

Match Code is a tool to help us to search for data records in the system. Match codes are an efficient
and user-friendly search aid

where key of a record is unknown.

What are the two levels in defining a Match Code ?

- Match Code object

- Match Code Id.

What is the maximum number of match code Id's that can be defined for one Match code object ?

- 36. A match code Id is a one character ID which can be a letter or a number.

Can we define our own Match Code ID's for SAP Matchcodes ?

Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for a SAP defined
Matchcode object.

What is an Update type with reference to a Match code ID?

If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated.
The update type

stipulates when the matchcode is to be updated and how it is to be done. The update type also specifies
which method is to be
used for Building matchcodes . You must specify the update type when you define a matchcode ID.

What are conversion routines ?

- Non standard conversions from display format to sap internal format and vice-versa are implemented
with so called

conversion routines.http://abap-tutorials.com 2010

Aggregated Objects

Views, matchcodes, and lock objects are also called aggregate objects because they are formed from
several related tables.

What is a View ?

- A view is a logical view on one or more tables. A view on one or more tables i.e, the data from a view is
not actually

physically stored instead being derived from one or more tables. A view can be used to summarize data
which is distributed

among several tables

How many types of Views are there ?

Database View (SE11)

Database views are implement an inner join, that is, only records of the primary table (selected via the
join operation) for

which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between
primary and

secondary table could, therefore, lead to a reduced selection set. In database views, the join conditions
can be formulated

using equality relationships between any base fields. In the other types of view, they must be taken
from existing foreign keys.

That is, tables can only be collected in a maintenance or help view if they are linked to one another via
foreign keys.

Help View ( SE54)

Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is
defined for this field. If this

is not the case, the help view is displayed in which the check table of the field is the primary table. Thus,
for each table no

more than one help view can be created, that is, a table can only be primary table in at most one help
view.

Projection View

Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the
number of interfaces.

This means that only the data that is actually required is exchanged when the database is accessed.

A projection view can draw upon only one table. Selection conditions cannot be specified for projection
views.

Maintenance View ( SE54 )

Maintenance views enable a business-oriented approach to looking at data, while at the same time,
making it possible to

maintain the data involved. Data from several tables can be summarized in a maintenance view and
maintained collectively

via this view. That is, the data is entered via the view and then distributed to the underlying tables by
the system.http://abap-tutorials.com 2010

What is Locking ?

When two users simultaneously attempt to access the same data record, this is synchronised by a lock
mechanism.

When dialog transactions are programmed, locks are set and released by calling certain function
modules. These function

modules are generated automatically from the definition of so-called lock objects in the ABAP/4
Dictionary.

To synchronize the access to a table by setting and removing locks, a Lock object has to be defined in the
ABAP/4 Dictionary.

Activating the lock object automatically creates function modules for setting and removing locks. These
function modules must be

included when programming interactive transactions.
Lock Mechanism :

To set locks, a lock object must be defined in the ABAP/4 Dictionary. In this lock object, those tables in
which data records are to

be locked by calling a lock are determined. All tables included in a lock object must be connected to each
other via foreign keys.

The key fields of the tables in a lock object form the Lock arguments for the tables. The lock arguments
are the basis for

formulating the logical condition for identifying the records to be locked.

When activating this lock object, two function modulesB with the names ENQUEUE_<Object_name> and

DEQUEUE_<Object_name> are generated.

Example :

Problem :

You wish to prevent a user from being able to change the name of a course or the name of the professor
with responsibility for

the course at a time when another user is editing the course description (which contains this
information).

Solution :http://abap-tutorials.com 2010

The problem described above can be solved by defining a lock object E_UKURS. This is done by defining
primary and secondary

tables in the lock object. Table UKURS is check table of table UKRSB, so UKURS should be selected as
primary table and

UKRSB as secondary table of the lock object.

The Lock argument in this case is the field combination FABNR, KRSNR, and SPRAS (i.e Primary Key
Combination).

The Lock mode Shared is to be selected here. This allows several users to access the data simultaneously
in display mode.

The lock mode in the generated function modules for setting (ENQUEUE_E_UKURS) and releasing
(DEQUEUE_E_UKURS)

locks is therefore set to shared as default, but can be overridden by calling the function modules.
If the function module ENQUEUE_E_UKURS is called with FABNR = '1' and KRSNR = '3', the record for
course 3 in faculty 1 is

locked in table UKURS. Furthermore, all the course descriptions for this course are locked in table UKRSB
since field SPRAS

was not specified when the function module was called. In such cases, the lock is made generically for a
field which is not

defined.

If the function module DEQUEUE_E_UKURS is now called with FABNR = '1', KRSNR = '3' and SPRAS = 'D',
the German course

description is unlocked. All other course descriptions remain locked.

What is database utility ?

Database utility is the interface between the ABAP/4 Dictionary and the underlying the SAP system.The
database utility is the

interface between the ABAP/4 Dictionary and the relational database underlying the SAP system. You
can call the database

utility from the initial screen of the ABAP/4 Dictionary with Utilities ® Database utility. The database
utility allows you to create,

delete and convert objects from the ABAP/4 Dictionary in the database.

MODULARIZATION

What is Modularization and its benefits?

If the program contains the same or similar blocks of statements or it is required to process the same
function several times, we

can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we
make them easy to read

and improve their structure. Modularized programs are also easier to maintain and to update.

How can we create callable modules of program code within one ABAP/4 Program?

A. By defining macros.

B. By creating include programs in the library.

What are subroutines?
Subroutines are program modules which can be called from other ABAP/4 programs or within the same
program.http://abap-tutorials.com 2010

What are the types of Subroutines?

A. Internal Subroutines: The source code of the internal subroutines will be in the    same ABAP/4
program as the calling

procedure (internal call).

B. External Subroutines: The source code of the external subroutines will be in an ABAP/4 program
other than the calling

procedure.

What are the different types of parameters?

Formal parameters: Parameters which are defined during the definition of subroutine with the FORM
statement.

Actual parameters: Parameters which are specified during the call of a subroutine with the PERFORM
statement.

How can one distinguish between different kinds of parameters?

A. Input parameters are used to pass data to subroutines.

B. Output parameters are used to pass data from subroutines.

What are the different methods of passing data?

A. Calling by reference: During a subroutine call, only the address of the actual parameter is transferred
to the formal

parameters. The formal parameter has no memory of its own, and we work with the field of the calling
program within the

subroutine. If we change the formal parameter, the field contents in the calling program also change.

B. Calling by value: During a subroutine call, the formal parameters are created as copies of the actual
parameters. The

formal parameters have memory of their own. Changes to the formal parameters have no effect on the
actual parameters.

C. Calling by value and result: During a subroutine call, the formal parameters are created as copies of
the actual
parameters. The formal parameters have their own memory space. Changes to the formal parameters
are copied to the

actual parameters at the end of the subroutine.

The method by which internal tables are passed is By Reference.

What is the difference between the function module and a normal ABAP/4 subroutine?

In contrast to normal subroutines function modules have uniquely defined interface.

Sub routines do not return values.

Sub routines do not return exceptions.

Sub routines cannot be tested independently.

Declaring data as common parts is not possible for function modules. Function modules are stored in a
central library.http://abap-tutorials.com 2010

What is a function group?

A function group is a collection of logically related modules that share global data with each other. All
the modules in the group are

included in the same main program. When an ABAP/4 program contains a CALL FUNCTION statement,
the system loads the

entire function group in with the program code at runtime. Every function module belongs to a function
group.

What is the difference between internal tables and extract datasets?

A. The lines of an internal table always have the same structure. By using extract datasets, you can
handle groups of data

with different structure and get statistical figures from the grouped data.

B. You have to define the structure of the internal table at the begining. You need not define the
structure of the extract

dataset.

C. In contrast to internal tables, the system partly compresses extract datasets when storing them. This
reduces the storage

space required.
D. Internal tables require special work area for interface whereas extract datasets do not need a special
work area for

interface.

LOGICAL DATABASE.

What are logical databases? What are the advantages/disadvantages of logical databases?

Ans :- A Logical Database is a hierarchical structure of tables. Use the GET statement to process Logical
Databases.

- LDB consists of logically related tables grouped together – used for reading and processing data.

- Advantages = 1. No need of programming for retrieval , meaning for data selection

-               2. Easy to use standard user interface, have check completeness of user input.

Disadvantages = 1. Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy,
all upper level tables

should be read so performance is slower.

Preparation of the data records by the L.D.B and reading of the data records in the actual report are
accomplished with

the command pair.

- Put and Get.

The three main elements of LDB are

- Structure, Selections, Database Program.

What sort of tables one can use in designing the hierarchy of a LDB ?

- Tables which are having Foreign key relations.

The structure of Logical Databases relfects the ________________ dependencies of hierarchical tables
in the SAP

System.

- Foreign key

If you want to improve the response time ( time to access data ) Logical DataBases permits you to
achieve this using

______________
- VIEWS.

What are the advantages of Logical DataBases ?http://abap-tutorials.com 2010

It offers an easy-to-use selection screen. You can modify the pre-generated selection screen to your
needs. It offers check

functions to check whether user input is complete, correct, and plausible. It offers reasonable data
selections. It contains central

authorization checks for database accesses. Enhancements such as improved performance immediately
apply to all report

programs that use the logical database.

Report FORMATTING

In order to suppress the leading zeros of a number field the keywords used are :

NO-ZERO.

The Command that allows for vertical alignment of fields one below the other.

UNDER.

In order to concatenate strings only for output purposes the command _________ can be used in
conjunction with the

'Write' statement.

NO-GAP.

Data can be moved from one field to another using a 'Write:' Statement and stored in the desired
format.

TRUE. Write : Date_1 to Date_2 format DD/MM/YY.

In order to have boldfaced text as output the command used is

Write : <f> INTENSIFIED.

Background and foreground colors can be interchanged using the command

Format inverse.

Which datatype cannot be used to define parameters.

Type F.
For each new event, the system resets all formatting options to their default values. TRUE.

The processing block following END-OF-PAGE is processed only if you reserve lines for the footer in the
LINE-COUNT

option of the REPORT statement.

To execute a page break under the condition that less than a certain number of lines is left on a page is
acheived by

.________________________

RESERVE n lines.

What is the limit for the length of a page if the page length is not specified in the report statement.

60,000 Lines.http://abap-tutorials.com 2010

How can Symbols or R/3 icons be output on the screen?

WRITE <symbol-name> AS SYMBOL.

WRITE <icon-name> AS ICON.

REPORTING - GENERAL

What are reports? and how do you set up reports?

A report program reads and analyzes data from one or more database tables without modifying the
database. Usually, the result

of such a report program is in the form of a list which is output to the screen or sent to a printer.

What are the different types of programs?

I Include Program

M Module Pool

F Function Modules

S External Subroutines

1 Online program

Events in Reporting ? Explain ?

The following events occur at runtime of a typical report program which uses logical databases:

Event keyword Event
--------------------------------------------------------------------------------------------------

INITIALIZATION Point before the selection screen

is displayed

When you start a program in which a selection screen is defined (either in the program itself or in the
linked logical database

program), the system normally processes this selection screen first. If you want to execute a processing
block before the selection

screen is processed, you can assign it to the event keyword INITIALIZATION.

AT SELECTION-SCREEN Point after processing user http://abap-tutorials.com 2010

input on the selection screen while the selection screen is still

active

The event keyword AT SELECTION-SCREEN provides you with several possibilities to carry out processing
blocks while the

system is processing the selection screen.

START-OF-SELECTION Point after processing the selection screen

The event START-OF-SELECTION gives you the possibility of creating a processing block after processing
the selection screen

and before accessing database tables using a logical database. You can use this processing block, for
example, to set the values

of internal fields or to write informational statements onto the output screen.

At the START-OF-SELECTION event, also all statements are processed that are not attached to an event
keyword except those

that are written behind a FORM-ENDFORM block

GET <table> Point at which the logical database

offers a line of the database table <table>.

The most important event for report programs with an attached logical database is the moment at
which the logical database

program has read a line from a database table (see Accessing Data Using Logical Databases ). To start a
processing block at this
event, use the GET statement as follows:

Syntax

GET <table> [FIELDS <list>].

After this statement, you can work with the current line of the database table <table>. The data is
provided in the table work area

<table>.

GET <table> LATE Point after processing all tables which

are hierarchically subordinate to the database table <table> in the structure of

the logical database.http://abap-tutorials.com 2010

To start a processing block at the moment after the system has processed all database tables of a logical
database that are

hierarchically inferior to a specific database table, use the event keyword GET as follows:

Syntax

GET <table> LATE [FIELDS <list>].

In analogy to report programs that use only SELECT statements (see table in Comparison of Access
Methods ), the processing

block of a GET <table> LATE statement would appear directly before the ENDSELECT statement in the
SELECT loop for the

database table <table>.

END-OF-SELECTION Point after processing all lines offered

by the logical database.

To define a processing block after the system has read and processed all database tables of a logical
database, use the keyword

END-OF-SELECTION.

The following events occur during the processing of the output list of a report program:

Event keyword Event

--------------------------------------------------------------------------------------------------
TOP-OF-PAGE Point during list processing when

a new page is started

END-OF-PAGE Point during list processing when a page

is ended

The following events occur during the display of the output list of a report program:

Event keyword Eventhttp://abap-tutorials.com 2010

----------------------------------------------------------------------------------------------------

AT LINE-SELECTION Point at which the user selects a line

AT USER-COMMAND Point at which the user presses a

function key or enters a command in the command field.

AT PF<nn> Point at which the user presses the

function key with the function code PF<n>

With the selection screen, ABAP/4 offers an interactive element also for report programs. You can
define a selection screen

without having to bother about all the details required in dialog programming.

The selection screen is always processed directly after a report program is started. The user can enter
field values and selection

criteria on this screen.

The main purpose of the selection screen is to enable the user to control the database selections of the
report program. If a report

program is started from another ABAP/4 program with the SUBMIT statement (see Calling Reports), the
selection screen objects

also serve as a data interface,

With a selection screen defined in the report program, you can enable the user to

· assign values to variables with the PARAMETERS statement

· determine selection criteria with the SELECT-OPTIONS statement

How do you read selected lines of database table into an internal table in packages of predefined size.
                                    ABLE <ITAB> PACKAGE SIZE <N>.

      where 'n' is variable.

Name the WILDCARD characters which are used for comparisions with character strings & numeric
strings.

                                 -tutorials.com 2010

How to specify a client for database table processing.

      TABLES SPFLI.

SELECT * FROM SPFLI CLIENT SPECIFIED

        WHERE MANDT BETWEEN '001' AND '003'.

...

ENDSELECT.

Activation – During activation, the runtime object of aggregate object or tables is created. The runtime
object is buffered so that

the application program can access it quickly. Runtime object has information about the following
objects of table

- domain – data elements – field definition – table definition

Lock Mechanism – prevents a new database operation being started an existing one has been correctly
completed. When

conversion is done, lock is created automatically and released only when conversion is successful.

Clearing of locks

– restart adjustment – attempt is made to continue conversion at the point of termination

Cancel adjustment – lock entry is simply deleted from table

Version Management functions –

- Canceling changes – reset revised version to active version

- Storing changes – active version will be temporarily stored in version

Switching changes – switch between active and revised versions

Version catalog – list of all existing versions of an object
- Revised version – produced when we edit an existing object

- Active version – produced when we activate an object

- Temporary version – produced when we copy the active version temporarily to the database with store
version functions

- Historical versions – created when 1. Correction is created 2 correction is

   released

Table Buffering : Possible buffering types

- full buffering – either, whole table or none of the table is located in the buffer (Tables up to 30 kb done
in client dependent fully

buffered tables)

- Generic buffering – generic areas of the table are fully buffered.

- Generic key – left justified section of primary key of a table.

- generic area – all records for which fields of generic key correspond

- Single record buffering – records actually being accessed are loaded to buffers, large records where
few records are

accessed.

Internal Tables Types ?

STANDARD table

Key access to a standard table uses a linear search. This means that the time required for a search is in
linear relation to the

number of table entries.

You should use index operations to access standard tables.

SORTED tablehttp://abap-tutorials.com 2010

Defines the table as one that is always saved correctly sorted.

Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with
the lowest index. The

runtime required for key access is logarithmically related to the number of table entries.
HASHED table

Defines the table as one that is managed with an internal hash procedure

You can only access a hashed table using the generic key operations or other generic operations ( SORT,
LOOP, and so on).

Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not
allowed.

INDEX table

A table that can be accessed using an index.

Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means
that you can't create a

table of type INDEX.

Standard tables and sorted tables are index tables.

Syntax :

DATA itab TYPE table type of line type [WITH UNIQUE/NON-UNIQUE KEY <key>] [Iinitial size n] [WITH
HEADER LINE]

What are DATA CLUSTERS ?

You can group any complex internal data objects of an ABAP/4 program together in data clusters and
store them temporarily in

ABAP/4 memory or for longer periods in databases. You can store data clusters in special databases of
the ABAP/4 Dictionary.

These databases are known as ABAP/4 cluster databases and have a predefined structure.Storing a data
cluster is specific to

ABAP/4. Although you can also access cluster databases using SQL statements, only ABAP/4 statements
are able to decode the

structure of the stored data cluster.

Describe the functions of the debugger screen.

- Single step(F5) - Use this option to step through the program statement by statement. This allows you
to branch into
subroutines and function modules, and to execute these routines step by step as well. Once a
subroutine or function module

has been processed, control returns to the statement following the CALL FUNCTION or PERFORM
statement.

- Execute(F6)- Use this option to process a program line by line. All of the statements on the current line
are processed in a

single step. If you are positioned on a line that calls a subroutine and you choose Execute, the Debugger
processes the whole

subroutine and then moves on to the line following the subroutine call. This allows you to jump through
the statements within

the subroutine.

- Return(F7) - The Debugger returns from a routine to the point at which control returns to the main
program. Use this option

to return from a subroutine, function module, or called program to the calling program.

- Continue(F8)- Use this option to process the program up to the next dynamic or static breakpoint or up
to the cursor position.

If there are no more breakpoints in the program and no cursor has been set, the system exits debugging
mode and executes

the rest of the program normally.

- Tables - Display the contents of internal tables.

Problem:How to run a program in background?

Solution :Execute the Report

In the selection screen :After filling the screen fields press F9.

A screen appears requesting U to print the Background Parametershttp://abap-tutorials.com 2010

*Enter the output device(Eg HPLJ /SAP2 etc)

*In the spool options Uncheck Print immedietly,Uncheck delete after output,and new spool request.

Press enter.

Another screen appears with heading start time .U can press start immly ,then save

Now the Background job is scheduled for the given program .
To View the status of background Job,The transaction code is SM37.

Execute from the resulting screen .                -->From the Job list select U‟r program and select
Spool from the

application toolbar                                                    ‟r Spool request and click Display
icon from the

overview screen .

U will be displayed with the List.

Caution :See to that the list with does not exceed 255 columns ,If it exceeds the extra columns will be
truncated in

Background

What are presentation and application servers in SAP?

A presentation server is actually a program named Sapgui.exe. It is usually installed on a user‟s
workstation.

Application server is a set of executables that collectively interpret the ABAP/4 programs and manage
the input & output for

them.

In an ABAP/4 program how do you access data that exists on a presentation server v/s on an application
server?

For presentation server use UPLOAD or WS_UPLOAD function modules.

For application server use OPEN DATASET, READ DATASET and CLOSE DATASET commands.

Describe the syntax and function of the AUTHORITY CHECK command?

Ans :- AUTHORITY – CHECK OBJECT <object name>

        ID <name1> FIELD <f1>

ID <name2> FIELD <f2>

…

IF SY-SUBRC NE 0.http://abap-tutorials.com 2010

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular
activity.
Explain the EXPORT and IMPORT commands? How can you pass more than one group of data by using
IMPORT

commands?

EXPORT :-

To read data objects from an ABAP program into ABAP memory, use the following statement:

Syntax

EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.

This statement stores the data objects specified in the list as a cluster in memory. If you do not use the
option FROM <f i >, the

data object <f i > is saved under its own name. If you use the FROM <g i > option, the data objet <g i > is
saved under the name

<f i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.

The EXPORT statement always completely overwrites the contents of any existing data cluster with the
same name <key>.

IMPORT :-

To read data objects from ABAP memory into an ABAP program, use the following statement:

Syntax

IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.

This statement reads the data objects specified in the list from a cluster in memory. If you do not use the
TO <g i > option, the

data object <f i > in memory is assigned to the data object in the program with the same name. If you do
use the option, the data

object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory.
It may be up to 32

characters long.

You do not have to read all of the objects stored under a particular name <key>. You can restrict the
number of objects by

specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is
set to 4. If, on the other
hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of
whether it contained the data

object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.

Explain the READ LINE and MODIFY LINE commands.

READ LINE :- Use the statements READ LINE and READ CURRENT LINE to read data from the lines of
existing list levels.

These statements are closely connected to the HIDE technique.

MODIFY LINE :- To modify the lines of a completed list from within the program, use the MODIFY LINE
statement. http://abap-tutorials.com 2010

What are the differences between calling a program, transaction „with return‟ and „without return‟
and how can each be

accomplished?



-SUBMIT <rep>|(<field>) [AND RETURN] [<options>].

If you use AND RETURN, the system stores the data of the calling executable program and returns to the
calling after processing

the called program. The system resumes executing the calling program at the statement following the
call.

If you omit the AND RETURN addition, all data and list levels of the calling program (the entire internal
session) are deleted. After

the called executable program has finished, control returns to the level from which you started the
calling program.



-CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].

This statement saves the data of the calling program, and starts transaction <tcod>. At the end of the
transaction, the system

returns to the statement following the call in the calling report.

-LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].
This statement ends the calling program and starts transaction <tcod>. This deletes the call stack
(internal sessions) of all

previous programs. At the end of the transaction, the system returns to the area menu from which the
original program in the call

stack was started.

What are the differences between the parameter SET and GET?

SET PARAMETER ID <pid> FIELD <f>.

This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid>
can be up to 20 characters

long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does
not exist, double-click

<pid> in the ABAP Editor to create a new parameter object.

GET PARAMETER ID <pid> FIELD <f>.

This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find
a value for <pid> in the

SAP memory, it sets SY-SUBRC to 4, otherwise to 0.

WHAT are the commands that allow you to process sequential file? And what is their syntax?




<position> MESSAGE

<field>

                                   INTO <field>




   TRANSFER <field> to <dataset name>

What is the difference between opening a dataset for input, output, appending?http://abap-
tutorials.com 2010
    Opens the file for writing if exists it is overwritten if not then it is created.



Opens an existing file for reading.



Opens the file for writing at the end of the file .If it does not exist, it is

created, if opened, you        return to the end.

When an internal table is created, the settings criteria for the value of occurs?

The objective of setting the value of an occurs for an internal table is a question of optimization. The
following facts should be

taken into account when making such decision.

1) The complete data area of a program is 64000 bytes.

2) The initial size declared is kept in roll area (quicker access to program)

3) Data entered that exceeds the initial size stores in the roll file (Slower access to program)

You should also analyze the expected volume and access rates before making the decision.

Define "Check " statements, how it works?

To terminate a single loop pass conditionally, use the CHECK <condition> statement in the statement
block of the loop.

If the condition is not true, any remaining statements in the current statement block after the CHECK
statement are ignored, and

the next loop pass starts. <condition> can be any logical expression.

Explain Field Group(extract dataset)?

An extract dataset consists of a sequence of records. These records may have different structures. All
records with the same

structure form a record type. You must define each record type of an extract dataset as a field group,
using the FIELD-GROUPS

statement.

FIELD-GROUPS <fg>.
This statement defines a field group <fg>. A field group combines several fields under one name. For
clarity, you should declare

your field groups at the end of the declaration part of your program.

A field group does not reserve storage space for the fields, but contains pointers to existing fields. When
filling the extract dataset

with records, these pointers determine the contents of the stored records.

What is the difference between Move & assign statement?

Move :- To assign the value of a data object <f1> to a variable <f2>, use the following statement:

MOVE <f1> TO <f2>.http://abap-tutorials.com 2010

or the equivalent statement

<f2> = <f1>.

The contents of <f1> remain unchanged. <f1> does not have to be a variable - it can also be a literal, a
text symbol, or a constant.

You must always specify decimal points with a period (.), regardless of the user‟s personal settings.

Multiple value assignments in the form

<f4> = <f3> = <f2> = <f1>.

Assign :- ASSIGN <f> TO <FS>.

When you assign the data object, the system checks whether the technical attributes of the data object
<f> correspond to any type

specifications for the field symbol <FS>. The field symbol adopts any generic attributes of <f> that are
not contained in its own

type specification. Following the assignment, it points to <f> in memory.

How do you run a report for a row in table?

Using Graphics Multiplexer. There is an option some thing similar to screen capture which captures data
only. Using that data you

can draw graphs (3D and 2D). This option is available all the time from Menu! -> Generate Graphics
which captures the data then

you need to drag and select the data you want to draw a graph on. Once you select you can click on
Graphics, which launches
graphics multiplexer.http://abap-tutorials.com 2010

Memory Management

SAP memory (Global Memory): - is available to a user during the entire duration of a

terminal session. Its contents are retained across transaction boundaries as well as

external and internal sessions.

External session: - when user logs on to R/3 system, the system creates a new terminal

session called external session. E.g. System

Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog

module (with CALL DIALOG) or a report (with SUBMIT or RETURN).

For external session: - internal sessions are allowed.

Roll area: - Data areas of used programs are created in roll areas for each internal session.

Posting data between internal sessions: - EXPORT TO MEMORY and IMPORT FROM

MEMORY.

Main program group: - Created when exporting an internal session.

Additional program group: - If a function module belonging to a function group not so far

loaded, additional program group is created.

Subroutine call: - When external subroutine is called, system loads the relevant program

and adds it to the program group of calling program.

Work areas: - Both table & common workareas with the same name are created once for

each program group and then shared by all programs in the group.

List system: - Consists of basic list and all details list belonging to basic list assigned to

exactly one screen level.

User interface: - Only program has its own user interface. Internal sessions interface is

initially empty. Special user interface has to be activated using SET PF-STATUS

statement.
ABAP/4 memory: - Retained only during the lifetime of an external session.

Data cluster: - Group of several data objects.

Data objects: - Units of data, which a program processes at runtime.

How do you write a DATA object from ABAP/4 program to ABAP/4 memory and restore the same from
memory to

program.

    EXPORT <f1> [FROM <g1>] <f2> [FROM <g2>] ... TO MEMORY ID <key>.

The ID <key>, which can be up to 32 characters long, identifies the data in memory.

Statement used to delete data objects in ABAP/4 memory.



How will you create a file on application server



ABAP/4 statement for opening a file on application server for reading ___________.

            set <dsn> for input.

How will you transfer data into a file in application server ?



Data num type i.http://abap-tutorials.com 2010

Open dataset fname for output.

Do 10 times.

 Num = Num + 1.

Transfer num to fname.

Enddo.

.etc.....

Name the function modules to write data from an Internal Table to the Presentation Server.

DOWNLOAD and WS_DOWNLOAD.

Name the function modules to read data from Presentation Server into an Internal Table.
UPLOAD and WS_UPLOAD.

Name the function module that can be used to give information about files on Presentation Server and
about it's

Operating System.

WS_QUERY.

Name the ABAP/4 key word for seaching a string in an Internal Table.

SEARCH <itab> FOR <str> <options>.

How would you find the attributes of a data type or data object ?

DESCRIBE FIELD <f> [LENGTH <l>] [TYPE <t> [COMPONENTS <n>]]

          [OUTPUT-LENGTH <o>] [DECIMALS <d>]

[EDIT MASK <m>].

Which function module would you use to check the user's authorization to access files before opening a
file?

AUTHORITY_CHECK_DATASET

Name the function module used to convert logical file names to physical file names in ABAP/4 programs.

FILE_GET_NAME.http://abap-tutorials.com 2010

What does CHAIN ....END CHAIN do?

Sometimes you want to check several fields as a group. To do this, include the fields in a FIELD
statement, and enclose

everything in a CHAIN-ENDCHAIN block.

Example

**** Screen flow logic: ****

CHAIN.

FIELD: SPFLI-CARRID, SPFLI-CONNID.

 MODULE CHECK_FLIGHT.

ENDCHAIN.
When an error is found inside a chain, the screen is re-displayed, and all fields found anywhere in the
chain are input-enabled. All

non-chain fields remain disabled.

What does an extract statement do in the ABAP program?

Fills the fields groups with values.

What happens when a table is activated in DD?

- A table definition is generated

- Map to the database system

- For each table, a table of the same name with the same fields and

corresponding data type is created in database.                                   – Primary index is
generated automatically

What is a check table and what is a value table?

- When we define a foreign key in a table (A). If this key refers to primary key of another table (B). Table
B is check table

   Fields referring to a domain may assume values contained in the

corresponding fields of the value table. Field referring to the domain

should have a foreign key

What is CTS and What do you know about it? [ CTS is Correction and Transport Systems ]

- Correction system manages the internal system components like objects like only original version of
the object exists. It stores

all changes made to the object.

- Transport system allows to transports the object from on SAP system to another (Development system
to Production system).

It allows to over write or delete existing object in target system and import new objects to target
systems.

  During development work we start by opening a task (correction) to http://abap-tutorials.com 2010

  which we can assign new and changed objects. Once changes have

been made, transport new or changed objects to other SAP system by
means of transport (Change) request.

Have you used SAP supplied programs to load master data?

- SAP supplied BDC programs – RM06BBI0 (Purchase requisitions)

- RMDATIND (Material master) RFBIKR00 (Vendor Masters)

-   RFBIDE00 (Customer Master) RVINVB00 (Sales Order)

What are the Techniques involved in using SAP supplied programs? Do you prefer to write your own
programs to load

master data? Why?

- Identify relevant fields

- Maintain transfer structure ( Predefined – first one is always session record)

- Session record structure , Header Data, Item ( STYPE – record type )

- Fields in session structure – STYPE, GROUP , MANDT, USERNAME , NO DATA

- Fields in header structure – consists of transaction code also – STYPE, BMM00, TCODE,MATNR and
Fields in Item - ITEMS

…

- Maintain transfer file – sample data set creation

How do you set up background jobs in SAP? What are the steps? What are events driven batch jobs?

- Create a job using function module JOB-OPEN

- Collect the job specifications.

- Add a job step to the job with the function module JOB-SUBMIT.

- Close the job and pass it to Background processing system for execution with the function module JOB-
CLOSE

- EVENT DRIVEN BATCH JOBS :-

- Types = System events – triggered when activation of new operation mode takes place

-        User events - Triggered from ABAP/4 or external program.

- Triggering an event notifies the background processing that named condition has been reached. The
Background system
reacts by starting any jobs that were waiting for the event.

Transaction codes related to background jobs creation and processing are :-

SM36(Job creation)

SM37(Job selection and execution).

What are presentation and application servers in SAP?

-A presentation server is actually a program named Sapgui.exe. It is usually installed on a user‟s
workstation.

- Application server is a set of executables that collectively interpret the ABAP/4 programs and manage
the input & output for

them.

In an ABAP/4 program how do you access data that exists on a presentation server v/s on an application
server?

- For presentation server use UPLOAD or WS_UPLOAD function modules.

For application server use OPEN DATASET, READ DATASET and CLOSE DATASET commands.

What is the difference between Synchronous and Asynchronous updates ?

- A program asks the system to perform a certain task, and then either waits or doesn't wait for the task
to finish. In

synchronous processing, the program waits: control returns to the program only when the task has been
completed. In http://abap-tutorials.com 2010

asynchronous processing, the program does not wait: the system returns control after merely logging
the request for

execution.

Transferring SPA/GPA Parameters to Transactions

To fill the input fields of a called transaction with data from the calling program, you can use the
SPA/GPA technique. SPA/GPA

parameters are values that the system stores in the global, user-related SAP memory. You use the SAP
memory to transfer

values between programs beyond the borders of transactions. A user can access the values stored in the
SAP memory during
one terminal session for all modes used in parallel.

To fill an SPA/GPA parameter, use:

Syntax

SET PARAMETER ID <pid> FIELD <f>.

To read an SPA/GPA parameter into an ABAP program, use:

Syntax

GET PARAMETER ID <pid> FIELD <f>.

What is the difference between Commit-Work and Rollback-Work tasks ?

- Commit-Work statement “performs” many functions relevant to synchronized execution of tasks.
Rollback-Work

statement “cancels” all requests relevant to synchronized execution of tasks.

What are the different database integrities ?

- Semantic integrity

- Relational integrity

- Primary key integrity

- Value set integrity

- Foreign key integrity and

- Operational integrity.http://abap-tutorials.com 2010

What is SAP locking ?

- It is a mechanism for defining and applying logical locks to database objects.

What does a lock object involve ?

- The tables

- The lock argument.

What are the different kinds of lock modes ?

- Shared lock

- Exclusive lock
- Extended exclusive list.

How can a lock object be called in the transaction ?

- By calling Enqueue <lock object> and Dequeue <lock object> in the transaction.

What are the events by which we can program “help texts” and display “possible values lists” ?

- PROCESS ON HELP-REQUEST (POH)

- PROCESS ON VALUE-REQUEST (POV).

What are function modules ? Types of parameters ?

- Function modules are general-purpose library routines that are available system-wide.

- In general, function module can have four types of parameters:

- EXPORTING: for passing data to the called function

- IMPORTING: for receiving data returned from the function module

- TABLES: for passing internal tables only, by reference (that is, by address)

- CHANGING: for passing parameters to and from the function

How to send a report to the printer instead of displaying it on the screen ?

- We can send a report to the printer instead of displaying it on the screen. To do this, use the keywords
TO SAP-SPOOL:

SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.

How can we send data to external programs ?

- Using SPA/GPA parameters (SAP memory)

- Using EXPORT/IMPORT data (ABAP/4 memory)

What are the differences between SELECT-OPTIONS,VARIANTS AND PARAMETERS?http://abap-
tutorials.com 2010

To enter values for variables on the selection screen, you must define the variables using the
PARAMETERS statement.

To enter a range of values for the variables on the selection screen we use SELECT-OPTIONS statement.

If you want to run the same report program with the same selections at regular intervals (for example,
for monthly sales statistics),
In, ABAP/4 offers you combine the desired values for all these selections in one selection set. Such a
selection set is called a

VARIANTS.

What is SPA / GPA ? When do you use it?

To fill the input fields of a called transaction with data from the report, you can use the SPA/GPA
technique. SPA/GPA

parameters are values that the system stores in the global, user-related SAP memory. You use the SAP
memory to transfer

values between programs. A user can access the values stored in the SAP memory during one terminal
session for all modes

used in parallel.

Usually, the input fields on the initial screen of a transaction are connected to SPA/GPA parameters. If
you fill these parameters

from within your program before calling the transaction, the system fills the input fields with the
corresponding values.

Why and how do you display a message? What are the message types?

An ABAP/4 module lets the system know that an error has occurred by issuing information,error or
warning messages. you can

also use success messages when a particular action is performed successfully. When the user presses
ENTER, the current

process is interrupted. The system returns the user to the SAP main menu using Abend message.

Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnn is the number
of the message.

You have to declare the Id of the message class in the program using

MESSAGE-ID cc,where cc is the message class.

How and where do You create Message class?

You can create a message class from two places in the system:

1) From an Object class object list (in the Object Browser)

2) From an ABAP/4 module (in the ABAP/4 editor)
What do you define in the Data element and Domain?

For Data Element

The information includes the field's representation on the screen in the form of FIELD TEXTS, COLUMN
CAPTIONS in list outputs

of the table contents and the format of the output via PARAMETER IDS and Online field documentation.

For Domain

Data Type,Field Length and the allowed data values are defined . http://abap-tutorials.com 2010

What is the difference between a pool table and a transparent table?

Transparent Table :

A tran table has a one to one relataionship in the database. The table in the dictionary has the same
name, same no of

fields, and the fields have the same name as in the R3 table defn. A transparent tabel has application
data (Master and

Transaction).

Pooled Table :

A pool table has many to one relation with the table in the database. For one table in the database there
r many tables in

the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff no
of fields and field names

are different. A pooled table is stored in the pool at the database level. A table poo is a databse table
with a special struct that

enables the data of many R3 tables to be stored in it. It can hold only pooled tables.

What are field symbols and field groups? Have you used component idx of structure with field groups?

A field symbol does not physically reserve space for a field, but points to a field which is not known until
runtime of the program.

Field symbols are comparable to the concept of pointers as used in the programming language C.

An extract dataset consists of a sequence of records. These records may have different structures. All
records with the same
structure form a record type. You must define each record type of an extract dataset as a field group,
using the FIELD-GROUPS

statement.

What is the step by step process to create a table in data dictionary?

1. Selecting the table fields

2. Maintaining foreign keys

3. Creating secondary indexes (optional)

4. Maintaining technical settings

5. Activating a table

What is the advantage of structures and how do you use them in Abap/4 programs?

A structure is defined in the ABAP/4 Dictionary like a table and can be accessed from ABAP/4 programs.
Any change to the

definition of the structure in the ABAP/4 Dictionary is automatically implemented in all programs.

While data in tables is stored permanently in the database, structures contain data only during the
runtime of a program.

Structures are used in abap/4 programs to transfer data between programs as it is globally
defined.Structures are used in

particular for defining data at the interface between module pools and screens and for standardizing
parameters for function http://abap-tutorials.com 2010

modules.

What does an extract statement do in the Abap/4 program?

With the first EXTRACT statement of a report, the system creates the extract dataset and adds the first
extract record. With each

subsequent EXTRACT statement, the system adds another extract record to the extract dataset.

What is a collect statement and how is it different from the append statement?

To fill an internal table with lines which have unique standard keys, we use the COLLECT statement.

If an entry with the same key already exists, the COLLECT statement does not append a new line as
APPEND statement, but
adds the contents of the numeric fields in the work area to the contents of the numeric fields in the
existing entry.

What is an open SQL vs Native SQL.

Open SQL allows you to access all database tables known to the SAP system, regardless of the database
manufacturer.

Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your
ABAP/4 program.

To avoid incompatibilities between different database tables and also to make ABAP/4 programs
independent of the database

system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a
subset of standard

SQL statements as well as some enhancements which are specific to SAP.

A database interface translates SAP's Open SQL statements into SQL commands specific to the database
in use. Native SQL

statements access the database directly.

What does an EXEC SQL statement do in ABAP? What is the disadvantage of using it?

To use a Native SQL statement, it must be preceded by an EXEC SQL statement and concluded by an
ENDEXEC statement.

An ABAP/4 program with Native SQL statements does not generally run with different databases.

What are the events used in ABAP4?

The events are



                 -SCREEN

                 -SCREEN ON <field>

        -OF-SELECTION

      -OF-PAGE

      -OF-PAGE DURING LINE SELECTION

      -OF-PAGE
      -OF-SELECTION

            -COMMAND

         -SELECTIONhttp://abap-tutorials.com 2010




What is an interactive reports ? What is the obvious difference of such reports with HTML type reports?

Interactive reporting allows the user to participate actively in retrieving and presenting data during the
session. Instead of one

extensive and detailed list, with interactive reporting you create a condensed basic list from which the
user can call detailed

information by positioning the cursor and entering commands. Interactive reporting thus reduces
information retrieval to the data

actually required.

Detailed information is presented in secondary lists. A secondary list may either overlay the basic list
completely or appear in an

additional dialog window on the same screen. The secondary list can itself be interactive again.

Apart from creating secondary lists, interactive reporting also allows to call transactions or other
reports from lists. These

programs then use values displayed in the list as input values. The user can, for example, call a
transaction from within a list to

change the database table whose data is displayed in the list.

What happens when a table is activated in DD?

When the table is activated, a physical table definition in the database is added to the table definition
stored in the ABAP/4

Dictionary. The database-independent table definition from the ABAP/4 Dictionary is translated into a
definition of the relevant

database.
What is a check table and What is a value table?

The relational data model contains not only tables, but also relationships between tables. These
relationships are defined in the

ABAP/4 Dictionary by foreign keys. An important function of foreign keys is to support data integrity in
the relational data model.

Foreign key fields may assume only those values allowed by the check table, in other words, values
occurring in the primary key

of the check table.

A foreign key provides a link between two tables, for eg.,T1 and T2 by including a reference in table T1
to the primary key of table

T2. For this purpose, Foreign key fields assigned to the primary key fields of T2 are included in T1. Table
T1, which is the one

being checked, is called a foreign key table, and table T2 is called a check table. The terms dependent
(foreign key) table and

referenced (check) table are also used.

VALUE TABLE:If the domain of the check field has a value table, this is proposed by the system as check
table in the foreign field

maintenance. The key fields of the value table are in this case assigned fields of the foreign key table
with the same domain.

These fields may assume only those values allowed by the value table.

The value range of the domain can be defined by specifying value table.All table fields referring to this
domain can then be

checked against the corresponding field of this value table.In order the check can be executed, a foreign
key must be defined for

the value table.http://abap-tutorials.com 2010

What are matchcodes? Describe?

A matchcode is a tool to search for data records in the system. Matchcodes are an efficient and user-
friendly search aid for cases

where the key of a record is unknown.

It consists of two stages one is Match code object and the other is Matchcode ID.
A matchcode object describes the set of all possible search paths for a search term.

Matchcode ID describes a special search path for a search term.

What are ranges? What are number ranges?

It is often necessary to directly access individual records in a data structure. This is done using unique
keys. Number ranges are

used to assign numbers to individual database records for a commercial object, to complete the key.
Such numbers are e.g. order

numbers or material master numbers.

How do you validate the selection criteria of a report? And how do you display initial values in a
selection screen?

The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for the
input values on the screen

and respective messages can be sent.

To display initial values in the selection screen:



      DEFAULT VALUE option of PARAMETERS Statement



What is the Client concept in SAP? What is the meaning of Client independent?

In commercial, organizational and technical terms, the client is a self contained unit in the R3 system,
with separate set of Master

data and its own set of Tables.

When a change is made in one client all other clients are affected in the system - this type of objects are
called Client independent

objects.

What is Internal table?

Internal tables are table objects that only exist for the runtime of the program. There are several ABAP
statements for

working with internal tables, for example, append, insert, delete, or find lines.
The number of lines of an internal table is extended dynamically at runtime as required.

You can use internal tables for table calculations on subsets of database tables. For example, you can
read a part of one or more

database tables into an internal table.

They also allow you to reorganize their contents to suit the needs of your program. You can, for
example, read particular entries

from one or more large customer tables into an internal table, and then use them to create a list. When
you run your program, you

can access this data directly, instead of having to search for each record in the database.http://abap-
tutorials.com 2010

What is a variant and where do you use it?

If you want to run a report program with same selections at regular intervals (for example, for monthly
sales statistics), you

would not want to enter the same values each time. So, ABAP/4 offers you a possibility to combine the
desired values for all these

selections in one selection set. You can create as many different selection sets as you like for each report
program and they

remain assigned only to the report program in question. Such a selection set is called a variant.

Using Variants Online

Using Variants in Background Processing

Online, starting a report via variant saves the user work,minimizes input errors. In background
processing, a variant is the only

possibility you have to pass values for the selections.

To fill certain selections with values that change according to the application, you use a variant, which
takes the variable values

from Table TVARV.

What is set parameter and get parameter?

We can pass data to a called program using SPA/GPA parameters. SPA/GPA parameters are field values
saved globally
in memory. Each parameter is identified by a three-character code: you can define these parameters in
the object browser by

selecting Other objects on the first screen. The SPA/GPA storage is user-specific and valid throughout all
the user's sessions.by

using the SET PARAMETER or GET PARAMETER statements

These statements let you store and retrieve SPA/GPA values from an ABAP/4 program. If the selection
screens for the two

transactions do not share the same required fields, use these statements to store screen fields explicitly
by name.

Before calling the new transaction from a PAI module, store the caller transaction's fields under one
name:

SET PARAMETER ID 'RID' FIELD <FIELD NAME1>.

The system stores the value in <field name1> in the SPA parameter 'RID'. The three-character identifier
'RID' must be defined in

the SAP table TPARA. If the SPA parameter 'RID' already contains a value, the SET PARAMETER
statement overwrites it (with

the contents of <FIELD NAME1>).

In the PBO module for the called transaction, retrieve the fields under the other name:

GET PARAMTER ID 'RID' FIELD <FIELD NAME2>.

What is field symbol?

A field symbol does not physically reserve space for a field, but points to a field which is not known until
runtime of the

program. Sometimes you only know which field you want to process, and how you want to process it, at
runtime.http://abap-tutorials.com 2010

For this purpose, you can create field symbols in your program. At runtime, you can assign real fields to
such field symbols. All

operations which you have programmed with the field symbol are then carried out with the assigned
field. After successful

assignment, there is no difference in ABAP/4 whether you reference the field symbol or the field itself.

How to use a grid list?
Use Function Module Display_*LIST. In U‟r program .Put all the data that U want to output in its final
format and then pass this

internal table to the function module

Two types of grid list .

DISPLAY_GRID_LIST(Version 4.0b)

DISPLAY_BASIC_LIST(Version 4.6b)

Calculate the subtotal etc and save it as a variant ,However while printing it will print all the enties of the
fields

How to pass data from the form to the Subroutine program?

Use structure ITCSY

How can we pass selection and parameter data to a report ?

- There are three options for passing selection and parameter data to the report.

using SUBMIT...WITH .

using a report variant .

using a RANGE table .

Standard Programs that every ABAPer Shud Know

RSAVGL00 Table adjustment across clients

RSBDCSUB Release batch-input sessions automatically RSCLTCOP Copy

tables across clients

RSINCL00 Extended program list

RSORAREL Get the Oracle Release

RSPARAM Display all instance parameters

RSTXSCRP Transport SAPscript files across systems

RGUGBR00 Substitution/Validation utility http://abap-tutorials.com 2010

RSUSR003 Check the passwords of users SAP* and DDIC in all clients

RSUSR006 List users last login
RSTXLDMC To Load LOGO‟s to application server



Interactive reporting allows the user to participate actively in retrieving and presenting data during the
session. Instead of one

extensive and detailed list, with interactive reporting you create a condensed basic list from which the
user can call detailed

information by positioning the cursor and entering commands. Interactive reporting thus reduces
information retrieval to the data

actually required.

What are the event key words in interactive reporting ?

Event keyword Event

AT LINE-SELECTION Moment at which the user selects a line by

double-clicking on it or by positioning the

cursor on it and pressing F2.

AT USER-COMMAND Moment at which the user presses a function

key.

TOP-OF-PAGE DURING LINESELECTION

Moment during list processing of a secondary

list at which a new page starts.

What is secondary list ?

Secondary lists allow you to enhance the information presented in the basic list. The user can, for
example, select a line of the

basic list for which he wants to see more detailed information. You display these details on a secondary
list.Secondary lists may

either overlay the basic list completely or you can display them in an extra window on the screen. The
secondary lists can

themselves be interactive again.

How to select valid lines for secondary list ?
To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the
processing block END-OFSELECTION, delete the contents of one or more fields you previously stored for
valid lines using the HIDE statement. At the event

AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field
contents there. In the

latter case, create a secondary list, since you previously stored field contents for valid lines only. After
processing the secondary

list, clear the work area again. This prevents the user from trying to create further secondary lists from
the secondary list

displayed.http://abap-tutorials.com 2010

How to create user interfaces for lists ?

The R/3 system automatically generates a graphical user interface (GUI) for your lists that offers the
basic functions for list

processing, such as saving or printing the list. If you want to include additional functionality, such as
pushbuttons, you must define

your own interface status.To create a new status, the Development Workbench offers the Menu
Painter. With the Menu

Painter,you can create menus and application toolbars.And you can assign Function keys to certain
functions. At the beginning of

the statement block of AT END-OF-SELECTION, activate the status of the basic list using the statement:
SET PF-STATUS

'STATUS'.

Can we call reports and transactions from interactive reporting lists ?

YES.Interactive reporting also allows you to call transactions or other reports from lists. These programs
then use values

displayed in the list as input values.The user can, for example, call a transaction from within a list to
change the database table

whose data is displayed in the list.

How to maintain lists ?

To return from a high list level to the next-lower level (SY-LSIND), the user chooses Back on a secondary
list.The system then
releases the currently displayed list and activates the list created one step earlier.The system deletes the
contents of the released

list.To explicitly specify the list level into which you want to place output, set the SY-LSIND field. The
system accepts only index

values which correspond to existing list levels.It then deletes all existing list levels whose index is greater
or equal to the index you

specify.For example, if you set SY-LSIND to 0, the system deletes all secondary lists and overwrites the
basic list with the current

secondary list.

What are the page headers for secondary lists?

On secondary lists, the system does not display a standard page header and it does not trigger the event
TOP-OF-PAGE.To

create page headers for secondary list, you must enhance TOP-OF-PAGE:

Syntax    TOP-OF-PAGE DURING LINE-SELECTION. The system triggers this event for each secondary list.
If you want to

create different page headers for different list levels, you must program the processing block of this
event accordingly, for example

by using system fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).

What is meant by stacked list ?

A Stacked list is nothing but secondary list and is displayed on a full-size screen unless you have specified
its coordinates using

the window command.

Is the basic list deleted when the new list is created?

NO.It is not deleted and you can return back to it using one of the standard navigation functions like
clicking on the back button or

the cancel button.

What is meant by hotspots ?

Hotspot is a list area where the mouse pointer appears as an upright hand symbol.When a user points to
that area(and the hand
cursor is active),a single-click does the same thing as a double-click. Hotspots are supported from R/3
release 3.0c.

In which system field does the name of current gui status is there ?

The name of the current GUI STATUS is available in the system field SY-PFKEY.http://abap-tutorials.com
2010

What is meant by hide area ?

The hide command temporarily stores the contents of the field at the current line in a system-controlled
memory called the HIDE

AREA.At an interactive event,the contents of the field is restored from the HIDE AREA. When calling a
secondary list from a list

line for which the HIDE fields are stored, the system fills the stored values back into the variables in the
program. In the program

code, insert the HIDE statement directly after the WRITE statement for the current line.

When the get cursor command used in interactive lists ?

If the hidden information is not sufficient to uniquely identify the selected line ,the command GET
CURSOR is used.The GET

CURSOR command returns the name of the field at the cursor position in a field specified after the
addition field,and the value of

the selected field in a field specified after value.

How to pass data from list to report ?

ABAP/4 provides three ways of passing data:

   ---Passing data automatically using system fields

---Using statements in the program to fetch data

---Passing list attributes

How to call other programs ?

Report Transaction

Call and return SUBMIT AND RETURN CALL TRANSACTION

Call without return SUBMIT LEAVE TO TRANSACTION
System fields used in interactive Reporting

The SY-LSIND system field contains the index of the list currently created. While creating a basic list, SY-
LSIND equals 0.

With each interactive event, the system automatically sets the following system fields:

System field Information

SY-LINCT total line count of a list

SY-LINNO current line no where cursor is placed.http://abap-tutorials.com 2010

SY-LSIND Index of the list currently 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-UCOMM Function code that triggered the event

SY-PFKEY Always contains the status of the current list.

TOP-OF-PAGE DURING LINE-SELECTION.

The system triggers this event for each secondary list. If you want to create different page headers for
different list levels, you

must program the processing block of this event accordingly, for example by using system fields such as
SY-LSIND or SY-PFKEY

in control statements (IF, CASE).



From system fields, you retrieve the following information: the index of a list, the position of the list in
the output window, and the

location of the cursor. The only system field that contains the contents of the selected line is SY-LISEL.
To pass individual output fields or additional information from a line to the corresponding processing
block during an interactive

event, use these statements:

HIDE

The HIDE statement is one of the fundamental statements for interactive reporting. Using the HIDE
technique, you can at the

moment you create a list level define, which information later to pass to the subsequent secondary lists.

Syntax HIDE <f>.

Eg HIDE: SPFLI-CARRID, SPFLI-CONNID, NUM.

READ LINE

Use the statements READ LINE and READ CURRENT LINE to explicitly read data from the lines of existing
list levels. These http://abap-tutorials.com 2010

statements are tightly connected to the HIDE

technique.

Syntax :

READ LINE <lin> [INDEX <idx>]

[FIELD VALUE <f1> [INTO <g 1>]... <f n> [INTO <g n>]]

[OF CURRENT PAGE|OF PAGE <p>].

Eg :

READ LINE SY-INDEX FIELD VALUE BOX.

GET CURSOR

Use the statements GET CURSOR FIELD and GET CURSOR LINE to pass the output field or output line on
which the cursor was

positioned during the interactive event to the processing block.

Syntax

GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>]

[VALUE <val>] [LENGTH <len>].
SET CURSOR

To set the cursor, use the SET CURSOR statement. This statement sets the cursor in the most recently
created list. While

creating the basic list, this is always the basic list itself. While creating a secondary list, this is the
previous list.

SET CURSOR <col> <lin>.

This statement sets the cursor to column <col> of line <lin> of the output window.http://abap-
tutorials.com 2010

Calling Programs

If you need to program an extensive application, one single program will become very complex. To
make the program easier to

read, it is often reasonable to divide the required functions among several programs.

ABAP allows you to call reports as well as transactions using these statements:

Report Transaction

Call without return SUBMIT LEAVE TO TRANSACTION

Call and return SUBMIT AND RETURN CALL TRANSACTION

Typical Structure of ABAP Program

1. Report Definitions *

2. Table and Data definitions *

3. Initialization event

4. Screen Select Options/Inputs *

5. Selection-screen event

6. Start-of-selection event

7. Performs and other Events *

statements

8. End-of-selection event

1. Initialization
                         t display of selection screen

                                      -OPTIONS

2. At Selection-Screen




                           -OPTIONS

4. START-OF-SELECTION & END-OF-SELECTIONhttp://abap-tutorials.com 2010




                                  -OF-SELECTION and END-OF-ELECTION is only executed

      efault , no need to have END-OF-SELECTION

                                                                               -OF-SELECTION

5. Form Event



                                              RM




6. Limitations of Simple PERFORM



               xibility to use the same subroutine multiple number of times.

Syntax1: PERFORM <XXXX> using <YYY>

  changing <MMM>



      FORM <XXXX> using <YYY> like <ZZZ>
     changing <MMM> like <NNN> - Pass by reference

OR

FORM <XXXX> using value (YYY) like <ZZZ>      - Pass by value, creates another copy of the variable.

Example1:

PERFORM date-invert using in-date

 Changing out-date

FORM date-invert using in-date like datumhttp://abap-tutorials.com 2010

Syntax2: PERFORM function-name(program) IF FOUND.

Example2: PERFORM HEADER(FORMPOOL) IF FOUND.

6.    Get event




     TABLES: parameters………

            s part of the tables mentioned in the TABLES: parameter can be viewed & edited

7.    To Exit from an Event

       – It exits from the respective subroutine were this syntax is used , generally condition for the
EXIT is stated

before this syntax

 Check - here the conditional check is done at the same time .

CHECK <condition>

If the condition is not satisfied, the system leaves the subroutine and resumes

the processing after the PERFORM statement

        – it is the abrupt stopping the program flow

8.    CALLing Functional Modules

Syntax:
CALL FUNCTION <module>http://abap-tutorials.com 2010

[EXPORTING f1 = a1 .... fn = an]

[IMPORTING f1 = a1 .... fn = an]

[CHANGING f1 = a1 .... fn = an]

[TABLES    f1 = a1 .... fn = an]

[EXCEPTIONS e1 = r1 .... en = rn

Example:

CALL FUNCTION 'Z_DATE_CONVERSION'

EXPORTING STD_DATE = GEN_DATE

IMPORTING CH_DATE = NEW_DATE

9. List Events

TOP-Of-PAGE, END-OF-PAGE,

AT LINE-SELECTION, AT USER-COMMAND

These events are triggered by the ABAP runtime environment while a list is being created or when a user
performs an

action on a list. The statement in these blocks can format the list or process the user‟s request.

ABAP PERFORMANCE ISSUES.

ABAP/4 Optimization

                                                               nce. It's hard to know whether that
optimization technique

REALLY helps unless you test it out. Using this tool can help you know what is effective, under what
kinds of conditions. The

GET RUN TIME has problems under multiple CPUs, so you should use it to test small pieces of your
program, rather than the

whole program.


fields are only read if http://abap-tutorials.com 2010
they are used. This can make a very big difference.

      -groups can be useful for multi-level sorting and displaying. However, they write their data to the
system's paging space,

rather than to memory (internal tables use memory). For this reason, field-groups are only appropriate
for processing large

lists (e.g. over 50,000 records). If you have large lists, you should work with the systems administrator to
decide the maximum

amount of RAM your program should use, and from that, calculate how much space your lists will use.
Then you can decide

whether to write the data to memory or swap space. See the Fieldgroups ABAP example.



                                               to access a relatively constant number of records (for
instance, if you only access the

transactions for one month, then there probably will be a reasonable range, like 1200-1800, for the
number of transactions

inputted within that month). Then use a SELECT A B C INTO TABLE ITAB statement.

                                                              sing. Log into your productive system, and use
SE80 -> Dictionary

Objects (press Edit), enter the table name you want to see, and press Display. Go To Utilities -> Table
Contents to query the

table contents and see the number of records. This is extremely useful in optimizing a program's
memory allocation.


rather than giving a huge

list of information all at once to the user.

                                                                                             er of records
you expect to be

accessing. If the number of records exceeds NUM_RECS, the data will be kept in swap space (not
memory).


one operation,
rather than repeated operations that result from a SELECT A B C INTO ITAB... ENDSELECT statement.
Make sure that ITAB

is declared with OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to access.

                                      uch as monthly expense totals). Use these avoid wasting resources
by calculating a total

that has already been calculated and stored.



To determine the usage of variables and subroutines within a program, you can use the ABAP utility
called „Program Analysis‟

included in transaction SE38. To do so, execute transaction SE38, enter your program name, then use
the path Utilities ->

Program Analysis

ABAP PERFORMANCE IMPROVEMENTS VIA DATA DICTIONARYhttp://abap-tutorials.com 2010



·     The columns at the beginning of an index are the most “common”. The most “common” columns
are those where reports

are selecting columns with no ranges - the where clause for these columns is an “equal to” expression.
Rearrange columns of an

index to match the selection criteria. For example, if a select statement is written to include columns 1
and 2 with “equal to”

expressions in the where clause and column 3 and 4 are selected with value ranges, then the index
should be created with

columns in the sequence of 1,2,3,4.

·    Columns towards the end of the index are either infrequently used in selects or are part of
reporting selects that involve

ranges of values.



·     Use VIEW tables to effectively join and “denormalize” related tables that are taking large amounts
of time to select for
reporting. For example, at times where highly accessed tables normalize description text into one table
and the header data into

another table, it may make sense to create a view table that joins the relevant fields of the two
associated with a poor performing

ABAP.

                                                         nd are highly accessed, convert the pooled table
into a transparent table

and add an index. POOLED tables are supposed to be collections of smaller tables that are quickly
accessed from the

database or are completely buffered in memory. Pooled tables containing more than a few hundred
rows and are accessed

many times in a report or transaction are candidates for POOL to TRANSPARENT Conversion. For
example, table A053

contains tax jurisdiction condition information and are accessed more than ten times in the sales order
create

transaction. If the entire United States tax codes are loaded into these condition tables, the time to save
a sales order

increases to unacceptable levels. Converting the tax condition table to transparent and creating an
index based

upon the key fields, decreases processing time from minutes to seconds.

·    Do not allow the use of LIKE in an SAP SQL statement accessing a large table.

· Use internal tables in ABAPs to preselect values once and store values in memory for sorting and
searching purposes (this

is an assumption stated at the beginning of this discussion).

· Avoid logical databases when not processing all row s of a table. In fact, a logical database is merely a
group of nested

SAP SQL SELECT statements. In general, when processing a small number of rows in a larger table is
required, the use of

internal tables and NOT using a logical database or nested selects will be much better for
performance.http://abap-tutorials.com 2010

ABAP IMPORTANT REPORTS
Submit a BDC job with an internal batch number and wait for the end of the batch input session.



Release batch input sessions automatically

ABAP IMPORTANT TCODES

OSS1 SAP Online Service System

SM13 Update monitor. Will show update tasks status. Very useful to determine why an

       update failed.

S001 ABAP Development Workbench

SE01 Old Transport & Corrections screen

SE10 New Transport & Correction screen

SE09 Workbench Organizer

SE16 Data Browser: Initial Screen.

SE30 ABAP/4 Runtime Analysis

SE36 ABAP/4: Logical Databases

SE37 ABAP/4 Function Modules

SE38 ABAP Editor

SE39 Splitscreen Editor: Program Compare

SE41 Menu Painter

SE51 Screen Painter: Initial Screen.

SE71 SAPscript layout set

SE80 ABAP/4 Development Workbench Object Browser

SM12 Lock table entries (unlock locked tables)

SM21 View the system log, very useful when you get a short dump. Provides much http://abap-
tutorials.com 2010

more info than short dump
SM35 View Batch Input Sessions

SQ00 ABAP/4 Query: Start Queries

BDC

1

What should be the approach for writing a BDC program?

Ans.: 1. Analysis the Data.   2. Generate SAP structure.      3. Develop transfer program

4. Create sequential file. 5. Create batch input program. 6. Process batch input data

2 What is the alternative to batch input session?

Ans. : Call transaction & call dialog

What are the steps in a BDC session ?

The first step in a BDC session is to identify the screens of the transaction that the program

will process. Next step is to write a program to build the BDC table that will be used to

submit the data to SAP. The final step is to submit the BDC table to the system in the batch

mode or as a single transaction by the CALL TRANSACTION command.

3 What are the problems in processing batch input sessions? How is batch input

process different from processing on line?

Ans.: Sessions cannot be run in parallel and not fast.

4 What do you do when the system crashes in the middle of a BDC batch session?

-Check no. of records already updated and delete them from input file and run BDC again.

5 What do you do with errors in BDC batch session?

-Analysis and correct input file format and entries in internal table BDCDATA.

6 WHAT are the commands that allow you to process sequential file? And what is their

syntax?

Ans :-http://abap-tutorials.com 2010
                                                                   <binary text > mode at

POSITION <position> MESSAGE <field>

            ASET <dataset name > INTO <field>




TRANSFER <field> to <dataset name>

7 What is the process for transferring data from legacy system to SAP?

Ans :- FTP file transfer, Manufacturer –specific field transfer NFS(network file system)/BDC.

8 Explain the process to transfer a record to a dataset?

Ans :- TRANSFER <field> to <dataset name>.

9 Why batch input?

Ans :- To input a large amount of information at off peak times.

10 Can data be put directly into the database?

Ans :- No, only after the data has been entered via transaction.

11 Explain at high level, the batch input process?

Ans :- Batch data is placed into queues called batch input sessions , then placed into the

application programs for maintenance into the database.

12 What are the function modules associated with batch input?

Ans :- BDC_OPEN_GROUP , BDC_CLOSE_GROUP , BDC_INSERT

13 What is the structure of the BDC table?

Ans :- Program/Dynpro/start/field name/ field content.

14 Write out a coding example for filling a BDC Table.

Ans :- http://abap-tutorials.com 2010

FORM <NAME>

REFEESH <bdc table>
CLEAR <bdc table>

MOVE <program name > to <bdc table>-PROGRAM

<number1> TO <bdc table>-DYNPRO

„X‟ TO <bdc table>-DYNBEGIN

 APPEND <bdc table>

CLEAR <bdc table>

MOVE: <field1> TO <bdc table>-FNAM

<field2> TO <bdc table>-FVAL

 APPEND <bdc table>

15 How do you find the transaction number, program number and field names?

Ans :-

                         ram no. – System -> status

Field names - F1, Technical help

16 What are the processing modes for Batch Input?

Ans :- Process on screen(foreground) , Display errors only and process in the background

17 What are the available OK Codes that can be utilized during batch input processing?

Ans :-

    – terminates current batch input transaction and marks as incorrect.

          – delete current batch input transaction from session.

           – terminate batch input processing and mark session as incorrect.

          – change display mode to process the session on screen instead of displaying only

errors.

/bde – change display mode to display only errors instead of processing the session on the

screen.

18 What is the effect of the BDC_CURSOR field name in the BDC table?
Ans :- You can set the cursor and enter as a corresponding field value the name of the field

on which the cursor is to be positioned .

19 How many types of BDCs you have done?http://abap-tutorials.com 2010

21 Why you choose Call transaction and/or session method?

Call transaction is mainly used when you want to update the database using a single

transaction , you can also update the database in asynchronous mode, where as session is

used to perform huge database updations using more than one transaction and which will

last for a long time.

22 How you trap errors in call Transaction

Errors while updating the database using call transaction technique are trapped using a

structure bdcmsgcall, whose field msgtyp become „e‟ when an error record is encountered.

Those records are formatted using format_message function call in the desired format and

stored in an internal table for listing of all error records in one shot.

23 What are different types of Update modes

In BDC‟s we have two types of updation modes – 1) Synchronous 2) Asynchronous

24 What is main difference between session method and LSMW

In the context of session method,

the method of updating is “Batch Input” ,

we require a program to be coded,

But in the context of LSMW method,

The methods of updating

using “Batch Input/Direction Input”

from an IDOC,

from a BAPI structure.

No source code is required, the complete operation is performed in 16 steps
sequence

25 What is main difference between CATT and LSMW

Using LSMW you can update any kind of data but no changes to database are allowed,

where as CATT tool can update only master data, which also allows changes to the

master data and also a significant testing of data is possible

26 What is BDC and How you use it?http://abap-tutorials.com 2010

BC Basis Components--ABAP workbench--BC Basis Programming interfaces--Data

transfer

During data transfer, data is transferred from an external system into the SAP R/3

System. •Transfer data from an external system into an R/3 System as it is installed.

•Transfer data regularly from an external system into an R/3 System.

Example: If data for some departments in your company is input using a system other than

the R/3 System, you can still integrate this data in the R/3 System. To do this, you export the

data from the external system and use a data transfer method to import it into the R/3

System.

Batch input with batch input sessions : Data consistency check with the help of screen logic.

With the batch input method, an ABAP program reads the external data that is to be entered

in the R/3 System and stores the data in a "batch input session". The session records the

actions that are required to transfer data into the system using normal SAP transactions.

When the program has generated the session, you can run the session to execute the SAP

transactions in it. You can explicitly start and monitor a session with the batch input

management function (by choosing System ® Services ® Batch input), or have the session

run in the background processing system.

Use the BDC_OPEN_GROUP function module to create a new session. Once you have

created a session, then you can insert batch input data into it with BDC_INSERT. Use the
BDC_INSERT function module to add a transaction to a batch input session. Use the

BDC_CLOSE_GROUP function module to close a session after you have inserted all of your

batch input data into it.

What is Dataset and how you use it?

ABAP/4 provides three statements for handling files:

The OPEN DATASET statement opens a file.

The CLOSE DATASET statement closes a file.

The DELETE DATASET statement deletes a file. http://abap-tutorials.com 2010

To open a file for read access, use the FOR INPUT option of the OPEN DATASET statement

To open a file for write access, use the FOR OUTPUT option of the OPEN DATASET

statement

To open a file for appending data to the file, use the FOR APPENDING option of the OPEN

DATASET statement

To process a file in binary mode, use the IN BINARY MODE option of the OPEN DATASET

statement

To process a file in text mode, use the IN TEXT MODE option of the OPEN DATASET

statement

To open a file at a specific position, use the AT POSITION option of the OPEN DATASET

statement

When you work with the operating systems UNIX or WINDOWS NT, you can send an

operating system command with the statement OPEN DATASET. To do so, use the option

FILTER

To receive the operating system message after trying to open a file, use the MESSAGE

option of the OPEN DATASET statement

To close a file on the application server, use the CLOSE DATASET statement
To delete a file on the application server, use the DELETE DATASET statement

To write data to a file on the application server, use the TRANSFER statement http://abap-tutorials.com
2010

To read data from a file on the application server, use the READ DATASET statement.

36 Give real time work done by u in BDC ? Transactions used ? parameters passed with

functions.

37 will ask u for screen no's and dynpro names for BDC that u say u have done.

39 Which technical field in the BDCDATA table holds the last cursor position?

41 What is true about the LSMW: (choose correct option/s)

     t of the SAP system



                               y target field

44 How do you read a LOCAL sequential file?

45    How do you write a sequential file?

46 How do you send the BDCDATA table in a Call Transaction statement?http://abap-tutorials.com 2010

47 What loop do you code for a READ DATASET statement?

51 What are the steps in a BDC session ?

The first step in a BDC session is to identify the screens of the transaction that the program

will process. Next step is to write a program to build the BDC table that will be used to

submit the data to SAP. The final step is to submit the BDC table to the system in the batch

mode or as a single transaction by the CALL TRANSACTION command.

52 How do you find the information on the current screen ?

- The information on the current screen can be found by System Status command

from any menu.

53 How do you save data in BDC tables ?

- The data in BDC tables is saved by using the field name „BDC_OKCODE‟ and field
value of „/11‟

54 What is the last entry in all BDC tables ?

- In all BDC tables, the last entry is to save the data by using the field name

BDC_OKCODE and a field value of „/11‟.

55 What is a multiple line field ?

- A multiple line field is a special kind of field which allows the user to enter multiple

lines of data into it.

56 How do you populate data into a multiple line field ?

- To populate data into a multiple line field, an index is added to the field name to

indicate which line is to be populated by the BDC session (Line index ).

57 Write the BDC table structure.

- BDC table structurehttp://abap-tutorials.com 2010

FIELD TYPE DESCRIPTION

Program CHAR(8) Program name of transaction

DynPro CHAR(4) Screen number of transaction

DynBegin CHAR(1) Indicator for new screen

Fnam CHAR(35) Name of database field from

Screen

Fval CHAR(80) Value to submit to field

58 Does the CALL TRANSACTION method allow multiple transactions to be processed by

SAP ?

- No. The CALL TRANSACTION method allows only a single transaction to be

processed by SAP.

59 Does the BDC_INSERT function allow multiple transactions to be processed by SAP ?

- Yes.
60 What is the syntax for „CALL TRANSACTION‟ ?

- CALL TRANSACTION trans [ using bdctab MODE mode ].

Three possible entries are there for MODE.

A - show all screens

E - show only screens with errors

N - show no screens

Which mode of „CALL TRANSACTION‟ method allows background processing ?

- N is the only mode that allows background processing.

61 Is it possible to use „CALL TRANSACTION‟ without a BDC table ?

- Yes, it is possible to use „CALL TRANSACTION‟ without a BDC table. In such case,

the current program is suspended, the transaction specified is brought up, and a user http://abap-
tutorials.com 2010

must enter the data into the screens.

62 What is TCODE ?

- TCODE is the transaction code for the transaction that should be used to process the

data in the BDC table being inserted.

63 What are the function modules that need to be called from BDC program to submit the

transactions for processing ?

- BDC_OPEN_GROUP

- BDC_INSERT

- BDC_CLOSE_GROUP

64 How many sessions will be opened using BDC_OPEN_GROUP ?

- Only one session can be created using the BDC_OPEN_GROUP functon.

65 What is „BATCH INPUT‟ or „BDC‟ ?

- The SAP system offers two primary methods (BDC SESSION METHOD, CALL

TRANSACTION METHOD) for transferring data into the system from other systems
and Non-SAP systems. These two methods are collectively called as „BATCH

INPUT‟ or „Batch Data Communication‟ (BDC).

66 What are the advantages in Batch Input ?

- The Batch Input ensures Data integrity.

No manual interaction is required during Data transfer.

67 What is the functionality of „Classical Batch Input‟ ?

In „Classical Batch Input‟ an ABAP/4 program reads the external data that is to be entered in

the SAP system and stores the data in a Batch Input session. This session stores the

actions that are required to enter your data using normal SAP transactions.

68 Which Function Modules are used in „Classical Batch Input‟ ?

- BDC_OPEN_GROUP , BDC_INSERT, BDC_CLOSE_GROUP.

69 What is Synchronous Database update ?

- During the processing no transaction is stored until the previous transaction has

been written to the Database. This is called Synchronous Database update.

70 What are the differences between CALL TRANSACTION and BATCH INPUT SESSION ?

- The most important aspects of the batch session interface are:http://abap-tutorials.com 2010

- Asynchronous processing

- Transfers data for multiple transactions

- Synchronous database update

During processing, no transaction is started until the previous transaction has been

written to the database.

- A batch input processing log is generated for each session

- Sessions cannot be generated in parallel

The most important aspects of the CALL TRANSACTION USING interface are:

- Synchronous processing
- Transfers data for a single transaction

- Synchronous and asynchronous database updating both possible

The program specifies which kind of updating is desired.

- Separate LUW for the transaction

The system performs a database commit immediately before and after the CALL

TRANSACTION USING statement.

- No batch input processing log is generated

71 What are the types of Batch Input ?

- Classical Batch Input

- Call Transaction

- Call Dialog

72 What is BDC_OKCODE ?

- The command field is identified by a special name in batch input called

BDC_OKCODE. This name is constant and always identifies the command field.

73 How can we execute a function in a BDC session ?

- We can execute a function in a transaction by entering the function code or function

key number in the command field of an SAP session. A function key number must be

prefixed with the / (slash) character. A function code must be prefixed with the = http://abap-
tutorials.com 2010

character.

- Example:

BDCDATA-FNAM = 'BDC_OKCODE'

BDCDATA-FVAL = '=UPDA'

74 How can we position the cursor on a particular field ?

- BDCDATA-FNAM = „BDC_CURSOR‟

BDCDATA-FVAL = <FIELDNAME>
75 Who are Dialog users and who are Background users ?

- Dialog users are normal interactive users in the SAP system. Background users are

user master records that are specially defined for providing authorizations for

background processing jobs.

76 What is the use of BDC_INSERT ?

- We add a transaction to a Batch Input Session by using this function.

77 What are the update modes in CALL TRANSACTION ?

- S : Synchronous

- A : Asynchrnous

- L : Local

78 What does the message parameter indicates ?

- The message parameter indicates there all system messages issued during a CALL

TRANSACTION are written into the internal table <itab>. The internal table must

have the structure of BDCMSGCOLL.

79 What is Direct Input ?

- To enhance the batch input procedure, the system offers the direct input technique

especially for transferring large amount of data. This technique doesn‟t create

sessions but stores the data directly. The direct input programs must be executed in

the back ground only. To maintain and start these programs, use program

RBMVSHOW or the transaction BMVO.http://abap-tutorials.com 2010

80 What are the features of Recording Function ?

- recording transaction runs

- creating batch input sessions from the recorded transaction runs.

- Generating a batch input program from the recorded data.

81 What is synchrnous database update ?
- During the processing, no transaction is stored until the previous transaction has

been written to the database. This is called Synchronous database update.

82 How do you set up batch process?

Data analysis: Analyze the data that is to be transferred to the SAP System.

||

Generate SAP structures: Generate SAP data structures for incorporation into your data

export program.

||

Develop transfer program: You can write the program in ABAP/4 or as an external program.

||

Create sequential file: Export the data that is to be transferred, to a sequential file.

||

Create batch input program: ABAP/4 batch input program that will read the data to be

transferred from the sequential file.

||

Process batch input data: Process the data and add it to the SAP System. You can do this

either by:

batch-input session method or Call transaction method.

||

Analyse results: Check that all data has been successfully processed.

||

Analyse Error session: Correct and re-process erroneous data.

83 Where do you use BDC?

 transferring data from another system when you install your SAP Systemhttp://abap-tutorials.com
2010

                                                        -SAP system in your company into
the SAP System. Assume, for example, that data collection in some areas of your

company is still performed by a non-SAP system. You can still consolidate all of your

data in the SAP System by exporting the data from the other system and reading it into

the SAP System with batch input.

You can also use batch input to transfer data between two R/3 Systems. However, there are

more direct methods for doing this, such as RFC (remote function calls).

84 What has to be done to the packed fields before submitting to a BDC session?

Declare these fields in the internal table as characters and the length of the field should be

same as the field length of the field's data element. This internal table is used to hold the data

fetched from the sequential file using WS-upload function module

What is LSMW

The LSMW is a cross-application component (CA) of the SAP R/3 System.

The tool has interfaces with the Data Transfer Center and with batch input and direct input

processing as well as standard interfaces BAPI and IDoc in R/3.

The LSMW comprises the following main functions:

1. Read data (legacy data in spreadsheet tables and/or sequential files).

Function Read data replaces and enhances functions Spreadsheet interface and

Host interface of LSMW version 1.0. You can use any combination out of PC and

server files now.

2. Convert data (from the source into the target format).

3. Import data (to the database used by the R/3 application).

TCODE - LSMW

SAP Scripts

What is sap script and layout set?

Ans - SAPscript is the integrated text management system of the SAP R/3 System. SAPscript is tightly
integrated into the SAP
System. It is used for many different word-processing tasks all over the SAP System.http://abap-
tutorials.com 2010

What is layout set?

A layout set in SAPscript is used for page layout. The layout set contains various elements, which are
used for layout control of

the individual pages and also contain layout information for texts which are to be output on the
individual pages.

The layot of a document is defined in a layot set.

A layout set specified the appearance and structure of a document.

Layout sets contain predefined text modules with space reserved for variable data. You can use these
text modules for different

application.

Every SAPscript document uses a layout set.

To make changes to your documents, such as moving a piece of text, or changing fonts, paragraph
formats, and tabs, you only

need to change the layout set.

There are two ways of formatting texts using layout sets:

The text is entered and output in standard text maintenance. You can assign any layout set. Text can
also be entered via

the layout set a letter header, for example.

The text is formatted via an ABAP/4 program using a layout set. The program can either dynamically
output individual

predefined text modules, text elements or transfer entire texts, which are to be output in the layout set.

You can use Styles to define the formatting of the text in your documents. A style

determines text formatting by setting the paragraph and character formats used in a

document. You can, for example, use a style to highlight character strings or whole

paragraphs. You can assign a style to any text. Typically, however, you‟ll use styles

primarily in the main windows of layout sets, where users type or enter text directly
in documents.

Header data is found in both style and layout set maintenance.http://abap-tutorials.com 2010

In style maintenance, it is used primarily to present important information - designed to make it easier
for the end user to

select a style. The header data in layout set maintenance, on the other hand, is used for information
and control purposes.

Windows are defined in layout set maintenance. They represent areas

which are positioned on pages as page windows and in which text is

later output. At least one window must be defined for each layout set. If

not, a text cannot be formatted by SAP script.

The following window types can be used:

MAIN – Main window in which continuous text is output. This is the window used by dialog users of a
print program and

layout set. For example the body text of a letter would be entered in MAIN.

VAR – Window with variable contents. The text can vary on each page in which the window is
positioned. Variable windows

are formatted for each page.

CONST – Window with constant contents which is only formatted once.

A layout set has the following elements:

Header data - Data related to development (created by, development class, etc.) and layout set
information (which elements

are used) are both stored in the header data. A start page must be entered here.

Paragraph formats - Paragraph formats are required in layout sets - as in styles - in order to format
texts. However, they are

also used for word processing in layout sets, for example, to format text elements.

Character formats - You can also use character formats to format texts or paragraphs. Unlike paragraph
formats, however,

they are used to format text within a paragraph.http://abap-tutorials.com 2010
Windows - Windows are names and window types, which are not physically positioned until they are
allocated to

pages and units of measurement are specified.

Pages - Pages are defined to provide the system with a start and end point in text formatting.

Page windows - Page windows are the combination of windows and pages, where the dimensions of a
window and its

position on a page are specified.

The purpose of SAP script control commands is to allow control of the

output formatting. These commands are not interpreted by the SAPscript

editor, but are passed through to the SAPscript Composer for processing. The

composer is the program that converts text from the form displayed in the editor to

the form used for printing.

What is SAPscript and explain its purpose?

SAP Script is the SAP system‟s own text-proessing system. You‟ll find that it looks and feels a lot like
other leading textprocessing system that you may use on your personal computer.

Every company needs to output documents with a uniformly defined layout (eg. Invoices, delivery notes,
etc..) all the time.

The basic layout of the document is pre-defined , but in many cases, other data has to be merged with
it, such as address

data or purchase order items. This data might be entered manually by a employee, or retrieved from a
database table.

Large quantities of these documents have to be produced. From printing is usually a mattter of large
print runs of documents

such as payslips, checks, order confirmation, reminders etc.

SAPscript has been developed to meet the above requirements. IT is an integrated tool for text entry
and form printing in R/3

applications.http://abap-tutorials.com 2010

These documents are normally provided by SAP but every organization have their unique waqys of these
documents so to
customize these and for creating newer ones if required; SAP script is used.

What are components of SAPscript?

Layout set, SAPscript Text, ABAP Print program , symbols, function modules like open_form, close_From,

Read_text etc,.

What are the ABAP/4 Commands that link to a layout set?

Call function OPEN-form.

Call function WRITE-from.

Call function CLOSE-from

Importing Graphics (Logos) into SAPScript

The program RSTXLDMC can be used to upload graphics (file extension .tif on PC files) into individual
standard text.

Other useful programs for SAPScript

RSTXFCON - Converts page format

RSTXSCRP - Upload/Download layout sets

RSTXDBUG - SAPScript debugger

Debug SAPScript

You can debug a SAPScript: Use Tools - Word Processing - Layout Set.

Enter name of layout set and then Utilities - Activate Debugger.

It is of no consequence which layout set you enter when selecting the SAPscript debugger. (Menu path:
Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the
debugger. This is quite handy when

verifying which layoutset is being called (Verifying customizing settings).http://abap-tutorials.com 2010

Another way to set the SAPScript debugger is to run program RSTXDBUG.

When a Form is copied from one client to another .And If U try to display or change the form in the
copied client .The possible

error message cud be :

1.Form not found
Try coping again specifing the language .

2.IF IT dispalys an error message saying That the text file is inconsistent .

Then go to SE38 and Run “RSTXCHKO” .

It will ask for the form name ,then check all the checkboxes and then run the program.

Note : all Script related problems can be solved using Program „RSTX*‟.

How to take a back up of script layout into U‟r hard disk and load it later

Use Program RSTXSCRP.

Use EXPORT mode, when downloading and IMPORT when uploading a script. Don‟t forget to give the
form name in the

object field. This will create a script with the same name as that of the original script . If a script with the
same name exists

in the same client ,then it will give an error „Object cannot be overwritten ‟ .

I want to copy table across clients

Use Program RSCLTCOP

To transfer script files across systems (Not Clients) - RSTXSCRP

To compare the contents of a table across clients: RSTBSERV

To change the development class of any object - RSWBO052

What type of variables normally used in sap script to output data?http://abap-tutorials.com 2010

&Tables name- fields&.

How do you number pages in sap script layout outputs?

& page &

&next Page &

What takes most time in SAP script programming?

Defining layout set up / sets.

How do you use tab sets in layout sets?

Define paragraph with defined tabs.
How do you backup sap script layout sets? Can you download and upload? How?

SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Give source form name,
source client (000

default), Target form name.

Download :- SE71, type form name -> Display -> Utilities -> form info -> List -> Save to PC file.

Upload :- Create form with page, window, pagewindow with the help of downloaded PC file. Text
elements for Page windows

to be copied from PC file.

What is Compare Tool in SAP Script ?

SAP Script offers tools for comparing objects across clients. We can compare or copy the following kinds
of objects.

Styles

Layout sets

Documents

With the Compare tool we can do the following :

Check whether an object exists in both clients

Display the differences between the versions of an objecthttp://abap-tutorials.com 2010

Layout Sets are used to control page layout and text formatting in documents .

SAP Standard styles and layout sets are always held in Client 000.

In what format does SAP Script store text ?

SAPscript texts are stored in Interchange Text Format (ITF). SAPscript offers conversion programs for
the text file formats

Rich Text Format (RTF) and ASCII as an interface to other word processors.

The various window types in SAP Script are

Main, Variable and Constant.

The New-Page command is used to force a Page break in the text at any point.

Protect ... Endprotect command pairs can be nested (True / False).
False.

Delimiter & must be used immediately before and after the symbol.

What does the composer do?

The final appearance of your documednt depends on interaction between the print program and the
layout set.

The SAPscript print program initializes the printing process. Every command entered using the SAPscript
programming

interfaces is transferred to the composer.http://abap-tutorials.com 2010

The composer received layout information from the layout set specified by the print program. The
documents are formatted

according to this layout information.

If the documents contain variables, the compoer replaces these variables with data from the R/3
system, such as the current

date, or with the userdata selected by the print program.

The print program controls the completion of thelayout set. Once this is done, the composer places the
completed document

in the spool.

Where do we define Tab space for data in SAPScript?

When defining the paragraph for the text element we can define the TABS then. There is parameter
called TABS to be

defined in paragraph definition.

what is difference between Window & a Page Window?

Window: An area that is predefined in the layout set. Windows are text modules, which are positioned
on a document page.

We define the window type, Default Paragraph, specify the text elements or a SAPscript text to be
included etc in the

Windcow Component.

PageWindow: we define the parameters of the earlier defined Window, appearance on the document
like left or right margins,
Width & Height.

What are symboles & state their different types with E.g.

A Symbol is a constant, which can be inserted in a document. It saves the user unnecessary work when
replacing sections of

text, phrases, etc. Each symbol has a name which is encloses by &.http://abap-tutorials.com 2010

Eg. &variable name &

System symbols eg &Date&, &time& etc.

Standard symbols :Standard symbols are user-defined. They are maintained centrally in table TTDTG.
Eg. &SGDH& for the

opening salutation : “dear sir/madam”.

&MFG& for the closing salutation :”yours Faithfully”.

Program Symbols : Program symbols display data from the ABAP/4 program which has called the word
processing function

Eg. Itab-connid.

Text symbols: You can define a text symbol for any text module. This symbol is valid only in the text
module for which you

have defined it. Eg. Define &Symbol& = „value‟.

How do we define Text symbols?

Using the control command DEFINE &x1& = „56‟.

State few control commands?.

Protect .. endprotect, define, new-page, include.. if… endif.

what is the purpose of “Protect and EndProtect”?.

You can specify either in the style or in the layout set that a particular paragraph should not be slit in
two by a page beak. If

the page protect attribute is set then the complete paragraph is always output ona single page. This
property applies only to

that particular paragraph. SAPScript provides the PROTECT… ENDPROTECT command pair to allow you
to define the
areas to be protected against a page beak on an individual basis. Thus the PROTECT/ENDPROTECT
commands may be

regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines
enclosed between the

two commands fit in the space remaining in the current main window.http://abap-tutorials.com 2010

How do we set the date, time format?

SET TIME MASK : CONROLS THE TIME FIELD FORMAT.

SET DATE MASK : CONTRLS THE DATE FIELD FORMAT.

EG. Set Time Mask = “ HH:MM:SS”.

what is the role of an ABAP progrm in SAPScript?

Retrieves R/3 application data from the database.

Defines the layout set processing logic ( The order and repetition of text elements).

Chooses a layout set for printing.

Selects the output device, such as printer,monitor, or fax.

Sets print attributes such as immediate output, number of copies ,and pages to beprinted.

How to reuse some components of the script layout to other program?

Is this script layout is standard for all the printer? If not then y we are going for script layout?

Give me couple of methods that I will take standard script layout printout for different printer.

How u will analysis script program? ( which goes to main and how many windows etc….)http://abap-
tutorials.com 2010

Can V inserted logo on your program?. Give me the program name which uploads my logo and syntax
for logo

inserting in sap script.

Yes u can insert a logo on your script layout.

Use this Report “RSTXLDMC” which will uploads the logo.

Use the following statement which includes the logo on your script prog.

/: INCLUDE 'ZHEX-MACRO-XXX' OBJECT TEXT ID ST LANGUAGE 'E'.
XXX – object name, u will gives @ runtime in rstxldmc program.

Give me syntax for box command.

BOX XPOS 2 MM WIDTH 0 CM HEIGHT '9.5' CM FRAME 10 TW

Script Commands.

Defining a variable

DEFINE &CUST& = '00000021'.

Define and insert a standard text:

Standard texts is predifined textst that can be used in more than one form. Standard texts are can be
created, changed and

displayed using transaction SO10.

The text ID is used to callsify texts.

To include a stadard text in a form, use the INCLUDE command:

/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVDhttp://abap-tutorials.com 2010

When formatting the standard text the PARAGRAPH parameter is used. To center the text use:

/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD LANGUAGE EN PARAGRAPH C.

Formatting addresses

The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the
recipient's country, as

defined in the

country parameter.

ADDRESS DELIVERY PARAGRAPH AD

NAME          &KNA1-NAME&

STREET      &KNA1-STRAS&

POSTCODE         &KNA1-PSTLZ&

CITY      &KNA1-ORT01&'

COUNTRY &KNA1-LAND1&
FROMCOUNTRY 'DE'

ENDADDRESS

Avoiding pagebreaks in a paragraph

/: PROTECT

:

:

/: ENDPROTECThttp://abap-tutorials.com 2010

The text lines to be protected are enclosed between the two commands

Conditonal text ouput IF - ENDIF

You can use IF/ENDIF like in a normal ABAP program

/: IF condition

:

:

/: ENDIF

and

/: IF condition

:

/: ELSE

:

/: ENDIF

Example:

/: IF &SPFLI-CITYTO& = "BERLIN"

put some text here .....

/: ENDIFhttp://abap-tutorials.com 2010

Symbols and Control commands
Symbols are placeholders for values that are inserted during print formatting.

Symbols are indentified by name surrounded by "&" and are not case sensitive

Types of symbols

System symbols

DATE Date

DAY Day

NAME_OF_DAY Name of day

MONTH Month

YEAR Year

TIME Time

HOURS Hours

MINUTES Minutes

SECONDS Seconds

PAGE Page number

NEXTPAGE Number of next pagre

DEVICE Output device

SPACE Blank space

ULINE Underlinehttp://abap-tutorials.com 2010

VLINE Vertical line

Standard symbols

Standard symbols are user defined and are maintained in table TTDG(table is not available???). You use
transaction SM30

to change or display standard symbols.

An examples of standard symbols is &MFG& fot "Yours faithfully"

Standard text
Standard texts is predifined texts that can be used in more than one form. Standard texts are can be
created, changed and

displayed using transaction SO10.

The text ID is used to classify texts.

To include a standard text in a form, use the INCLUDE command:

/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD

When formatting the standard text the PARAGRAPH parameter is used. To center the text use:

/: INCLUDE <name> <Parameter>

<parameter> = Object, ID, Language, Paragraphhttp://abap-tutorials.com 2010

Example:

/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD LANGUAGE EN PARAGRAPH C.

Name: Z_BC460_EX4_HF

Object: Text

Text id: SDVD (Text id from SO10)

Language: EN

Paragraph: C (Centered)

Tip: You can use menu Insert->Text->Standard to make it easier to insert the text

Program symbols

Program symbols are for contents of database fields or global program symbols. When you print the
form, data from the

database tables are printed isntead of the symbols.

In the print program:

TABLES: kna1.

In the form:http://abap-tutorials.com 2010

&KNA1-NAME1&

Formatting
&SYMBOL& No formatting

&SYMBOL+4& Offset - Output begins here. Offset refers to formatted value

&SYMBOL(5)& Length - Output data in the specified length

&SYMBOL(I)& Suppress initial value - If the field has been initialized, nothing is output

&SYMBOL(Z)& Suppress leading zeros

&SYMBOL(C)& Compress blank spaces - Consecutice spaces are compressed into a single space. Leading
spacesare

suppressed.

&SYMBOL(R)& Right align output

&SYMBOL(S)& Operators are suppressed

&SYMBOL(*)& Dictionary length - The data length is defined by the ABAP dictionary

&SYMBOL(8.2)& Decimal format. Length 8 decimals 2

&'text1'SYMBOL'text2'& Text can be inserted before and after the symbol

Control commands

Control command are used to modify text output. Use format key /: in the format column.

/: INCLUDE

/: DEFINE

/: ADDRESS....ENDADDRESS

/: PROTECT.....ENDPROTECThttp://abap-tutorials.com 2010

/: NEW-PAGE

/: IF....ENDIF

/: CASE...ENDCASE

Examples of control commands

INCLUDE

INCLUDE name <parameter>

Parameters:
OBJECT E.g. TEXT, DOKU (Document), DSYS (Hypertext).

ID Text ID -Text ID is a way to group texts - Se transaction SO10

LANGUAGE If the parameter is not specefied, the logon language will be used

PARAGRAPH The text to be included is formatted using the style allocated. The PARAGRAPH parameter
can be used to

redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text
will then be formatted

using the paragraph specified here.

Object

ID

Language

Paragraph

Standard texts are maintained in transaction SO10.

Example 1:

You have created a standard text in SO10 Named MYTEXT and with Text Id SThttp://abap-tutorials.com
2010

/: INCLUDE MYTEXT OBJECT text ID st

Example 2:

You can also use a dynamic name so that you can retreive a ext depeding of the name variable:

/: INCLUDE &SCUSTOM-NAME& text ID st.

Depending on the name in the variable &SCUSTOM-NAME& different texts will be shown. Note that a
text with the name in

the variable &SCUSTOM-NAME& name must be created in SO10.

DEFINE

/: DEFINE &SYMBOL& = 'String1 String2'

/: DEFINE &CUST& = '00000021'.

ADDRESS-ENDDRESS
The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the
recipient's country, as

defined in the

country parameter.

/: ADDRESS DELIVERY PARAGRAPH AD

/: NAME &KNA1-NAME&

/: STREET &KNA1-STRAS&http://abap-tutorials.com 2010

/: POSTCODE &KNA1-PSTLZ&

/: CITY &KNA1-ORT01&

/: COUNTRY &KNA1-LAND1&

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

Time Date and decimal format

Examples:

/: SET TIME MASK = 'HH:MM'

/: SET DATE MASK = 'DD.MMMM.YYYY'

/: SET COUNTRY 'USA'

Frames, lines and shading

BOX

Draws a box

Syntax:

/: BOX <xpos> <ypos> <width> <height> <frame> <intensity>

The intensity is the grey scale of the box as %. The frame parameters is the thickness of the frame.
Default is 0.

Each of the paramteters ypos, xpos, width, height and frame muts be followed of the measurement
unit:http://abap-tutorials.com 2010

TW (twip)
PT (point)

IN (inch)

MM (millimeter)

CM (centimeter)

LN (line)

CH (character).

Examples:

/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW

/: BOX FRAME 10 TW

Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).

/: BOX INTENSITY 10

Fills the window background with shading having a gray scale of 10 %.

/: BOX HEIGHT 0 TW FRAME 10 TW

Draws a horizontal line across the complete top edge of the window.

/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line along the complete height of the left hand edge of the window.

/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15http://abap-tutorials.com 2010

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a table of three columns with a highlighted heading
section.

POSITION and SIZE

You can use the POSITION and SIZE commands to set default parmeters for a box. This can be usefull if
you have several

boxes that share the same parameters.
Example:

/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM

/: SIZE HEIGHT '2' MM WIDTH '76' MM

/: BOX FRAME 10 TW INTENSITY 10

If you want to set the position realtively to the window use POSITION WINDOW to set the position to
the top/left start of the

window. Then use POSITION to set the current position relatively to the start of the Window. Note that

you uses "+" or "-" in the ORIGIN position to the set the position relatively.

/: POSITION WINDOW

/: POSITION XORIGIN '+5' MM YORIGIN '+10' MMhttp://abap-tutorials.com 2010

the position is now 5 MM from the left and 10 MM from the top of the window.

NOTE: After using the position command you can move the current position realtively to the last used
position

/: POSITION XORIGIN '+10' MM YORIGIN '+20' MM

Now the position will be X = 15 and Y = 30

Drawing a line

You can draw a line by setting the Height or Width of a box to 0 and add a frame. E.g. a horizontal line:

/: SIZE HEIGHT '0' MM WIDTH '200' MM

/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100

Window and Page

WINDOW sets the values for the width and height to the values of the current window (default setting).

PAGE Sets the values for the width and height to the values of the current output page.

Examples:

/: SIZE WINDOW

Sets WIDTH and HEIGHT to the current window dimensions.

/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.http://abap-tutorials.com 2010

/: POSITION WINDOW

/: POSITION XORIGIN -20 TW YORIGIN -20 TW

/: SIZE WIDTH +40 TW HEIGHT +40 TW

/: BOX FRAME 10 TW

A frame is added to the current window. The edges of the frame extend beyond the edges of the
window itself, so as to avoid

obscuring the leading and trailing text characters.

61. Calling a form from SapScript (*****)

/:DEFINE &CUST& = '00000021'.

/:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF

/: USING &CUST&

/: CHANGING &NAME&

/:ENDPERFORM.

Dear &NAME&

The ABAP routine could be defined as follows:

IMPORTANT: The structure itcsy must be used for the parameters.

REPORT Z_HENRIKF_SCRIPT_FORM .

tables scustom.

form get_name tables in_tab structure itcsy

out_tab structure itcsy.http://abap-tutorials.com 2010

read table in_tab index 1.

select single * from scustom

where id = in_tab-value.

if sy-subrc = 0.

read table out_tab index 1.
move scustom-name to out_tab-value.

modify out_tab index sy-tabix.

else.

read table out_tab index 1.

move 'No name' to out_tab-value.

modify out_tab index sy-tabix.

endif.

** You could also fill the ouput parameter table this way

READ TABLE out_par WITH KEY 'NAME1'.

out_par-value = l_name1.

MODIFY out_par INDEX sy-tabix.http://abap-tutorials.com 2010

endform.

Note that if you use more than one parameter you must use Using or Changing before every parameter
!

/: PERFORM <form> IN PROGRAM <prog>

/: USING &INVAR1&

/: USING &INVAR2&

......

/: CHANGING &OUTVAR1&

/: CHANGING &OUTVAR2&

......

/: ENDPERFORM

62. Structure of a print program

The print program is used to print forms. The program retieves the necesary data from datbase tables,
defines the order of in

which text elements are printed, chooses a form for printing and selects an output device and print
options.
Open form printing - Must be called before working with any of the other form function modules.

call function 'OPEN_FORM'.....

Must be ended with function module CLOSE FORM

*To begin several indentical forms containing different data within a single spool request, begin each
form using

START_FORM, and end it using END_FORM

call funtion 'START_FORM'.....http://abap-tutorials.com 2010

Write text elements to a window of the form

call function 'WRITE_FORM'.....

Ends form

call funtion 'END_FORM'.....

Closes form printing

call function 'CLOSE_FORM'....

Examples of function calls

OPEN FORM

CALL FUNCTION 'OPEN_FORM'

EXPORTING

*     APPLICATION              = 'TX'

*     ARCHIVE_INDEX            =

*     ARCHIVE_PARAMS           =

DEVICE                 = 'PRINTER'

DIALOG                 = 'X'

*     FORM                     =''

*     LANGUAGE                 = SY-LANGU

OPTIONS                = OPTIONShttp://abap-tutorials.com 2010

*     MAIL_SENDER              =
*      MAIL_RECIPIENT              =

*      MAIL_APPL_OBJECT                =

*      RAW_DATA_INTERFACE                  = '*'

IMPORTING

*      LANGUAGE                =

*      NEW_ARCHIVE_PARAMS                   =

*      RESULT             =

EXCEPTIONS

CANCELED            =1

DEVICE            =2

FORM              =3

OPTIONS            =4

UNCLOSED            =5

MAIL_OPTIONS            =6

ARCHIVE_ERROR             =7

INVALID_FAX_NUMBER              =8

MORE_PARAMS_NEEDED_IN_BATCH = 9

OTHERS             = 10

.

START_FORM

CALL FUNCTION 'START_FORM'

EXPORTING

*      ARCHIVE_INDEX =

FORM              = 'MY_FORM'http://abap-tutorials.com 2010

*      LANGUAGE           =''
*      STARTPAGE             =''

*      PROGRAM               =''

MAIL_APPL_OBJECT =

IMPORTING

*      LANGUAGE          =

EXCEPTIONS

FORM          =1

FORMAT         =2

UNENDED         =3

UNOPENED           =4

UNUSED         =5

OTHERS        =6

WRITE_FORM

See 'WRITE_FORM'

END_FORM

CALL FUNCTION 'END_FORM'

IMPORTING

*    RESULT              =

EXCEPTIONShttp://abap-tutorials.com 2010

*    UNOPENED                  =1

BAD_PAGEFORMAT_FOR_PRINT = 2

OTHERS              =3

CLOSE_FORM

Structure for Print options (return values) - Pages selected for printing, Number of copies etc.

DATA BEGIN OF RESULT.
INCLUDE STRUCTURE ITCPP.

DATA END OF RESULT.

CALL FUNCTION 'CLOSE_FORM'

IMPORTING

RESULT              = RESULT

*        RDI_RESULT           =

TABLES

*        OTFDATA             =

EXCEPTIONS

*        UNOPENED                =1

BAD_PAGEFORMAT_FOR_PRINT = 2

*        SEND_ERROR               =3

*        OTHERS             = 4.

63. CONTROL_FORM - Calling Commands Using a programhttp://abap-tutorials.com 2010

The function module CONTROL_FORM can be used to create SapScript control statements from within
an ABAP program.

Example:

call function 'CONTROL_FORM'

EXPORTING

COMMAND = 'PROTECT'.

call function 'WRITE_FORM'.....................

call function 'CONTROL_FORM'

EXPORTING

COMMAND = 'ENDPROTECT'.

Styles
Styles are used to predefine paragraph and character formats for forms. SAP provides several standard
styles e.g. for

Address includes, on-line documentation and so on. You can define your own styles.

To find styles, create styles and maintaine styles, use transaction SE72.

You assign style to a text by using menu Format -> Style

You can make temporary style changes using the control command /: STYLEhttp://abap-tutorials.com
2010

Using graphics in SapScript

Use transaction SE78 to inmport graphics to SAP.

In the form painter, you can either include directly to the form using menu Edit->Graphic->Create or
using the INCLUDE

statement in a window.

To use an INCLUDE stanment, goto into the woindow script editor and use menu Include->Graphic. The
include can look like

this for a bitmap:

/: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON

Modifications

Considerations in connection with modifications

The standard SAP print program should only be changed when it is absolutely necessary. If additional
data is needed, these

can in many cases be retrieved using a a PERFORM statement in the form instead of changing the print
program..

There can be the following reasons to change the print program:

Structureal changes

New text eloements are needed

Print program to be used to print additional forms

Determine/change which forms and printprograms that are used for printinghttp://abap-tutorials.com
2010
The forms and print programs for a given output type and application can be found in table TNAPR
Processing programs for

output

Use view V_TNAPR in (Transaction SE30) to change entries.

Import/Export SapScript form from PC file

Use ABAP program: RSTXSCRP

SD - Finding the name of the print program

For SD dopcuments you can use table TNAPR top find the name of the a

printprogram

Module Pool

Transactions:

A transaction is a program that conducts a dialog with the user. In a typical dialog, the system displays a
screen on which the

user can enter or request information. Based on the the user input or request, the program executes the
appropriate actions

like, it branches to the next screen, displays an output, or changes the database.

Explain what is a transaction in SAP terminology.

- In SAP terminology, a transaction is series of logically connected dialog steps.

Explain how SAP GUI handles output screen for the user.

- User terminal input is accepted by SAP GUI and sent to the SAP dispatcher. The dispatcher co-ordinates
the information

exchange between the SAP GUIs and the work processes. The dispatcher first places the processing
request in request

queues, which it then processes. The dispatcher dispatches the requests to the available work process.
The actual

processing takes place in the work process. When processing is complete, the result of a work process is
returned via

the dispatcher to the SAP GUI. The SAP GUI interprets the received data and generates the output
screen for the user.http://abap-tutorials.com 2010
What is LUW or Database LUW or Database Transaction ?

- A “LUW” ( logical unit of work ) is the span of time during which any database updates must be
performed . Either they

are all performed ( committed ) , or they are all thrown away ( rolled back ).

LUW ( or “database LUW” or “database transaction” )

This is the set of updates terminated by a database commit. A LUW lasts, at most, from one screen
change to the next (

because the SAP system triggers database commits automatically at every screen change ).

LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the
database is once again in a

correct state. If, however, an error occurs within an LUW, all database changes made since the
beginning of the LUW are

canceled and the database is then in the same state as before the LUW started.

An LUW begins

- Each time you start a transaction

- When the database changes of the previous LUW have been confirmed (database commit) or

- when the database changes of the previous LUW have been cancelled (database rollback)

An LUW ends

- When the database changes have been confirmed (database commit) or

- When the database changes have been canceled (database rollback)

What is SAP LUW or Update Transaction ?

- Update transaction ( or “SAP LUW”)

This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last much longer than a
database LUW, since most

update processing extends over multiple transaction screens.The programmer terminates an update
transaction by issuing a

COMMIT WORK statement.

Does the external program run in the same SAP LUW as the caller, or in a separate one?
- Transactions run with a separate SAP LUW

- Reports run with a separate SAP LUW

- Dialog modules run in the same SAP LUW as the callerhttp://abap-tutorials.com 2010

- Function modules run in the same SAP LUW as the caller

The only exceptions to the above rules are function modules called with IN UPDATE TASK (V2 function
only) or IN

BACKGROUND TASK (ALE applications). These always run in their own (separate) update transactions.

What are the requirements a dialog program must fulfill ?

- A dialog program must fulfill the following requirements

a user friendly user interface .

format and consistency checks for the data entered by the user .

easy correction of input errors .

.access to data by storing it in the database .

What are the basic components of dialog program ?

- Screens (Dynpros)

Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic
and controls

exactly one dialog step.

- ABAP/4 module pool

Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module
pool, since it

consists of interactive modules.

What is a dynpro ? What are its components ?

- A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly

one dialog step.

   - The different components of the dynpro are:

Flow logic: Calls of the ABAP/4 modules for a screen
Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen

Screen attributes: Number of the screen, number of the subsequent screen, and others

Field attributes: Definition of the attributes of the individual fields on a screen

What is screen flow logic? What are the selections in it? Explain PAI and PBO?

Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP
program in

that it serves as a container for processing blocks. There are four event blocks, each of which is
introduced with the

screen keyword PROCESS:http://abap-tutorials.com 2010

PROCESS BEFORE OUTPUT.

...

PROCESS AFTER INPUT.

...

PROCESS ON HELP-REQUEST.

...

PROCESS ON VALUE-REQUEST.

Selections are performed in PAI.

PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous
screen and before

the current screen is displayed. You can program the PBO processing of the screen in this block. At the
end of the PBO

processing, the screen is displayed.

PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can
program the PAI

processing of the screen in this block. At the end of the PAI.

processing, the system either calls the next screen or carries on processing at the point from which the
screen was called.
PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user
requests

field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the
corresponding event

blocks. At the end of processing, the system carries on processing the current screen.

Can we use WRITE statement in screen fields ? If not how is data transferred from field data to screen
fields

- We cannot write field data to the screen using the WRITE statement. The system instead transfers
data by comparing

screen field names with ABAP/4 variable names. If both names are the same, it transfers screen field
values to ABAP/4

program fields and vice-versa. This happens immediately before and immediately after displaying the
screen.

How does the interaction between the Dynpro and the ABAP/4 modules takes place ?

- A transaction is a collection of screens and ABAP/4 routines, controlled and executed by a Dialog
processor. The Dialog

processor processes screen after screen, thereby triggering the appropriate ABAP/4 processing for each
screen. For

each screen, the system executes the flow logic that contains the corresponding ABAP/4 processing.
The control passes

from screen flow logic to ABAP/4 code and back.

How does the Dialog handle user requests ?

- When an action is performed, the system triggers the PROCESS AFTER INPUT event. The data passed
includes field

screen data entered by the user and a function code. A function code is a technical name that has been
allocated in the http://abap-tutorials.com 2010

Screen Painter or Menu Painter to a menu entry, a pushbutton, the ENTER key or a function key of a
screen. An internal

work field (ok-code) in the PAI module evaluates the function code, and the appropriate

   action is taken.
How are the function codes handled in flow logic ?

- When the user selects a function in a transaction, the system copies the function code into a specially
designated work

field called OK_CODE. This field is global in the ABAP/4 module pool. The OK_CODE can then be
evaluated in the

corresponding PAI module.

The function code is always passed in exactly the same way, regardless of whether it comes from a
screen's pushbutton,

a menu option, function key or other GUI element.

What controls the screen flow ?

- The SET SCREEN and LEAVE SCREEN statements control screen flow.

What are “field” and “chain” statements ?

- The FIELD and CHAIN flow logic statements let you program your own field checks. FIELD and CHAIN
tell the system

which fields you are checking,and whether the system should perform checks in the flow logic or call an
ABAP/4 module.

What is an on “*-input field” statement ?

- ON *-INPUT

The ABAP/4 module is called if the user has entered a "*" in the first character of the field, and the field
has the attribute *-

entry in the Screen Painter. You can use this option in exceptional cases where you want to check only
fields with certain

kinds of input.

What are conditional chain statements ?

- ON CHAIN-INPUT similar to ON INPUT.

The ABAP/4 module is called if any one of the fields in the chain contains a value other than its initial
value (blanks or

nulls).

          ON CHAIN-REQUEST
This condition functions just like ON REQUEST, but the ABAP/4 module is called if any one of the fields in
the chain

changes value.

What is “at exit-command” ?

- The flow logic keyword AT EXIT-COMMAND is a special addition to the MODULE statement in the flow
logic. AT EXITCOMMAND lets you call a module before the system executes the automatic field checks.

Which function type has to be used for using “at exit-command” ?

- To use AT EXIT-COMMAND, we must assign a function type „E‟ to the relevant function in the Menu
Painter or Screen

Painter.

What is the difference between SET SCREEN and CALL SCREEN ?

With SET SCREEN, the current screen simply specifies the next screen in the chain. control branches to
this next screen as

soon as the current screen has been processed. Return from next screen to current screen is not
automatic. It does not

interrupt processing of the current screen. If we want to branch to the next screen without finishing the
current one, use

LEAVE SCREEN.http://abap-tutorials.com 2010

With CALL SCREEN, the current (calling) chain is suspended, and a next screen (or screen chain) is called
in. The called

screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0.
Sometimes we might

want to let an user call a popup screen from the main application screen to let them enter secondary
information. After they

have completed their entries, the users should be able to close the popup and return directly to the
place where they left off in

the main screen. Here comes CALL SCREEN into picture. This statement lets us insert such a sequence
into the current one.

Can we specify the next-screen number with a variable. ( Yes / No ).

Yes.
The field SY-DYNNR refers to ________________.

Number of the current screen.

What is a dialog module ?

A dialog module is a callable sequence of screens that does not belong to a particular transaction. Dialog
modules have their

own module pools, and can be called by any transaction.

The syntax used to call a screen as a dialog box ( popup ) is _________________.

CALL SCREEN <screen number>

STARTING AT <start column> <start line>

ENDING AT <end column> <end line> .

What is a “call mode” ?

In the ABAP/4 world, each stackable sequence of screens is a "call mode". This is important because of
the way you return

from a given current sequence. To terminate a call mode and return to a suspended chain, set the "next
screen" to 0 and

leave to it:

LEAVE TO SCREEN 0 or ( SET SCREEN 0 and LEAVE SCREEN ). When you return to the suspended chain,

execution resumes with the statement directly following the original CALL SCREEN statement. The
original sequence

of screens in a transaction is itself is a

calling mode. If you LEAVE TO SCREEN 0 in this sequence ( that is, without having stacked any additional
call

modes ), you return from the transaction altogether.http://abap-tutorials.com 2010

The maximum number of calling modes stacked at one time is ______.

Nine.

What is LUW or Database LUW or Database Transaction ?

A “LUW” ( logical unit of work ) is the span of time during which any database updates must be
performed in an “all or nothing”
manner. Either they are all performed ( committed ) , or they are all thrown away ( rolled back ). In
the ABAP/4 world, LUWs

and transactions can have several meanings:

LUW ( or “database LUW” or “database transaction” )

This is the set of updates terminated by a database commit. A LUW lasts, at most, from one screen
change to the next (

because the SAP system triggers database commits automatically at every screen change ).

What is SAP LUW or Update Transaction ?

Update transaction ( or “SAP LUW”)

This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last much longer than a
database LUW, since

most update processing extends over multiple transaction screens.The programmer terminates an
update transaction by

issuing a COMMIT WORK statement.

What happens if only one of the commands SET SCREEN and LEAVE SCREEN is used without using the
other?

If we use SET SCREEN without LEAVE SCREEN, the program finishes processing for the current screen
before branching to

<scr no>. If we use LEAVE SCREEN without a SET SCREEN before it, the current screen process will be
terminated and

branch directly to the screen specified as the default next-screen in the screen attributes.

What is significance of the screen number „0‟ ?

In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to
the previous call

level. That is, if you have called a screen sequence with CALL SCREEN leaving to screen 0 terminates the
sequence and

returns to the calling screen. If you have not called a screen sequence, LEAVE TO SCREEN 0 terminates
the transaction.

What does the command „SUPPRESS DIALOG‟ do ?http://abap-tutorials.com 2010
Suppressing of entire screens is possible with this command. This command allows us to perform screen
processing “in the

background”. Suppresing screens is useful when we are branching to list-mode from a transaction dialog
step.

What is the significance of the memory table „SCREEN‟ ?

At runtime, attributes for each screen field are stored in the memory table called „SCREEN‟. We need
not declare this table in

our program. The system maintains the table for us internally and updates it with every screen change.

What are the fields in the memory table „SCREEN‟ ?

- Name Length Description

Why grouping of fields is required ? What is the maximum number of modification groups for each field
?

- If the same attributes need to be changed for several fields at the same time these fields can be
grouped together. We

can specify up to four modification groups for each field.

What is a screen group ? How it is useful ?

Screen group is a field in the Screen Attributes of a screen. Here we can define a string of up to four
characters which is

available at the screen runtime in the SY-DNGR field. Rather than maintaining field selection separately
for each screen of a

program, we can combine logically associated screens together in a screen group.

What is a Subscreen ? How can we use a Subscreen ?

A subscreen is an independent screen that is displayed in an area of another ("main") screen. To use a
subscreen we must

call it in the flow logic ( both PBO and PAI ) of the main screen. The CALL SUBSCREEN statement tells
the system to

execute the PBO and PAI events for the subscreen as part of the PBO or PAI events of the main screen.
The flow logic of

your main program should look as follows:
PROCESS BEFORE OUPTPUT.

CALL SUBSCREEN <area> INCLUDING '<program>' '<screen>'.

PROCESS AFTER INPUT.

CALL SUBSCREEN <area>.

Area is the name of the subscreen area you defined in your main screen. This name can have up to ten
characters. Program

is the name of the program to which the subscreen belongs and screen is the subscreen's
number.http://abap-tutorials.com 2010

What are the restrictions on Subscreens ?

Subscreens have several restrictions. They cannot:

Set their own GUI status

Have a named OK code

Call another screen

Contain an AT EXIT-COMMAND module

Support positioning of the cursor

How can we use / display table data in a screen ?

ABAP/4 offers two mechanisms for displaying and using table data in a screen. These mechanisms are
TABLE CONTROLS

and STEP LOOPS.

What are the differences between TABLE CONTROLS and STEP LOOPS ?

- TABLE CONTROLS are simply enhanced STEP LOOPS that display data with the look and feel of a table
widget in a

desktop application. But from a programming standpoint, TABLE CONTROLS and STEP LOOPS are almost
exactly the

same. One major difference between STEP LOOPS and TABLE CONTROLS is in STEP LOOPS their table
rows can span

more than one line on the screen. By contrast the rows in a TABLE CONTROLS are always single lines,
but can be very
long. ( Table control rows are scrollable ). The structure of table controls is different from step loops.
A step loop, as a

screen object, is simply a series of field rows that appear as a repeating block. A table control, as a
screen object consists of :

i ) table fields ( displayed in the screen ) ii ) a control structure that governs the table display and what
the user can do with

it.

Why do we need to code a LOOP statement in both the PBO and PAI events for each table in the screen
?

We need to code a LOOP statement in both PBO and PAI events for each table in the screen. This is
because the LOOP

statement causes the screen fields to be copied back and forth between the ABAP/4 program and the
screen field. For this

reason, at least an empty LOOP......ENDLOOP must be there.

The field SY-STEPL refers to ___________________ .http://abap-tutorials.com 2010

The index of the screen table row that is currently being processed. The system variable SY-STEPL only
has a meaning

within the confines of LOOP...ENDLOOP processing. Outside the loop, it has no valid value.

How can we declare a table control in the ABAP/4 program ?

Using the syntax controls <table control name> type tableview using screen <scr no>.

Differentiate between static and dynamic step loops.

Step loops fall into two classes: Static and dynamic. Static step loops have a fixed size that cannot be
changed at runtime.

Dynamic step loops are variable in size. If the user re-sizes the window the system automatically
increases or decreases the

number of step loops blocks displayed. In any given screen you can define any number of static step
loops but only a single

dynamic one.

What are the two ways of producing a list within a transaction ?
By submitting a separate report.

By using leave to list-processing.

What is the use of the statement Leave to list-processing ?

Leave to list-processing statement is used to produce a list from a module pool. Leave to list-processing
statement allows

to switch from dialog-mode to list-mode within a dialog program.

When will the current screen processing terminates ?

A current screen processing terminates when control reaches either a Leave-screen or the end of PAI.

How is the command Suppress-Dialog useful ?

Suppressing entire screens is possible using this command. This command allows

us to perform screen processing “in the background”. The system carries out all PBO and PAI logic, but
does not display the

screen to the user. Suppressing screens is useful when we are branching to list-mode from a transaction
dialog step.

What happens if we use Leave to list-processing without using Suppress-Dialog ?

If we don't use Supress-Dialog the next screen will be displayed but as empty.

when the user presses ENTER, the standard list output is displayed.http://abap-tutorials.com 2010

How the transactions that are programmed by the user can be protected ?

By implementing an authority check.

What are the modes in which any update tasks work ?

Synchronous and Asynchronous.

What is the difference between Synchronous and Asynchronous updates ?

A program asks the system to perform a certain task, and then either waits or doesn't wait for the task
to finish. In

synchronous processing, the program waits: control returns to the program only when the task has been
completed. In

asynchronous processing, the program does not wait: the system returns control after merely logging
the request for
execution.

What is the difference between Leave Transaction and Call Transaction ?

In contrast to LEAVE TO TRANSACTION, the CALL TRANSACTION statement causes the system to start a
new SAP LUW .

This second SAP LUW runs parallel to the SAP LUW for the calling transaction.

Overall how do you write transaction program in SAP?

Create the transaction using object browser (SE80)

Define the objects e.g. screen, Transactions. – Modules – PBO, PAI.

And you can create a transaction from SE93 also.

Does SAP has a GUI screen painter? If yes What operating systems is it available on? What is the other
type of

screen painter called?

Yes

On what OS is it available – Window based.

Other type of screen painter – alpha numeric screen painter.

What are step loops? How do you program page down page up in step loop?

Step loops: Method of displaying a set of records.

Page down & Page up: decrement / increment base counter

Index = base + sy-step1 – 1http://abap-tutorials.com 2010

Normally how many and what files get created when a transaction program is written? What is top
XXXXXXTOP

program?

Main program with A Includes

I ) TOP INCLUDE – GLOBAL DATA

II ) Include for PBO

III) Include for PAI

IV) include for Forms
Where is processing logic located in an on-line program?

Ans :- ABAP/4 program (module pool)

Describe the online processor. What is its function?

Ans :- Controls the flow of online program.

How are screen names defined? Do you create a screen first or define your program first?

Ans :- Define the program first and then create a screen.

What does PBO stands for? When is the PBO logic performed?

Ans :- PROCESS BEFORE OUTPUT –Processed before the screen is displayed.

What does PAI stands for? When is the PAI logic performed?

Ans :- PROCESS AFTER INPUT –Processed after the user has pressed ENTER.

How is data passed from the screen fields to the ABAP/4 program?

Ans :- Through the flow logic.http://abap-tutorials.com 2010

What does the TOP Include do for you as a programmer?

Ans: For global declarations.

What are the steps in creating screen?

Where are the module statement declared? Where is the logic within each module?

Ans :-

1. Go to SE41 ( Screen Painter )

Enter the program name and screen number . Press Enter.

2. Design the screen and save, check and activate it.

   Module statements are in the flow logic within each module is in the ABAP/4 module pool

Program.

What is the significance of the word „OUTPUT‟ in the declaration

MODULE TEST_KNOWLEDGE OUTPUT

ENDMODULE.
Ans :- Then we know that it is part of the PBO, therefore is processed before the screen is presented.

Describe the fields on the screen ?

Ans :- Attributes screen , Screen types ,follow up screens , cursor position etc. After you have entered
the screen number,

the screen branches to the screen attribute maintenance. Enter a short description , select the type
NORMAL and specify the

number of the follow-up screen.

What are the three components of ON-LINE program?

Ans :- Screen , ABAP/4 program and transaction code.

What is gained by using the Dictionary Fields menu option when creating your screen?

Ans :- The fields you have created inherits the same attributes as those in the Data
Dictionary.http://abap-tutorials.com 2010

How to Create a checkbox , frame, pushbuttons and radio buttons on a screen?

Ans :- Just type a name and go to graphic element push button.

How do you assign an OK_CODE for a push button? How it is used in your ABAP?

Ans :- In the field list ,name the element and give it the value that it will represent when pushed    You
must make sure that

you clear the field that represents the pushbutton after every check.

What automatic checks does the screen perform? (should be four)

Describe all four and how they are used?

Ans :- The field format, required input, a foreign key table ,parameters.

What are the two methods to declare input field as mandatory?

If you set required field as program attribute, the user must enter a value in the field. Required fields
appear on the screen

containing a question mark (?).

How does foreign key work? What you have to put in your screen to identify the foreign key?

No? Then where is the foreign key identified?
Ans :- You have defined a screen field by referring to a Data Dictionary, which has a check table. When
the foreign key is

checked the system compares the values of the fields to be checked with the contents of the key fields
of the corresponding

table.

What are the two effects of the foreign key from a user standpoint?

Ans :- Possible entries & a check against the key field contents.

What is user defined validation checks in the flow logic?

Ans :- FIELD…SELECT FIELD…VALUES or in the module pool FIELD…MODULE.

Does the value command in the flow logic go in the PAI or the PBO event?

Ans :- PAI.

If an error occurs in the module pool, which fields are available for entry and which are display only
fields?

Ans :- Only those fields defined with the FIELD statement before MODULE & relevant checks in a
chain.http://abap-tutorials.com 2010

When is the chain command used in the PBO event?

Ans :- If you want to make more than one field ready for input after an error.

What table stores the online messages? What is the message class and what is its significance?

Ans :- Table T100. The message class is a specific class of messages for a group of transactions.

What are the 5 different message types and how are they handled by the system? What is then
difference between

the Warning and Error messages?

Ans :-

A : Abend Message displayed on the current screen and subsequent task terminated

I : Information Message displayed on the current screen , but user can continue program by pressing
ENTER

E: Error Message displayed on the current screen. With FIELD statements , the fields concerned become
ready again for
input and user is required to make the entry /entries again

W : Warning As E message , but correcting input is optional

S: Success Message displayed on the follow-up screen as an I message.

What does WITH statement add to a message?

Ans :- In the place of the & or $ the fields or values are placed in the error message.

What effect does the FIELD statement have within the flow logic?

Ans :- The field statement resets the fields so those fields are ready for input again.

Where are the messages displayed on the screen?

Ans :- At the bottom.

Is the SET PARAMETER statement to be issued in PBO or PAI module? Why?

Ans :- PAI, the value must be input into the fields first before it can be placed in the buffer.

Where does the GET PARAMETER statement get its values? Which field gets populated with the new
value?

Ans :- From the buffer.http://abap-tutorials.com 2010

Where can the SET CURSOR command be executed? What is its effect?

Ans :- In PBO, To position the CURSOR in a particular field after the screen is displayed.

What are the matchcodes and how do they affect the screen field? Where are they specified in the
online program?

Ans :- In the Properties window of the Field.

What is the effect of an ON CHAIN-REQUEST command in your flow logic?

Ans :- When value of any of the fields between CHAIN…..ENDCHAIN is attempted to change.

What commands are used to change database table entries?

Ans :-

How can you check if the changes to the database were successful?

Ans :-

What is the difference between the Long form and the short form of making database changes?
Ans :- Long Form:

               Update MARA and set brgew = 0 where matnr = „MAT!‟.

This is a standard Oracle Statement to modify the entry in the Database.

         Short Form:

MARA-MATNR = „MAT1‟. MARA-BRGEW = 0.

            Modify MARA.

This is an SAP defined statement to modify the table.

It is more secure and consistent.

What is the advantages using the SAP long form over the short form of database changes?

Ans :- May be Fast Effect.

Can „where‟ clause be used when updating database entries?

Ans :- Yes.http://abap-tutorials.com 2010

Describe array operations and their advantages?

Ans :-

What is logical unit of work? How is it defined?

Ans :- Logical Unit of work is a block of memory area where database contents are stored and
manipulated.

For every SAP application LUW is automatically created for database communication. Besides this we
have SAP

LUW s also there.

What function is performed by the commit work command?

Ans :- When you perform Commit , all the LUW s work will be reflected to the database.

Why is it so important for a programmer to check the lock entries?

Ans :- To find out if record is locked and also to maintain data integrity.

How can you find a lock entry for a database table?
Ans :- The function module „ENQUEUE <lock object>‟ checks whether a lock was triggered for the same
object. Otherwise an

exception FOREIGN_LOCK is carried out. If the object is not locked the function module sets the lock.

What steps are necessary to set a lock on a record within a database table?

Ans :-

Execute CALL FUNCTION statement

CALL FUNCTION “ENQUEUE <lock object‟>

EXPORTING…

EXCEPTIONS…

CASE SY-SUBRC.

.

.

ENDCASE.

How do you unlock the entry? Why is this necessary?

Ans :-http://abap-tutorials.com 2010

Execute the CALL FUNCTION statement

CALL FUNCTION „DEQUEUE <lock object>‟

EXPORTING…

It is important to unlock the entry so others can update it.

What is the difference between „CALL SCREEN # # # „ and „SET SCREEN ### ‟

… LEAVE SCREEN?

Ans :-

SET SCRREN statement sets or overwrites the follow-up screen.

LEAVE SCREEN executes the screen number currently in the follow-screen field

CALL SCREEN interrupts the processing of the current screen to call a new screen or a chain of screens,
processing of the
current screen is resumed directly after the call.

After a CALL SCREEN command where does the processing return after the screen has been executed?

Ans :- It returns the processing to the calling screen.

Which is the more similar to a call with return, the SET SCREEN or the CALL SCREEN?

Ans :- The CALL SCREEN command.

What function is performed by the SET SCREEN 0 command?

Ans :- Returns to the original screen.

What are the main differences between the repot status and screen status?

Ans :-

Where must you place the SET PF-STATUS command in your online program?

Ans :- Place it in the PBO module of the screen.

Why is it good idea to clear OK_CODE field after deciding which action to take?

Ans :- You need to clear the OK code to avoid sending a screen that already has a function
code.http://abap-tutorials.com 2010

How do you specify that a function is an exit type command?

Ans :- By specifying function type E for the pushbuttons or menu options in the screen painter or menu
painter.

What is the purpose of the „AT EXIT-COMMAND‟?

Ans :- Usually there are many ways to leave a screen (back,exit,cancel) .This command will perform
termination logic for all

functions of type E.

What are screen groups?

Ans :- A group of screen fields such as radio buttons or checkboxes.

What is the correct syntax for dynamically modifying a large number of screen fields?

Ans :-

MODULE MODIFY _SCREEN_OUTPUT

.
.

.

LOOP AT SCREEN

IF SCREEN –GROUP = 3D „GR1‟

SCREEN-INPUT=3D 1

ENDIF.

IF SCREEN-NAME = 3D „TAB-FIELD‟

SCREEN-ACTIVE=3D 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

What is the name of the internal table that stores the screen information?

Ans :- SCREEN.http://abap-tutorials.com 2010

What is the purpose of the MODIFY command when performing the dynamic screen modifications?

Ans :- after you activate or deactivate the field attributes by assigning them 1 or 0, you save the
modifications via MODIFY

SCREEN command.

Direction for the use of check box and radio buttons in screen painter?

Ans :-

Creating Radio Button and Check Boxes on the screen

Go to the full screen editor.

Place an underscore at the point where you want to place the field.

Define the name of the field using <Field Attributes>

Place the cursor on the field and press <Graphic element>

Then press <Radio Buttons> or <Check boxes> depending on which graphic element you want

Then you group related check boxes and radio boxes.
What are user Exits and transactions?

Ans :- Generally, user exits are the forms defined within SAP standard code (usually starting with user
exit). These

predefined areas in the code allow programmers to insert custom defined code into the standard
processing of a transaction

(e.g. allow resorting of the batch sequence in VA01 batch processing). There are many specific examples
if you are

interested, but usually user exits are searched for when a specific use is being analyzed.

What happens if you enter 0 in NEXT Screen attribute?

Ans :- It does not go to any other screen and it moves back one level. However you can control this in
run-time using SET

SCREEN command.

How to modify the attributes of screen fields at run time ?.

We loop through the fields of the screen. When you find the name of a screen field you want to

modify, set attributes for the field and use MODIFY SCREEN to update the

attribtes.

You can find the attributes in the internal table SCREEN.

This loop makes some of the screen fields invisible ind a selection screen:

AT SELECTION-SCREEN OUTPUT.                                 http://abap-tutorials.com 2010

LOOP AT SCREEN.

IF screen-name = 'P_VERAB' OR

screen-name = 'P_STXT1' OR

screen-name = 'P_STXT2' OR

screen-name = '%_P_VERAB_%_APP_%-TEXT' OR

screen-name = '%_P_STXT1_%_APP_%-TEXT' OR

screen-name = '%_P_STXT2_%_APP_%-TEXT'.

screen-active = '0'.
MODIFY SCREEN.

ENDIF.

ENDLOOP.

How to leave dynpro allthough required entry not made ?

In the menu painter - Function attributes for the button, set Functional

type to E (Exit command)

PROCESS AFTER INPUT.

Call module that leaves screen before User_Command_xxxx is executed

MODULE ReturnExit AT EXIT-COMMAND.

MODULE user_command_1000.

MODULE returnexit.

CASE sy-ucomm.       http://abap-tutorials.com 2010

WHEN 'CANC'. "Or whatever you want to call it

Clear w_screen.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE.

Calling a report from a dynpro

There are to ways to do this:

Use leave to list-processing if you want to do it in your module pool. You will not be able to use

selection-screens.

Use the submit statement to start a seperate report from your dynpro.

Anyone who have idea on how to know the selected value on run-time?

How can get the table control attribute selected value ? I try to read the value in debuger which is #

(table_control-cols-selected). There is no difference on the other row which is not selected.
The tc-cols-selected is for column selection only. For row selection you have two scenarios

turn on the SelColumn attribute in screen painter, give it a name and declare an abap variable with the
same name

type C length 1. In your PAI loop at itab, when the selected row is processed the abap variable will = 'X'.
At this point

you can save the record or key.

you can determine which row the cursor is on in your table control as follows:

DATA: LINE_SEL LIKE SY-STEPL,

TABIX LIKE SY-TABIXhttp://abap-tutorials.com 2010

GET CURSOR LINE LINE_SEL.

TABIX = <table control>-TOP_LINE + LINE_SEL - 1.

TABIX is now the index of the selected row.

F4 Help - Calling it from a program and limiting values ?

To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the
program and add a field

statement for the field that should trigger the F4 help. In the mdoule called from

PROCESS ON-VALUE-REQUEST, call function module

F4IF_FIELD_VALUE_REQUEST.

Example 1 - Dynpro

process before output.

.....

process after input.

.....

PROCESS ON VALUE-REQUEST.

FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.

MODULE f4_help_for_pctr INPUT.http://abap-tutorials.com 2010

NOTE:
Tabname/fieldname is the name of the table and field

for which F4 should be shown.

*

Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field

in which the f4 value should be returned.

*

Value: The value of the Dynpro fuield when calling the F4 help.

You can limit the values shown, by inseting a value in this parameter

e.g '50*' to show only values beginning with 50

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname            = 'ZSD00003'

fieldname          = 'PRCTR'

* SEARCHHELP               =''

* SHLPPARAM                =''

dynpprog           = 'ZSD00002_BRUGERKONV_LISTE'

dynpnr            = '0100'

dynprofield         = 'IT_ZSD00003-PRCTR'

* STEPL             =0

value            = '50*'

* MULTIPLE_CHOICE            =''

* DISPLAY            = ' 'http://abap-tutorials.com 2010

* SUPPRESS_RECORDLIST            =''

* CALLBACK_PROGRAM               =''

* CALLBACK_FORM              =''
TABLES

* RETURN_TAB                =

EXCEPTIONS

* FIELD_NOT_FOUND               =1

* NO_HELP_FOR_FIELD             =2

* INCONSISTENT_HELP             =3

* NO_VALUES_FOUND               =4

* OTHERS               =5

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDMODULE.               " F4_help_for_pctr INPUT.

What you can do with a transaction variant

Insert default values into fields

hange the ready for input status for fields

Hide various screen elements, menu functions or entire screens

Adjust table control settingshttp://abap-tutorials.com 2010

Note: Transaction variants can only be used with dialog transactions.

How to create a transaction variant

Transaction variants are created with transaction: SHD0

In the field Transaction on SHD0 enter the transactioncode for the screen you want tpo modify (E.g.
VA03) . In the field

Variant on SHD0 enter the name you want to give the transaction variant (E.g. ZVA03)

Press Create
Now the screen for the transaction is shown and you can enter default values in the fields of the screen

Press Enter. Now a screen that enbles you to make further customizing (Hide, Output only, Invisible,
Mandatory) if the screen

fields is shown.

After you have finished customizing the screen press Enter to go to the next screen or ave and exit to
save the Transaction

variant

How to find user exits

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements. Enter
the exit name and

press enter.

You will now come to a screen that shows the function module exits for the exit.

Using Project management of SAP Enhancements

We want to create a project to enahance trasnaction VA01

Go to transaction CMOD

Create a project called ZVA01

Choose the Enhancement assign radio button and press the Change button

In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an
enhancement

can only be used i 1 project. If the enhancement is allready in use, and error message will be displayed

Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double
click on the exit.http://abap-tutorials.com 2010

Now the function module is displayed. Double click on include ZXVVAU04 in the function module

Insert the following code into the include: E_KUNNR = '2155'.

Activate the include program. Go back to CMOD and activate the project.
Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155"

To run the transaction varian, you must create a new Transaction code in SE93 that referes to the
Transaction variant.

Choose Transaction with variant as Start object.

Note: The transaction variant can also be called from a program that imcludes a call to function module

RS_HDSYS_CALL_TC_VARIANT

Can a field exit on a screen access the values entered by a user on that screen for the screen fields other
than the

field for which the exit has been applied. if yes then how?

Maybe this function helps you: DYNP_VALUES_READ. It reads the dynpro-values before processing PAI.

What are events in dialogs?

Process Before Output and

Process After Input.

Process On Value

Process On Help

Module output.

Module input.

What are significance of PBO and PAI?

Before display the screen PBO is fired. This is for screen display

After giving the user input PAI is fired. This is for input validation

Where you will validate entries in the fields?

Entries can be validated in PAI.

You can validate in Field Exits also.http://abap-tutorials.com 2010

What is use of Chain and EndChain?

For calling a particular PAI module if any one of fields in a group meets a condition, we use to combine
all such fields .

How to change screen dynamically?
By modifying the screen attributes.

How to capture changes on the screen fields? Same in case of table control?

We can capture changes on the screen fields using module on input and on request.

If you are validating contents of field but user want to exit from the transaction without validating
contents; How to

handle this scenario?

By at exit-command we can do.

How to pass field values from one screen to other screen?

By using set and get parameter id statements.

What is the difference in using COMMIT WORK within a called transaction and within a called dialog
module in an

existing module.

Ans.:

Transaction: It will create a new LUW and so you have to say COMMIT WORK in a called transaction for
getting any of the

update statements to be fruitful inside the called transaction.

Dialog module: Since no new LUW is created, COMMIT WORK is not necessary.

Which 2 transaction codes are used to manage enhancements?

Ans: SMOD and CMOD

Which enhancement is local, which is global:

Field Exits

Screen Exits

Program Exitshttp://abap-tutorials.com 2010

Menu Exits

Where can you create an enhancement to show your own F1 Help on a field?

Ans: in POH

What enhancements can be created using Cmod?
Ans: Customer Enhancements, i.e., Field Exits.

What is the code for showing a list produced in a dialog program?

Ans: Leave screen.

 Leave to List-processing.

Or

Submit <program name>.

When is field Name1 transported to the program in this coding:

Process After Input.

Module ABC.

Field Name1 Module DEF.

What is the effect of SUPPRESS DIALOG in PBO?

Field Name2 Module GHI.

If an error message was raised in Module GHI, which fields would be ready for input?

Ans: The fields that are placed in CHAIN………ENDCHAIN.

In which 2 places could you set the GUI status and title bar for a modal dialog box?http://abap-
tutorials.com 2010

What does CHAIN ....END CHAIN do?

Sometimes you want to check several fields as a group. To do this, include the fields in a FIELD
statement, and enclose

everything in a CHAIN-ENDCHAIN block.

Example

**** Screen flow logic: ****

CHAIN.

FIELD: SPFLI-CARRID, SPFLI-CONNID.

 MODULE CHECK_FLIGHT.

ENDCHAIN.
When an error is found inside a chain, the screen is re-displayed, and all fields found anywhere in the
chain are input-enabled. All

non-chain fields remain disabled.

How can you test flow logic?

Check function checks the syntax,data-consisteny and screen layout of the screen.

To test the syntax, from the menu path choose screen---->check-------> syntax.

To test the data consistency, from the menu path choose screen---->check------> consistency.

To check the layout,from ythe menu path choose screen----->check----->layout.

What happens if you choose hold data option in screen atributes?

To retain data entered by a user. The system automatically displays this data if the user returns to this
screen.

What happens if you enter 0 in NEXT screen attribute?

In ABAP/4 each stackable sequence of screens is a "call mode". This is important because of the way you
return from a given

current sequence. To terminate a call mode and return to a suspended chain, set the "next screen" to 0
and leave to it:When you

return to the suspended chain, execution resumes with the statement directly following the original
CALL SCREEN statement.The

original sequence of screens in a transaction is itself a calling mode. The original sequence of screens in
a transaction is itself a

calling mode. If you LEAVE TO SCREEN 0 in this sequence (that is, without having stacked any additional
call modes), you return

from the transaction altogether.

How many menu titles you can have in a main menu?http://abap-tutorials.com 2010

You can have six menus in a menu bar.In addition to this system provides two more menus ie system
and help. You can have

only one menu bar for a status.

You can maintain 15 entries in a menu and upto three levels.

What is the difference between the "change on-input" and "Change on request" in the PAI of a screen?
The ABAP/4 module is called only if the field contains a value other than its initial value. This initial value
is determined by the

field's data type: blanks for character fields, zeroes for numerics.



The ABAP/4 module is called only if the user has entered a value in the field value since the last screen
display. The value counts

as changed even if the user simply types in the value that was already there.

What are user exits? What is involved in writing them? What precautions are needed?

User defined functionality included to predefined SAP standards. Point in an SAP program where a
customer's own program can

be called. In contrast to customer exits, user exits allow developers to access and modify program
components and data

objects in the standard system. On upgrade, each user exit must be checked to ensure that it conforms
to the standard

system.

There are two types of user exit:

User exits that use INCLUDEs.

These are customer enhancements that are called directly in the program.

User exits that use tables.

These are used and managed using Customizing.

Should find the customer enhancements belonging to particular development class.

What are the different ways in which you can make changes to SAP standard software ?

Customizing

Enhancements to the SAP Standard

Modifications to the SAP Standard

Customer Developmenthttp://abap-tutorials.com 2010
What is customizing ?

Customizing is the setting of system parameters via SAP's own interface.

Why do you need enhancements ?

The standard applications do not offer some of the functionality you need. The R/3 enchancement
concept allows you to add

your own functionality to SAP's standard business applications.

What are the different types of enhancements ?

Enhancements using customer exits

Customers' potential requirements which are not included in the standard software are incorporated in
the standard as empty

modification 'shells'. Customers can then fill these with their own coding. Enhancements can relate to
programs, menus and

screens. Upward compatibility is assured. In other words, SAP guarantees that the jump from the
standard software to the exit

and the interface which call the exit will remain valid in future releases.

Enhancements to ABAP/4 Dictionary elements

These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-
specific key words

and documentation for data elements) and field exits (creation of additional coding for data elements).

What is customer development ?

Creating customer-specific objects within the customer name range.

What is SSCR ?

SSCR (SAP Software Change Registration) is a procedure, for registering all manual changes to SAP
source coding and SAP

Dictionary objects.

What is the difference between modifications and enhancements ?

Modifications mean making changes to the SAP standard functionality.

Enhancements mean adding some functionality to SAP standard functionality.
What are the disadvantages of modification ?

Modifying standard code can lead to errors

Modifications mean more work during software upgradeshttp://abap-tutorials.com 2010

What are the advantages of enhancements ?

Do not affect standard SAP source code

Do not affect software upgrades

when do you opt for modification ?

Customer exits are not available for all programs and screens within the R/3 standard applications. You
can only use exits if

they already exist within the SAP R/3 System . Otherwise you have to opt for modifications .

What are the various types of customer exits ?

Menu exits

Screen exits

Function module exits

Keyword exits

What is a menu exit ?

Adding items to the pulldown menus in standard R/3 applications .

13.What is a screen exit ?

Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special
subscreen areas within a

standard R/3 screen and calling a customer subscreen from within the standard dynpro's flow logic.

What is a function module exit ?

Adding functionality to R/3 applications. Function module exits play a role in both menu and screen
exits.

What is a keyword exit ?

Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system
displays this
documentation whenever a user presses F1 to get online help for a screen field.

How do SAP organizes its exits ?

SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement can
contain many

individual exits.

What is an add-on project ?

To take advantage of the exits available within standard R/3 applications, you need to create an add-on
project. This project

lets you organize the enhancement packages and exits you want to use. The add-on project also allows
you to hang add-on

functionality onto the exit hooks contained with SAP enhancements.
ABAP Interview Questions & Answers

Set 9

http://abap-tutorials.comhttp://abap-tutorials.com 2010

1. What is the fastest way to move one internal table to another internal table (assuming two tables of
similar

structure)?

.a) append lines of table1 to table2.

b) loop at table1.

Move: table1-field1 to table2-field1,

table1-field2 to table2-field2.

Append table2.

Endloop.

.[]c) table2[] = table1.

d) loop at table1.

Move-corresponding table1 to table2.

Endloop.

e) move table1 to table2.

2. Which one of the following is true about a function module?

a) Function modules are locally accessible objects.

b) Function modules have inbound and outbound parameters.

c) Function modules have no built-in exception handling.

d) Function modules CANNOT be created by a programmer.

e) Function modules use a shared memory area.

3.
data: field1 type I value 10.

a) field1 = 10

field1 = 8

End-of-selection.

Subtract 2 from field1.

Write: / ‗field1 =‘, field1.

Start-of-selection.

Add 5 to field1.

Write: / ‗field1 =‘, field1.http://abap-tutorials.com 2010

Initialization.

Field1 = 5.

Write: / ‗field1 =‘, field1.

What is the result after executing the above code?

b) field1 = 8

field1 = 14

field1 = 5

c) field1 = 5

field1 = 3

field1 = 8

d) field1 = 5

field1 = 10

field1 = 8

e) field1 = 8

field1 = 14

4. Which one of the following commands is used in drill-down reporting?
a) AT LINE-SELECTION

b) MODULE SET_SCREEN

c) LEAVE SCREEN

d) END-OF-PAGE

e) ON VALUE-REQUEST

5. What is an object which CANNOT be transported?

a) A local object

b) A change request

c) A development object

d) A class

e) A taskhttp://abap-tutorials.com 2010

6. A GUI-Status is created in which transaction?

a) Flow Logic

b) Menu Painter

c) GUI Painter

d) Screen Painter

e) Status Painter

7. Which one of the following statements creates a GUI-status in a dialog program?a) set pf-status
‗0100′.

b) set screen ‗0100′.

c) set gui-status ‗0100′.

d) set gui-status = ‗0100′.

e) set status ‗0100′.

8. Dialog programs have which naming convention?

a) ZPBOxxx

b) SAPMZxxx
c) ZDIAxxx

d) ZPAIxxx

e) Zxxx

9. Which dictionary structure contains system fields?

a) SYSTEM

b) SYTAB

c) SYSThttp://abap-tutorials.com 2010

d) SY

e) SYS

10.

a) 1

An internal table ICODE contains the following entries:

field1 field2

–————

John 12345

Alice 23478

Sam 54321

Bob 10000

IF NOT ICODE[] IS INITIAL.

SORT ICODE BY FIELD1 DESCENDING.

READ TABLE ICODE WITH KEY FIELD1 = ‗Sam‘.

WRITE: / SY-TABIX.

ENDIF.

What is the output of the above code after execution?

b) 2
c) 3

d) 4

e) Sam

11.

a) 4

Data: number type i.

while number < 10.

Add 1 to number.

If number < 8.

Continue.

Else.

Add 4 to number.

Endif.http://abap-tutorials.com 2010

Endwhile.

Write number.

What does NUMBER equal after executing the above code?

b) 8

c) 10

d) 12

e) 14

12. Which one of the following statements would occur in the PBO of a dialog program using table
control?

a) loop at itab.

b) loop at itab with control itab_tc.

c) module exit at exit-command.

d) module user_command.
e) set screen ‗0100′

13.

data: begin of itab occurs 0,

field1(10),

field2(10),

end of itab.

a) A B

AB

BB

A

Move: ‗A‘ to itab-field1,

‗B‘ to itab-field2.

Append itab.

Append itab.

Move: ‗B‘ to itab-field1.

Append itab.

Clear itab.

Move: ‗A‘ to itab-field2.

Append itab.http://abap-tutorials.com 2010

What are the contents of itab after executing the above code?

b) A B

AB

B

A

c) A B
B

A

d) A B

BA

A

e) A B

BA

BA

BA

14. When debugging a BDC session, which command is used to exit the session?

a) /n

b) /bend

c) /nexit

d) /nquit

e) /exit

15. Which system field returns the number of records returned after a select?

a) sy-index

b) sy-recno

c) sy-lncnt

d) sy-dbcnt

e) sy-tabixhttp://abap-tutorials.com 2010

16. Which statement regarding Logical databases is FALSE?

a) Logical databases use a tree structure.

b) Logical databases use a standard selection-screen for selection criteria.

c) More than one logical database can be used in a report.
d) Any change to a logical database is reflected in all reports using that logical database.

e) Logical databases simplify and encapsulate data retrieval

17. Which one of the following is an example of an asynchronous update?

a) modify ztable from wa.

b) update ztable set field1 = ‗123′.

c) update ztable from ztable.

d) insert wa into ztable.

e) call function ‗update_table‘ in update task

18. Which return code is associated with a failed authority check due to lack of user authorization for
the chosen

action?

a) 0

b) 4

c) 8

d) 12

e) 24

19. Which transaction is used to monitor, release, and reprocess BDC sessions?

a) SM36

b) SE37

c) SE35http://abap-tutorials.com 2010

d) SP35

e) SM35

20. What is the structure for the following select-options? Select-options: zname like ztable-name.

a) zname-sign

zname-value

zname-low
zname-high

b) zname-low

zname-high

zname-pattern

c) zname-sign

zname-option

zname-low

zname-high

d) zname-sign

zname-option

zname-low

e) zname-sign

zname-option

zname-low

21. Which of the following are elementary types in ABAP?

a) C,D,F,H,I,N,P,T

b) C,D,F,I,N,P,Q,T

c) A,D,F,I,N,P,T,X

d) A,D,F,H,N,P,T,X

e) C,D,F,I,N,P,T,X

22.a) 1 1

33

44

4 4http://abap-tutorials.com 2010

data: f1 type I value 1,
f2 type I value 1.

Write: / f1, f2.

Do 2 times.

Perform scope.

Enddo.

Write: / f1, f2.

Form scope.

Data: f1 type I value 2,

f2 type I value 2.

Add: 1 to f1, 1 to f2.

Write: / f1, f2.

Endform.

What is the output of this program after execution?

b) 1 1

22

33

11

c) 1 1

33

33

33

d) 1 1

22

33

33
e) 1 1

33

33

11

23. Program specs call for screen 100 to appear in a modal dialog box.

a) The addition ‘starting at X‘ is left out.

PAI

————http://abap-tutorials.com 2010

module do_something.

If field1 = ‗X‘.

Call screen ‗0100′.

Endif.

Endmodule.

Why does the above code fail to produce a modal box?

b) The screen should be numbered 900.

c) The code must occur in the PBO.

d) The screen is of the wrong type.

e) Screens are not called within modules.

24. Field-symbols are defined in which of the following ways?

a) field-symbols f1 for f1.

b) field-symbols [f1].

c) field-symbols like f1.

d) field-symbols (f1) like f1.

e) field-symbols {f1}.

25.
a) Line 2

1 TABLES: MARC.

2 DATA: BEGIN OF ITAB OCCURS 0,

3 FIELD1(5),

4 FIELD2(5),

5 END OF ITAB.

6 READ ITAB WITH KEY MATNR = ‗12345′.

7 IF SY-SUBRC = 0.

8 WRITE:/ ITAB-MATNR.

9 ENDIF.

Referring to the above code, which line contains an error?http://abap-tutorials.com 2010

b) Line 5

c) Line 6

d) Line 7

e) Line 8

26.

Loop at itab.

Write itab.

Endloop.

From where is the written line derived in the above loop statement?

a) The table work area

b) sy-subrc

c) sy-index

d) The table header

e) sy-lisel
27.

a) Icode-field2 must be a numeric field.

An internal table icode contains the following entries:

Field1 Field2

–————

John 12345

Alice 23478

Sam 54321

john 50000

DATA: BEGIN OF ICODE OCCURS 0,

FIELD1(5),

FIELD2(5),

END OF ICODE.

READ TABLE ICODE WITH KEY FIELD1 = ‗John‘ BINARY SEARCH.http://abap-tutorials.com 2010

Why does executing the above code return a sy-subrc of 4?

b) The internal table has an incorrect structure.

c) Both internal table fields must be used in the search.

d) The internal table must be sorted first.

e) ‗John‘ should not be capitalized.

28.

a) 26

Data: pos like sy-index,

index(1).

do 10 times.

Check sy-index between 2 and 6.
Add 1 to pos.

Move sy-index to index.

Write at pos index.

Enddo.

What is the output of the above code after execution?

b) 1789

c) 23456

d) 132578910

e) 178910

29. Dialog programs are of which type?

a) Type B

b) Type 1

c) Type *

d) Type M

e) Type Shttp://abap-tutorials.com 2010

30.

a) f1: ‗Test Variant‘

f2: ‗ariant‘

f3: ‗ ariant‘

data: f1(12) type c value ‗Test Variant‘,

f2(6) type c,

f3(8) type c.

Move: f1 to f2,

f2 to f3.

What do f1, f2, and f3 contain after executing the above code?
b) f1: ‗Test Variant‘

f2: ‗ariant‘

f3: ‗ Variant‘

c) f1: ‗Test Variant‘

f2: ‗Test V‘

f3: ‘st Varia‘

d) f1: ‗Test Variant‘

f2: ‗Test V‘

f3: ‗Test V ‗

e) f1: ‗Test Variant‘

f2: ‗Test V‘

f3: ‗Test Var‘

31.

a) Lines 1 and 4

1. Data: Begin of itab occurs 0,

field1,

End of itab.

2. Data: Itab1 like itab occurs 0.

3. Data: Itab1 type itab occurs 0.

4. Data: Begin of itab1 occurs 0.

Include structure itab.

Data: End of itab1.

Which of the above statements code internal tables with a header line?http://abap-tutorials.com 2010

b) Lines 1 and 3

c) Lines 2 and 4
d) Lines 1 and 2

e) Lines 2 and 3

32. Which one of the following SQL statements does NOT lock the affected database entries ?

a) select *

b) Insert

c) Delete

d) select single for update

e) modify

33.a) 1 2 3 D

234

345D

456D

789d

data: begin of itab occurs 0,

num1 type I,

num2 type I,

num3 type I,

mark,

end of itab.

Delete from itab where mark eq ‗D‘.

Itab entries:

123D

234

345D

456D
789d

789D

Given the ITAB entries, what are the contents of ITAB after executing the above code?http://abap-
tutorials.com 2010

b) 2 3 4

c) 7 8 9 d

789D

d) 2 3 4

345D

456D

789d

789D

e) 2 3 4

789d

34.

a) 3 3

11

44

11

data: f1 type I value 1,

f2 type I value 1.

Do 2 times.

Perform scope.

Enddo.

Form scope.

Statics: f1 type I value 2,
f2 type I value 2.

Add: 1 to f1, 1 to f2.

Write: / f1, f2.

Perform scope2.

Endform.

Form scope2.

Write: / f1, f2.

Endform.http://abap-tutorials.com 2010

What is the output of the above program after execution?

b) 3 3

33

33

33

c) 3 3

33

44

44

d) 3 3

00

44

00

e) 3 3

11

44

33
35. An ABAP Screen is created in which transaction?

a) Screen Editor

b) Screen Painter

c) Menu Painter

d) ABAP Editor

e) Status Painter

36. Data written to the database would be reversed under which of the following circumstances?

a) Dequeue

b) Enqueue

c) Commit

d) Message Xnnnhttp://abap-tutorials.com 2010

e) End of Transaction

37. Program specifications ask for error checking on a selection-screen which contains a parameter
inside a

frame.

a) at selection-screen on block b1

b) selection-screen check block b1

c) at selection-screen

d) selection-screen on field f1

e) check selection-screen

38. Table ztest has a secondary index on the following fields:

a) Indexes are not allowed on Z tables

tnum, tcode.

Select * from ztest where tnum ne ‗123′ and tcode = ‗456′.

Why is the index not used in the above case?

b) Variables must be used, NOT literals
c) Select individual fields, not select *

d) Client is not in the where clause

e) NE invalidates the use of an index

39. An internal table has two fields :

a) select field1 field2 into (itab-field1, itab-field2)

from ztable where field1 = ‗10′.

Append itab.

Endselect.

Field1

Field2

Which of the following is the fastest way to fill an internal table of the structure above.http://abap-
tutorials.com 2010

b) select * from ztable

where field1 = ‗10′.

Move ztable to wa.

Append itab from wa.

Endselect.

c) select * into corresponding-fields of itab

from ztable where field1 = ‗10′.

d) select * from ztable

where field1 = ‗10′.

Append itab.

Endselect.

e) select * into table itab from ztable

where field1 = ‗10′.

40. Update Bundling can occur within which of the following?
a) Within dialog tasks and dequeue processes

b) Within dialog and update tasks

c) Within enqueue processes

d) Within enqueue and dequeue processes

e) Within update tasks and enqueue processes

41.

a) 1

data: begin of itab occurs 0,

field1,

end of itab.

Do 3 times.

Append initial line to itab.

Append ‗X‘ to itab.

Enddo.

Describe table itab.

Write: sy-tfill.http://abap-tutorials.com 2010

What is the value of sy-tfill after executing the above code?

b) 2

c) 3

d) 6

e) 12

42.

Loop at zinfo.

At new name.

Sum.
Write: / zinfo-id, zinfo-name, zinfo-sales.

Endat.

Endloop.

Table zinfo Entries:

——————– a1 Smith 100.00 50.00

Field Type a1 Jones 100.00 50.00

——————– a2 Bob 100.00 50.00

id C a3 Bob 100.00 50.00

name C a4 Mike 100.00 50.00

sales P a5 Mary 100.00 50.00

sales2 P a5 Mary 100.00 50.00

Using the above information, what is the result of the following code?

a) a1 Smith 100.00

a1 Jones 100.00

a2 Bob 100.00

a3 Bob 100.00

a4 Mike 100.00

a5 Mary 200.00

b) a1 Smith 100.00

a1 Jones 100.00

a2 Bob 200.00

a4 Mike 100.00

a5 Mary 100.00

c) a1 Jones 200.00

a2 Bob 200.00http://abap-tutorials.com 2010
a4 Mike 100.00

a5 Mary 100.00

a5 Mary 100.00

d) a1 Jones 200.00

a2 Bob 200.00

a4 Mike 100.00

a5 Mary 100.00

e) a1 Smith 200.00

a2 Bob 100.00

a3 Bob 100.00

a4 Mike 100.00

a5 Mary 200.00

43. Which one of the following is an INCORRECT form of the WRITE statement?

a) write x no-sign.

b) write x no-decimals.

c) write x left-justified no-gap.

d) write x no-zero.

e) write x under y currency us.

44.

a) 2

1. Data: Begin of imara occurs 0.

2. Include structure mara.

3. Data: End of imara.

4 Data: number like mara-matnr.

5. Select * into table imara
6. From mara where matnr = number.

7. If sy-subrc = 0.

8. Write:/ imara.

9. Endif.

10. Endselect.

Which line in the above code contains a syntax error?http://abap-tutorials.com 2010

b) 5

c) 6

d) 8

e) 10

45.

a) D

data: field1(4) type c value ‗ABCD‘.

if field1 co ‗ABCD‘.

endif.

What is the value of sy-fdpos after this block of code is executed ?

b) 4

c) ABCD

d) A

e) 0

46. Which statement is INCORRECT when referring to SAP memory or ABAP memory?

a) ABAP memory is only stored during the lifetime of an external session.

b) You can use ABAP memory to pass data between internal sessions.

c) SAP memory is also referred to as Global Memory.

d) SAP memory is available across transactions.
e) IMPORT/EXPORT (TO MEMORY) statements are used for SAP memory.

47. A standard type internal table ICODE contains the following entries:

field1 field2

-————

001 New York

002 Bostonhttp://abap-tutorials.com 2010

003 Houston

008 Denver

010 San Diego

020 Seattle

READ TABLE ICODE WITH KEY FIELD1 = ‘015′ BINARY SEARCH.

WRITE: / SY-TABIX.

What is the value of sy-tabix after executing the above code?

a) 0

b) 2

c) 5

d) 6

e) 7

48.

data: field1 type I value 10.

End-of-selection.

Subtract 2 from field1.

Write: / ‘field1 =’, field1.

Start-of-selection.

Add 5 to field1.
Write: / ‘field1 =’, field1.

Initialization.

Field1 = 5.

Write: / ‘field1 =’, field1.

What is the result after executing the above code?

a) field1 = 5

field1 = 10

field1 = 8

b) field1 = 8

field1 = 14http://abap-tutorials.com 2010

c) field1 = 10

field1 = 8

d) field1 = 5

field1 = 3

field1 = 8

e) field1 = 8

field1 = 14

field1 = 5

49.

data: f1 type I value 1,

f2 type I value 1.

Do 2 times.

Perform scope.

Enddo.

Form scope.
Statics: f1 type I value 2,

f2 type I value 2.

Add: 1 to f1, 1 to f2.

Write: / f1, f2.

Perform scope2.

Endform.

Form scope2.

Write: / f1, f2.

Endform.

What is the output of the above program after execution?

a) 3 3

11

44

33

b) 3 3

3 3http://abap-tutorials.com 2010

44

44

c) 3 3

33

33

33

d) 3 3

11

44
11

e) 3 3

00

44

00

50.

Table ZNAME Table ZINFO

–———————— -————

field key field key

–———————— -————

mandt X mandt X

id X id X

lname X dept

fname X division

address

phone

fax

Using the above table definitions, which one of the following selects uses proper syntax?

a) select * from zinfo where id = ‗0025′.

Loop at zinfo.

Write: / id.

Endloop.

Endselect.

b) select mandt id lname into (client, id, lname)

from zname where id = ‗0025′.http://abap-tutorials.com 2010
Write: / id.

Endselect.

c) select * into table itab from zname

where id = ‗0025′.

Select * from zinfo for all entries in itab

where id = itab-id.

Write: / zinfo-dept.

Endselect.

d) select a~id a~lname a~fname b~dept into table itab

from zname as a INNER JOIN zinfo as b

on a~id = b~id

where lname = ‗Smith‘.

Loop at zname.

Write: / zname-id, zname-lname.

Endloop.

e) select count ( id ) sum ( lname ) into (num, lname)

from zname where id = ‗0025′.

Write: / num, lname.

Endselect.

51. Which one of the following statements is FALSE?

a) Local objects CANNOT be transported to another instance.

b) After a CHANGE REQUEST is released, no further changes to its‘ objects are allowed.

c) Development classes can be viewed by using transaction SE80.

d) A CHANGE REQUEST contains objects that can be transported to QA-PRD.

e) A CHANGE REQUEST only contains one task.
52. Which one of the following statements would occur in the PBO of a dialog program using table
control?

a) loop at itab with control itab_tc.

b) loop at itab.

c) set screen ‗0100′.

d) module user_command.http://abap-tutorials.com 2010

e) module exit at exit-command

53.

data n type i.

do 5 times.

If n > 0 and n < 5.

n = n + 1.

elseif n = 5.

n = n - 5.

else.

n = n - 1.

endif.

enddo.

Write: / n.

If n = 3, what is the output of this code after execution?

a) 2-

b) 1-

c) 0

d) 3

e) 5
54. You have added an append structure to a standard SAP table. What happens to the standard table
when a

new version of the table is imported during an upgrade?

a) The standard table is returned to standard.Therefore, the append structure must be manually re-
applied

b) The append fields are automatically appended to the table upon activation but you must still convert
the table

c) All append structures are deleted. A new append structure must be created and then appended to the
standard table

d) When the standard tables are activated, the append structure is automatically appended to the
standard table

55. What can you NOT attach a search help to?

a) typehttp://abap-tutorials.com 2010

b) field of a table

c) check table

d) data element

e) table

56. Which of the following does not physically exist in the underlying database? More than one answer
is

correct.

a) View

b) Internal table

c) Structure

d) Transparent Table

e) Domain

57. What conditoins apply for a LEFT Outer Join in OPEN SQL?

a) Only ‗Or‘ can be used as a logical operator in the ON condition

b) A join statement is found to the right of the join operator
c) At least one field from the table on the right is required for comparison in the ON condition

d) A Left Outer Join is not permitted in OPEN SQL

58. What is true about a check table?

a) Foreign key fields can accept only values which exist in the check table

b) Check table fields can accept only values which exist in the check table

c) Foreign key fields can accept any values regardless of the check table

d) Check tables are not used for restricting values in the foreign key tables

59. Full buffering would be appropriate for what type of tables?

a) Small Static tableshttp://abap-tutorials.com 2010

b) Transaction Tables

c) Tables with generic Keys

d) Internal Tables

60. Where does information come from when you press F1 on a screen field?

a) Domain short text

b) Search help

c) Data element documentation

d) Domain Help values

61. What are the main functions of a Data Dictionary? More than one answer is correct.

a) To insulate the ABAP/4 developer from the database

b) To support the creation and management of metadata (data about data)

c) To provide data security at the application level

d) To connect to the operating system

62. Structure MY_STRUCTURE is created in the dictionary. When does the structure get created in the

underlying database ?

a) At the beginning of the table creation
b) When the database administrator physically creates the table

c) When the table is activated

d) At the end of the table creation after it is saved.

e) It does not correspond to an object in the underlying database and does not get created

63. What is the recommended method to modify a standard search help to include customer defined
search

paths?

a) Add an elementary search help to the standard search helphttp://abap-tutorials.com 2010

b) Enhance the standard search help with an append search help

c) Add a collective search help to the standard search help

d) Perform a modification to the standard search help

64. Where are Dictionary runtime objects used ?

a) in the dictionary

b) in structures

c) in table ―nametab‖

d) in work processes

65. If you want a subroutine U to have a formal parameter P that is used to return a value to the actual

parameter . Which of the following definitions of U would you use to ensure that the value is passed
back to the

calling program only if the processing of U ends normally and is not terminated with a message
statement ?

a) Form U changing P.

b) Form U using P.

c) Form U changing value(P).

d) Form U using value(P).

e) Form U using P local P.
66. You want to go from dialog processing to list processing using a selection screen . Which statements
would

you use?

a) call screen .

b) read list.

c) call transaction .

d) leave to ist processing followed by call selection-screen .

e) selection-screen followed by parameters.http://abap-tutorials.com 2010

67. Which component on the application server controls the data traffic between work process and
presentation

server?

a) SapGui.

b) message handler.

c) dispatcher.

d) Dynpro processor.

e) frontend processor.

68. Which options exist for extending a table without having to modify a table within the ABAP
Dictionary?

More than one answer is correct.

a) append fields to the table.

b) use append structures.

c) use customer includes.

d) CI includes.

e) Insert new table fields.

69. Which of the following steps should be carried out in a transaction that implements updates ? More
than one

answer is correct.
a) read the record that is to be updated.

b) lock the record that is to be updated.

c) pass the changed data to the update process.

d) unlock the record that is to be updated.

e) call the Abap command commit work.

70. Which enhancements planned by SAP are maintained in transaction CMOD (SAP enhancements)?
More

than one answer is correct.

a) Table appendshttp://abap-tutorials.com 2010

b) Menu exits

c) function module exits

d) User exits

e) Screen exits

71. Why would you group corrections together? More than one answer is correct.

a) To enable several corrections to be assigned to the same transport.

b) To transport objects from different development classes.

c) To prevent other developers from processing the same objects.

d) To enable several developers to process the same object in parallel.

e) To retain versions of several objects together.

72. Which statements are allowed if you are working with an internal table of type sorted? More than
one

answer is correct.

a) Append

b) Collect

c) Sort

d) Read
e) Modify

73. How can you set the status and title for a modal dialog box?

a) In the attributes of the corresponding screen.

b) Before the corresp. call screen statement.

c) In a PBO module of the corresponding screen.

d) In the PAI module of the corresponding screen.

74. Which ABAP datatype would you use for calculations which reqhttp://abap-tutorials.com 2010

uire high degree of precision?

a) P

b) I

c) F

d) N

e) X

75. Which of the following statements about R/3 instances are correct? More than one answer is
correct.

a) An R/3 instance is an administrative unit that combines together all the components of a R/3 system
that provide one

or more services.

b) A central R/3 system consists of one or more Instances.

c) Each instance has its own SAP buffer area.

d) Each instance contains at least one dialog service .

76. Where can you find the SET/GET parameters that has been assigned to a screen field? More than
one

answer is correct.

a) in table TPARA.

b) in the object list of the module pool.

c) in the F1 help for the screen field under technical info.
d) in the field list of the screen in the screen painter.

e) in the window with possible values.

77. Which letters are allowed to be the first letter in the names of customer defined tables,structures
and global

types? More than one answer is correct.

a) Y

b) Z

c) Whttp://abap-tutorials.com 2010

d) T

78. What must you do to undo DB changes previously issued in a dialog? More than one answer is
correct.

a) output E message.

b) perform rollback work.

c) raise exception.

d) Analyze log record.

e) code rollback LUW.

79. An update function module VF is called within subprogram VU .The program contains the call , VU on

commit . At which point are the parameters for the update function VF evaluated ?

a) when perform is executed

b) at the beginning of function

c) at commit work

d) at start of v1 update

e) at the end of the dialog step

80. Which events and statements determine the end of an SAP LUW in an online program with
synchronous

update? More than one answer is correct.

a) call function in update task
b) the start of the next dialog step

c) commit work (explicit)

d) call screen

e) leave to list processing

81. What methods can be used to set the values for printing an online list? More than one answer is
correct.

a) Include SET_PRINT_PARAMTERShttp://abap-tutorials.com 2010

b) Function SET_PRINT_PARAMETERS

c) NEW-PAGE PRINT ON

d) Function GET_PRINT_PARAMETERS

82. What does a LDB(Logical Database) provide?

a) Consistent and flexible user interface

b) Central performance improvements for update accesses

c) A method to access the data in a random manner

d) Centrally defined authorization checks

83. When you EXPORT an internal table that has a header line to ABAP/4 memory, what is the result?

a) Only the contents of the internal table is stored

b) Only the header line is stored

c) The header line and contents of the internal table are stored

d) You cannot EXPORT an internal table with a header line.

84. Which Report Statement option determines the width of a list?

a) Line-Size

b) Line-Count

c) Line-Width

d) Report Size
85. What happens to memory when the Export is executed without specifying ID. i.e EXPORT object to
memory

?

a) The ABAP memory is completely overwritten

b) SAP Memory is overwritten

c) ABAP memory sets up a new default areahttp://abap-tutorials.com 2010

86. Mark the valid values for a checkbox . More than one answer is correct.

a) Any Alpha Character

b) Space

c) 0

d) 1

e) X

87. When does the processing block for a Get statement end?

a) When the next keyword event is encountered

b) When all data has been retrieved for the Get

c) After each PUT in the LDB

d) When the END GET statement is encountered

88. What technique would you use to fix the 10 leftmost columns on a list when scrolling to the right?

a) Set Left Scroll-Boundary Column 10

b) Set Right Scroll-Boundary Column 10

c) Scroll List PS+<10>

d) Scroll List Left

89. When does the system reset the formatting on a Write statement?

a) When explicitly changed using the Format statement

b) At any New Event

c) Using the Reset option of the Format statement
d) All of the above

90. Which type is not a valid GUI Status type?http://abap-tutorials.com 2010

a) Online(Dialog) Status

b) List Status

c) Dialog Box

d) Context Menu

91. What does the following code achieve?

At Selection-Screen on value-request for sales.

Call screen 100.

a) When the user presses F4, Screen 100 is displayed in addition to the normal help screen

b) When the user presses F1, Screen 100 is displayed instead of the normal possible values search help

c) When the user presses F4, Screen 100 is displayed instead of the normal possible values search help

d) When the user presses F1, Screen 100 is displayed in addition to the normal help screen

92. Which of the following are valid logical database types? More than one answer is correct.

a) Table

b) Structure

c) File

d) Complex Data Object

e) Node

93. Program A issues the following statement SUBMIT PROGRAM B. What takes place?

a) Program B becomes active in the same internal session of Program A

b) Program A becomes active in the same internal session of Program B

c) Program B runs in a new internal session

d) User Context is flushedhttp://abap-tutorials.com 2010

94. What is the code required in order to scroll the 3rd detail list to page 5 ?
a) Scroll LIST 3 5

b) Scroll LIST Index 3 to Page 5

c) Scroll LIST sy-index 3 to Page 5

d) Scroll LIST sy-lsind 3 to Page 5

95. For called program components that are of type transaction or report, what is true about the roll
area

(assuming processing will resume in the calling program).

a) They run in their own roll area

b) They run in the roll area of the caller

c) Share the same roll area

96. Select the line that would execute in the following code after the EXIT statement

10 get spfli.

20 * Processing of SPFLI records

30 write: spfli-carrid, spfli-connid.

40 counter = counter + 1.

60 if counter > 1.

70 Exit.

80 endif.

90 write:/ ‘No more processing for this Carrier’.

100 get sflight.

110 write: sflight-fldate, spfli-price.

120 end-of-selection.

130 write: / text-002, text-003.http://abap-tutorials.com 2010

a) 80

b) 100

c) 120
d) 130

e) Exits the Program

97. What is not a valid functional area type?

a) LDB

b) Sequential Data Set

c) Program

d) Search Help

e) Joined Tables

98. Which is not a valid option of the Write Statement?

a) NO-GAP

b) Input

c) Centered

d) Under

e) No-Zero

f) As RadioBox

99. What are the 3 main sub objects of a LDB? More than one answer is correct.

a) Structure

b) Selection Screen

c) Search Helpshttp://abap-tutorials.com 2010

d) Tables

e) DB Program

100. What is needed to ensure a check field is verified against the referenced key field of the check
table?

a) same data element is required for check field and referenced field

b) same domain is required for check field and referenced field

c) same data type only is required for check field and referenced field
d) all key fields MUST have domain equality between check table andn foreign key table

101. What is true about the primary index of a table? More than one answer is correct.

a) The key fields of the table make up the primary index

b) The primary index ID is designated by the Database Adminstrator

c) The developer designates the fields to be used as the primary index

d) The primary index is automatically created when the table is activated

102. Which of the following gets stored as a Runtime Object?

a) Programs

b) Tables

c) Aggregate Objects

d) Fixed Values belonging to a domain

103. When is it better to buffer the table?

a) When a table is read infrequently

b) When a table is read frequently and the data seldom changes

c) When a table is read frequently and the data is always changing

d) When a table is linked to check tableshttp://abap-tutorials.com 2010

104. Identify the different type categories in the ABAP dictionary. More than one answer is correct.

a) Data Elements

b) Structures

c) Data definitions

d) Table Types

e) Data Models

105. What is true about views? More than one answer is correct.

a) A view is automatically created on the database upon activation

b) A view contains data
c) Maintenance Views are not updateable

d) Views can be buffered

106. Identify the case where table buffering should be set off.

a) When the most current data is required

b) When the most current data is not required

c) For Small Static non volatile tables

d) For Global Master Data

107. Table T1 wants to ensure that the key field t1-fielda entered is valid against a field t2-fielda in table
T2.

Which is the foreign key table?

a) T1

b) T2

c) T3 from the dictionary

d) Cannot be determined

108. Identify the one addition that is not part of the interface of a methodhttp://abap-tutorials.com
2010

a) Importing

b) Result

c) Exception

d) Returning

109. What is the effect when a CLEAR statement is used on an internal table without header line?

a) The work area is intitialized

b) All the lines of the table are deleted

c) All the lines of the table are initialized

d) Nothing

110. What is the default mode for passing actual parameters in a Perform?
a) By Value

b) By Reference

c) By Changing

111. In the case of a function, Identify the item that is not a valid interface element.

a) Import parameters

b) Export parameters

c) Tables

d) Source Code

e) Exceptions

112. How would you clear the body of an internal table (with a header line). More than one answer is
correct.

a) Clear ITAB[]

b) Refresh ITAB []http://abap-tutorials.com 2010

c) Clear ITAB

d) Refresh ITAB

113. When catching errors using the CATCH…ENDCATCH statement, where does the runtime error
return

code get placed?

a) sy-subrc

b) sy-fdpos

c) error class

d) system-exceptions

114. What is the value of ZFIELDB after the last line of the following code is executed?

Data: ZFIELDA(5) type c value ‘ABCDE’.

ZFIELDB(4) type c.

ZFIELDA = ‘XX’.
Clear ZFIELDA.

ZFIELDB = ZFIELDA.

a) ABCDE

b) Spaces

c) ABCD

d) BCDE

115. Mark the valid use of the data statement. Assume that ZBOOK-ID is a dictionary object.

a) Data fielda value zbook-id

b) Data fielda type c like zbook-id

c) Data fielda(5) like zbook-id

d) Data fielda like zbook-idhttp://abap-tutorials.com 2010

116. Assuming you have created a data object of type c with the name ZFIELDA in your program. Which
of the

following is allowed?

a) Data: ZFIELDA type n

b) Types: ZFIELDA type I

c) Data: ZFIELDA type c

d) Constants: ZFIELDA type n

117. What do search statements REPLACE, SHIFT, CONCATENATE, SPLIT have in common? More than

one answer is correct.

a) They all set sy-subrc

b) They all set sy-fdpos

c) They all distinguish between upper and lower case

d) They all treat the operands as type C regardless of their actual type

e) The actual type of each operand determines how the string processing is performed

118. What are valid uses of a variant? More than one answer is correct.
a) Hiding input fields

b) Pre-assigning values

c) Input validation

d) Security checking

119. How can you perform a direct database read from a buffered table?

a) Do not have buffering in the technical attributes

b) Add the BYPASSING BUFFER clause on the select statement

c) Buffering can be turned off on the application server by the programmer using the ABAP Workbench

120. What is the Effect of not Typing Formal parameters in a Form?http://abap-tutorials.com 2010

a) Conversion always occurs

b) Conversion never occurs

c) Forms are more flexible but prone to a short dump if conversion does not work

d) No effect

e) Forms are less flexible and are guaranteed no chance of a run time error

121. What requirement exists if a field is defined in the dictionary of type CURR?

a) The field must be numeric

b) Decimals must be defined in the domain

c) The field must be linked to another field of type CUKY

d) No other requirement exists

122. Which of the following is not a valid ABAP data statement?

a) Data fielda(5) type c

b) Data fielda(5) type n

c) Data fielda(5) type t

d) Data fielda(5) type x

123. What is the result of the following date calculation? Assume current date is 20001220.
Data: Today(8) type C.

Today = sy-datum.

Today = 10.

a) 10

b) 20001220

c) 10001220http://abap-tutorials.com 2010

d) 20011210

124. Mark the default size for a packed field

a) 1

b) 2

c) 4

d) 8

e) size must be specified

125. Refer to the following Code. What is the value of sy-fdpos and sy-subrc after the search is
executed?

Data: mystring type c value ‘ARAMCO’.

Search mystring for ‘X’

a) sy-fdpos = 0 and sy-subrc = 0

b) sy-fdpos = 0 and sy-subrc = 4

c) sy-fdpos = 4 and sy-subrc = 0

d) sy-fdpos = 4 and sy-subrc = 4

126. What is true of passing by value and result in the following code? More than one answer is correct.

Perform calculate_sales using amount.

FORM calculate_sales changing value(f_amount)

a) Formal Parameter f_amount is allocated it‘s own memory space

b) The address of the actual parameter is passed to the formal parameter
c) Formal parameter is copied to memory space of actual parameter at the end of the form

d) Formal parameter is not copied to memory space of actual parameter

127. Define a Logical Database.http://abap-tutorials.com 2010

a) An ABAP/4 Reading Program used to read and process data

b) A method to update data

c) A Reporting Tool

d) Defintion of a Relational Data Model

128. What happens if message E046 is raised?

At Selection-Screen on sales.

If sales-low < 500.

Message E046.

Endif.

a) The initialization event is fired again

b) Field Sales is open for input and all other fields are not available for input

c) All fields are open for input and cursor is positioned on field sales

d) The program ends

129. What is a structured type in the ABAP dictionary that has no physical table defintion in the
underlying

database referred to as?

a) table

b) structured data type

c) structure

d) table type
ABAP Interview Questions & Answers

Set 10

http://abap-tutorials.comhttp://abap-tutorials.com 2010

1)       What is SAP R/3?

Ans SAP R/3 refers to Systems Application and Product for data processing Real-time having a 3 tier
architecture i.e.

Presentation layer, Application layer and Database layer.

2)       What are the programming standards followed?

3) What are the contents in technical specifications?

Ans There are five contents in Technical Settings: Data Class, Size Category, Buffering Permission,
Buffering Type and Logging.

4)       What is an instance?

Ans When you call a function module, an instance of its function group plus its data, is loaded into the
memory area of the

internal session. An ABAP program can load several instances by calling function modules from different
function

groups.

5)       How to take care of performance in ABAP Development?

6) What is Function group? Difference between function group and function module?

Ans      Function Groups act as containers for Function Modules that logically belong together.

         Function Groups

1)    These cannot be defined in a Function Module.

2) It cannot be called.

3) They are containers for Function Module.

Function Modules
1)   These must be defined in a Function Group.

2) It can be called from any program.http://abap-tutorials.com 2010

3)   They are not containers for Function Group.



7)     What is the difference between 'Select single * ' and 'Select upto 1 rows'?

Ans ‘Select single *’ – The result of the selection should be a single entry. If it is not possible to
identify a unique entry, the

system uses the first line of the selection. For e.g.

       DATA : ITAB TYPE ZREKHA_EMP.

       SELECT SINGLE * FROM ZREKHA_EMP INTO ITAB

WHERE EMPNO = ‘00101’ AND DEPTNO = ‘0010’.

WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO.

       Select upto 1 rows -

8)     What Function does data dictionary perform?

Ans Central information repository for application and system data. The ABAP Dictionary contains
data definitions (metadata)

that allow you to describe all of the data structures in the system (like tables, views, and data types) in
one place. This

eliminates redundancy.

9)     Difference between domain and data element? What are aggregate object?

Ans Domain - Specifies the technical attributes of a data element - its data type, length, possible
values, and appearance on

the screen. Each data element has an underlying domain. A single domain can be the basis for several
data elements.

Domains are objects in the ABAP Dictionary. http://abap-tutorials.com 2010

      Data Element - Describes the business function of a table field. Its technical attributes are based
on a domain, and its

business function is described by its field labels and documentation.
Aggregate Object – Views, Match Code and Lock objects are called aggregate objects because they are
formed from

several related table.

10)     What is view? Different types of view. Explain?

Ans View - A view is a virtual table containing fields from one or more tables. A virtual table that does
not contain any data,

but instead provides an application-oriented view of one or more ABAP Dictionary tables.

          Different Types of View:

1)    Maintenance

2)    Database – It is on more than two tables.

3) Projection – It is only on one table.

4) Help

11)     Can u print decimals in type N? What is difference between float and packed data type?

Ans    No, we cannot print decimals in type N because decimal places are not permitted with N

data type.

          Float Data Type: It cannot be declared in Parameters.

Packed Number: It can be declared in Parameters. For e.g.

PARAMETERS : A(4) TYPE P DECIMALS 2,

                         B(4) TYPE P DECIMALS 2.

DATA : C(4) TYPE P DECIMALS 2.

       C = A + B.

       WRITE : / ‘THE SUM IS’ , C.http://abap-tutorials.com 2010



12)     What is step-loop? Explain all the steps?

Ans A step loop is a repeated series of field-blocks in a screen. Each block can contain one or more
fields, and can extend over

more than one line on the screen.
Step loops as structures in a screen do not have individual names. The screen can contain more than one
step-loop, but

if so, you must program the LOOP...ENDLOOPs in the flow logic accordingly. The ordering of the
LOOP...ENDLOOPs must

exactly parallel the order of the step loops in the screen. The ordering tells the system which loop
processing to apply to

which loop. Step loops in a screen are ordered primarily by screen row, and secondarily by screen
column.

Transaction TZ61 (development class SDWA) implements a step loop version of the table you saw in
transaction TZ60.

Static and Dynamic Step Loops

Step loops fall into two classes: static and dynamic. Static step loops have a fixed size that cannot be
changed at

runtime. Dynamic step loops are variable in size. If the user re-sizes the window, the system
automatically increases or

decreases the number of step loop blocks displayed. In any given screen, you can define any number of
static step loops,

but only a single dynamic one.

You specify the class for a step loop in the Screen Painter. Each loop in a screen has the attributes
Looptype

(fixed=static, variable=dynamic) and Loopcount. If a loop is fixed, the Loopcount tells the number of
loop-blocks

displayed for the loop. This number can never change.

Programming with static and dynamic step loops is essentially the same. You can use both the LOOP and
LOOP AT

statements for both types.

Looping in a Step Loop

When you use LOOP AT <internal-table> with a step loop, the system automatically displays the step
loop with vertical

scroll bars. The scroll bars, and the updated (scrolled) table display, are managed by the system.
Use the following additional parameters if desired:



                  -var> http://abap-tutorials.com 2010

13)    What is the initial value and maximum length of all data type?

Ans

Data Type Initial field length Valid field length Initial value Meaning

Numeric types

I 4 4 0 Integer (whole number)

F 8 8 0 Floating point number

P 8 1 – 16 0 Packed number

Character types

C 1 1 – 65535 ' … ' Text field (alphanumeric characters)

D 8 8 '00000000' Date field (Format: YYYYMMDD)

N 1 1 – 65535 '0 … 0' Numeric text field (numeric characters)

T 6 6 '000000' Time field (format: HHMMSS)

Hexadecimal type

X 1 1 – 65535 X'0 … 0' Hexadecimal field

14)    What are the ways to find out the tables used in the program?

Ans

15)    Can you have two detail lists from the basic list at the same time? http://abap-tutorials.com 2010

If yes how and if no why?

Ans

16)    What are the different functions used in sap script? What are the parameters used in each
Function?

Ans    There are three different functions used in SAP Script:

1)    OPEN_FORM
2) WRITE_FORM

3) CLOSE_FORM

Parameters in Each Function:

1)     OPEN_FORM –

Exporting

Form

Language

2)    WRITE_FORM –

Exportinghttp://abap-tutorials.com 2010

Element

Window

3) CLOSE_FORM

17)      What is sequence of event triggered in report?

Ans      There are 6 events in report:

1)     Initialization

2) At Selection-Screen

3) Start-of-Selection

4) Get

5) Get Late

6) End-of-Selection

7) Top-of-Page

8) End-of-Page

9) At Line Selection

10) At User Command

11) At PF (nn)
18)    What are standard layouts sets in the SAP Script?

Ans    There are four standard layouts in the SAP Script:http://abap-tutorials.com 2010

1)    Header

2) Logo

3) Main Window

4) Footer

19)    What function module upload data from application server?

Ans

20)    What are the various types of selection screen event?

Ans    SELECTION-SCREEN BEGIN OF BLOCK ABC WITH FRAME TITLE T01.



SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.

CALL SELECTION-SCREEN 500 STARTING AT 10 10.



21)    What do you know about a client?

Ans   http://abap-tutorials.com 2010

22)    What are the system fields? Explain?

Ans The ABAP system fields are active in all ABAP programs. They are filled by the runtime
environment, and you can query

their values in a program to find out particular states of the system. Although they are variables, you
should not assign

your own values to them, since this may overwrite information that is important for the normal running
of the program.

However, there are some isolated cases in which you may need to overwrite a system variable. For
example, by

assigning a new value to the field SY-LSIND, you can control navigation within details lists.

23)    What is SAP Script? What is the purpose of SAP Script? Difference between
SAP Script and Report?

Ans SAP Script – It is the integrated text management system of the SAP R/3 System. Two types – PC
Editor & Line Editor.

Reports - It is the way to display data fetched from database table onto screen or directly output it to a
printer. Two

types – Classical and Interactive.

24)      What is the use of occurs in internal table? Can u change occurs value in program?

Ans Use of Occurs - If you use the OCCURS parameter, the value of the INITIAL SIZE of the table is
returned to the variable <n>

               Data : Begin of ITAB occurs 0,

               End of ITAB.http://abap-tutorials.com 2010

Occurs or Initial Size – to specify the initial amount of memory that should be assigned to the table.

         Yes, we can change the occurs value in program but output remains the same.

25)      Difference between SY-TABIX and SY-INDEX? Where it is used?

Can u check SY-SUBRC after perform?

Ans SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for
index tables. The field is

either not set or is set to 0 for hashed tables.

                    -TABIX to the index of the last line of the table, that is, it contains the overall number
of entries in the

table.

                    -TABIX to the index of the existing or inserted line in the table. If the table has the type
HASHED TABLE,

SY-TABIX is set to 0.

                 -TABIX to the index of the current line at the beginning of each loop lass. At the end of
the loop, SYTABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has
the type HASHED TABLE.

                ts SY-TABIX to the index of the table line read. If you use a binary search, and the
system does not find a
line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX
is undefined if a

linear search fails to return an entry.

                              -TABIX to the index of the table line in which the search string is found.

SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current
pass.

26)    Difference between UPLOAD and WS_UPLOAD?

Ans UPLOAD - File transfer with dialog from presentation server file to internal table. Data which is
available in a file on the

presentation server is transferred in an internal table. ASCII & Binary files can be transferred.
http://abap-tutorials.com 2010

WS_UPLOAD - To read data from the presentation server into an internal table without a user dialog,
use the function

module WS_UPLOAD. The most important parameters are listed below.

Parameters Function

CODEPAGE Only for upload under DOS: Value IBM

FILENAME Filename

FILETYPE File type

27)    Why did u switch to SAP?

Ans

28)    What is a Logical Database?

Ans Logical Databases are special ABAP programs that retrieve data and make it available to
application programs.

Use of LDB – is used to read data from database tables by linking them to executable ABAP programs.

29)    What are the events used for Logical Database?

Ans    Two Events –

1)     GET - This is the most important event for executable programs that use a logical database. It
occurs when the
logical database has read a line from the node <table> and made it available to the program in the work
area

declared using the statement NODES <table>. The depth to which the logical database is read is
determined by

the GET statementshttp://abap-tutorials.com 2010

2)       PUT - The PUT statement directs the program flow according to the structure of

         the logical database.

30)      What is the difference between Get and Get Late?

Ans      GET - After the logical database has read an entry from the node <table>.

GET LATE - After all of the nodes of the logical database have been processed that are below <table> in
the database

hierarchy.

31)      What are the data types of Internal Tables?

Ans      There are three types:

1)    Line

2) Key

3) Table

32)      What are the events used in ABAP in the order of execution?

Ans      Events are:http://abap-tutorials.com 2010

1.    INITIALIZATION

2. AT SELECTION-SCREEN

3. AT SELECTION-SCREEN ON <field>

4. START-OF-SELECTION

5. TOP-OF-PAGE

6. TOP-OF-PAGE DURING LINE SELECTION

7. END-OF-PAGE

8. END-OF-SELECTION
9. AT USER-COMMAND

10. AT LINE-SELECTION

11. AT PF<NN>

12. GET

13. GET LATE.

14. AT User Command

33)    What are Interactive Reports?

Ans An output list which displays just the basic details & allow user to interact, so that a new list is
populated based on userselection. With interactive list, the user can actively control data retrieval and
display during the session.

34)    What are the commands used for interactive reports?

Ans    Top-of-Page during line-selectionhttp://abap-tutorials.com 2010

35)    What are the system fields u have worked with? Explain?

Ans    I had worked with the following (30) system fields:

1)    SY-DBSYS          -    Central Database

2)    SY-HOST           -    Server

3)    SY-OPSYS          -    Operating System

4)    SY-SAPRL          -     SAP Release

5)    SY-SYSID          -    System Name

6)    SY-LANGU          -    User Logon Language

7)    SY-MANDT          -     Client

8)    SY-UNAME          -     Logon User Name

9)    SY-DATLO          -    Local Date

10) SY-DATUM        -        Server Date

11) SY-TIMLO        -       Local Time

12) SY-UZEIT        -       Server Time
13) SY-DYNNR       -        Screen Number

14) SY-REPID -         Current ABAP program

15) SY-TCODE       -        Transaction Code

16) SY-ULINE       -        Horizontal Line

17) SY-VLINE       -        Vertical Linehttp://abap-tutorials.com 2010

18) SY-INDEX       -        Number of current loop Pass

19) SY-TABIX       -        Current line of internal table

20) SY-DBCNT       -       Number of table entries processed

21) SY-SUBRC       -        Return Code

22) SY-UCOMM       -        Function Code

23) SY-LINCT       -        Page Length of list

24) SY-LINNO       -        Current Line

25) SY-PAGNO       -        Current Page Number

26) SY-LSIND       -        Index of List

27) SY-MSGID       -        Message Class

28) SY-MSGNO       -        Message Number

29) SY-MSGTY       -        Message Type

30) SY-SPONO       -        Spool number during printing

36)    What is the difference between Primary key and Unique Key?

Ans   Primary Key – It can accepts 0 value and cannot be NULL.

      Unique Key – It can be NULL.

37)    What is the transaction code for Table maintenance?

Ans   SM30http://abap-tutorials.com 2010

38)    If u are using Logical Databases how will u modify the selection-screen elements?

Ans   Select-options : dname for deptt-dname.
39)    What is an RFC?

Ans    Remote Function Call

40)    If u are using RFC and passing values to a remote system how does it work?

Ans

41) What are the events in Screen Programming?

Ans    There are two events in Screen Programming:

1. PBO (Process Before Output) – Before the screen is displayed, the PBO event is processed.

2. PAI (Process After Input) – When the user interacts with the screen, the PAI event is processed.

3. POH (Process On Help) - are triggered when the user requests field help (F1). You can program the
appropriate coding in

the corresponding event blocks. At the end of processing, the system carries on processing the current
screen.

4. POV (Process On Value) - are triggered when the user requests possible values help (F4). You can
program the

appropriate coding in the corresponding event blocks. At the end of processing, the system carries on
processing the

current screen.

42)    What is the significance of HIDE?

Ans Its stores the click value and display the related record in the secondary list.http://abap-
tutorials.com 2010

43)    Where do u code the HIDE statement?

Ans    In a LOOP statement

44)    Types of BDC's?

Ans    There are two types of BDC’s:

1)    Transaction Method

2) Session Method

45)    Advantages & Disadvantages of different types of BDC's?
Ans    Transaction Method:

1)    It is faster than session method.

2) While executing, it starts from starting.

Session Method:

1)    It is slower than transaction method.

2) While executing, it does not start from starting.http://abap-tutorials.com 2010

46)    What are the events used in Interactive Reports.

Ans    There are three events of Interactive Reports:

                       I.    At PF(nn)

                 II.        At line-selection

                III.        At user-command

47)    What is an RDBMS?

Ans RDBMS – Relational Database Management System. It helps to create relationship between two
or more table.

48)    What standards u use to follow while coding ABAP programs?

Ans

49)    What will you code in START-OF-SELECTION & END-OF-SELECTON & why?

Ans    START-OF-SELECTION



SELECT * FROM DEPTT INTO CORRESPONDING FIELDS OF ITAB

WHERE DEPTNO IN DEPTNO.

APPEND ITAB.http://abap-tutorials.com 2010

ENDSELECT.

       LOOP AT ITAB.

WRITE : / 10 ITAB-DEPTNO.

HIDE : ITAB-DEPTNO.
ENDLOOP.

END-OF-SELECTION

50)    What are joins and different types joins?

Ans    There are four types of Joins:

1)    Self Join

2) Inner Join

3) Outer Join

4) Equi Join

51)    Which is the default join?

Anshttp://abap-tutorials.com 2010

52)    How do u display a data in a Detail List?

Ans    By using two statements:

1)    Top-of-page during line-selection

2)    At line-selection

53)    What are the types of windows in SAP Script?

Ans    There are five Standard Layouts in SAP Script:



1)    Page

2) Window

3) Page Window

4) Paragraph Format

5) Character Format

54)    What are the function modules used in a SAP Script driver program?

Ans    There are three functions used in SAP Script:

1)    OPEN_FORM
2) WRITE_FORMhttp://abap-tutorials.com 2010

3)    CLOSE_FORM

55)    What are Extracts?

Ans Extracts are dynamic sequential datasets in which different lines can have different structures.
We can access the

individual records in an extract dataset using a LOOP.

56)  How would u go about improving the performance of a Program, which selects data from MSEG
& MKPF?

Ans

57)    How does System work in case of an Interactive Report?

Ans

58)    What is LUW?

Ans    Logical Unit of Work http://abap-tutorials.com 2010

59)    Different types of LUWs. What r they?

Ans    Two types of LUW are:

1)    DB LUW - A database LUW is the mechanism used by the database to ensure that its data is always

consistent. A database LUW is an inseparable sequence of database operations that ends with a
database

commit. The database LUW is either fully executed by the database system or not at all. Once a
database

LUW has been successfully executed, the database will be in a consistent state. If an error occurs within
a

database LUW, all of the database changes since the beginning of the database LUW are reversed. This

leaves the database in the state it had before the transaction started.

2) SAP LUW - A logical unit consisting of dialog steps, whose changes are written to the database in a
single

database LUW is called an SAP LUW. Unlike a database LUW, an SAP LUW can span several dialog steps,
and
be executed using a series of different work processes.

60)     What is First event triggered in program?

Ans

61)     What are various Joins? What is right outer join?http://abap-tutorials.com 2010

Ans

62)     How do u find out whether a file exits on the presentation server?

Ans     eps_get_directory_listing for directory

63)     Systems fields used for Interactive Lists AND Lists

Ans     Interactive System Fields: SY-LSIND, SY-CPAGE, SY-LILLI, SY-LISEL, SY-LISTI,

       SY-LSTAT, SY-STACO, SY-STARO

       Lists: SY-COLNO, SY-LINCT, SY-LINNO, SY-LINSZ, SY-PAGNO,

SY-TVAR0…..SY-TVAR9, SY-WTITL

64)     Logo in SAP Script?

Ans     RSTXLDMC OR

Steps for making and inserting Logo in SAP Script:http://abap-tutorials.com 2010

       First Procedure:

1)    Draw the picture

2) Save it

3)    /nSE78

4)    Write name & Choose Color

5) Click on Import

6) Browse picture

7) Enter

Second Procedure

1)    /nSE71
2) Insert

3) Graphics

4) Click on stored on document server

5) Execute

6) Choose name of BMAP



65)    What are the difference between call screen and leave screen? http://abap-tutorials.com 2010

Ans Call Screen: Calling a single screen is a special case of embedding a screen sequence. If you want
to prevent the called

screen from covering the current screen completely, you can use the CALL SCREEN statement with the
STARTING AT and

ENDING AT

       CALL SCREEN 1000.

CALL SCREEN 1000 STARTING AT 10 10 ENDING AT 20 20.

       LEAVE SCREEN statement ends the current screen and calls the subsequent screen.

LEAVE SCREEN.

LEAVE TO SCREEN 2000.

66)    If internal table used in for all entries in empty then what happens

Ans    No, records will be displayed.

67)    If I forgot some command in SAP Script e.g.: suppress zero display - How to do find it?

Ans Suppressing of entire screens is possible with this command. This command allows us to perform
screen processing “in

the background”. Suppressing screens is useful when we are branching to list-mode from a transaction
dialog step.

68)    How to write a BDC - how do u go about it?

Ans    Steps for writing BDC

1)    /nSE38http://abap-tutorials.com 2010
2)    Declare Tables, Data (for ITAB) and Data (for BDCITAB)

3) Call function ‘Upload’.

4) Write code for the First Screen, Radio Button, Filename, Change Button, Second Screen, Utilities
(Create Entries),

Third Screen and Save.

5) Call transaction ‘SE11’ using BDCITAB mode ‘A’.

6) Save, Check Errors, Activate and Execute.

69)    What is Performance tuning?

Ans

70)    Define Documentation.

Ans http://abap-tutorials.com 2010

71)    Brief about Testing of programs.

Ans

72)    How do u move on to the next screen in interactive reporting?

Ans    Write code of the following:



1)    Top-of-Page during line-selection

2)    At line-selection

73)    Create any functions? How to go about it?

Ans    Steps for creating the Functions:

       First Procedure:

1)    /nSE37

2) Goto

3) Function Group (FG)http://abap-tutorials.com 2010

4)    Create Group

5) Name of FG (ZREKHA_FG)
6) Short Text

7) Save

8) Local Object

Second Procedure

1)    Environment

2) Inactive Object

3) Function Group (ZREKHA_FG)

4) Activate

5) Back

Third Procedure

1)    Name of Function Module (ZREKHA_FM)

2) Create

3) Write FG Name (ZREKHA_FG)

4) Short Text

5) Savehttp://abap-tutorials.com 2010

Fourth Step:

Call function ‘ZREKHA_FM’.

74)    Advanced topics?

Ans

75)    Function modules used in F4 help.

Ans    There are two types of function modules used in F4 help:

1)    F4IF_FIELD_VALUE_REQUEST

2)    F4IF_INT_TABLE_VALUE_REQUEST

76)    Work most on which module: Name a few tables.

Ans    Sales & Distribution Module
1)     Sales Document: Item Data                    –     VBAPhttp://abap-tutorials.com 2010

2)     Sales Document: Partner                  –         VBPA

3)     Sales Document: Header Data                  –     VBAK

4)     Sales Document Flow                      –        VBFA

5)     Sales Document: Delivery Item Data           -     LIPS

6)     Customer Master                          –        KNA1

7)     Material Data                        –           MARA

8)     Conditions (Transaction Data)                -     KONV

77)      System Table used

Ans

1)     Sales Document: Item Data                    –     VBAP

2)     Sales Document: Partner                  –         VBPA

3)     Sales Document: Header Data                  –     VBAK

4)     Sales Document Flow                      –        VBFA

5)     Sales Document: Delivery Item Data           -     LIPS

6)     Customer Master                          –        KNA1

7)     Material Data                        –           MARA

8)     Conditions (Transaction Data)                -     KONV

78)     From a table how do u find whether a material is used in another material BOM? http://abap-
tutorials.com 2010

Ans

79)      What is read line?

Ans READ LINE and READ CURRENT LINE – These statements are used to read data from the lines of
existing list levels. These

statements are closely connected to the HIDE technique.

80)      How u used logical database? How is data transferred to program? Corresponding statement in
LDB.
Ans

81)    How do u suppress fields on selection screen generated by LDB?

Ans http://abap-tutorials.com 2010

82)    Can there be more than 1 main window in SAP Script?

Ans No, there cannot be more than 1 main window in SAP Script because in WRITE_FORM, it asks for
the parameter Window

that will create the problem.

WRITE_FORM –

Exporting

Element

Window

83)    Global and local data in function modules.

Ans

84)    What are the differences between SAP memory and ABAP memory?

Ans ABAP Memory is a memory area in the internal session (roll area) of an ABAP program. Data
within this area is retained

within a sequence of program calls, allowing you to pass data between programs that call one another.
It is also possible

to pass data between sessions using SAP Memory.

SAP Memory is a memory area to which all sessions within a SAPgui have access. You can use SAP
memory either to pass

data from one program to another within a session (as with ABAP memory) or to pass data from one
session to another.http://abap-tutorials.com 2010

85)    What are differences between At selection-screen and At selection-screen output?

Ans AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP
runtime environment has

passed all of the input data from the selection screen to the ABAP program.
AT SELECTION-SCREEN OUTPUT - This event block allows you to modify the selection screen directly
before it is

displayed.

86)    What are the events?

Ans

87)    What is get cursor field?

Ans GET CURSOR statement transfers the name of the screen element on which the cursor is
positioned during a user action

into the variable <f>.

GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>] [VALUE <val>] LENGTH <len>].

88)    What is the inside concept in select-options?

Ans    Select-options specify are displayed on the selection screen for the user to enter values.

Different Properties of Select-options:

1)    Visible Length

2) Matchcode Objecthttp://abap-tutorials.com 2010

3)    Memory ID

4) Lowercase

5) Obligatory

6) No Display

7) Modify ID

89)    What is the difference between occurs 1 and occurs 2?

Ans

90)    What is the difference between Free and Refresh?

Ans Free - You can use FREE to initialize an internal table and release its memory space without first
using the REFRESH or

CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After a FREE
statement, you
can address the internal table again. It still occupies the amount of memory required for its header
(currently 256 bytes).

When you refill the table, the system has to allocate new memory space to the lines.



Refresh - This always applies to the body of the table. As with the CLEAR statement, the memory used
by the table

before you initialized it remains allocated. To release the memory space, use the statement

91)    What are elements?

Anshttp://abap-tutorials.com 2010

92)    Can we have more than one selection-screen and how?

Ans    Yes, we can have more than one selection screen.

       Selection-screen begin of block honey with frame title text-101.

Select-options : deptno for zrekha_deptt-deptno.

Selection-screen end of block honey.

Selection-screen begin of block honey1 with frame title text-102.

Select-options : dname for zrekha_deptt-dname.

Selection-screen end of block honey1.

93)    How to declare select-option as a parameter?

Ans    SELECT-OPTIONS: specify are displayed on the selection screen for the user to enter values.

       Parameters: dname like dept-dname.

       Select-options: dname for dept-dname.http://abap-tutorials.com 2010

94)    How can u write programmatically value help to a field without using search help and

match codes?

Ans    By using two types of function modules to be called in SAP Script:

1)    HELP_OBJECT_SHOW_FOR_FIELD

2) HELP_OBJECT_SHOW
95)    What are the differences between SE01, SE09 and SE10?

Ans    SE01 -        Correction & Transport Organizer

       SE09 -        Workbench Organizer

       SE10 -        Customizing Organizer

96)    How to set destination?

Anshttp://abap-tutorials.com 2010

97)    What are the function module types?

Ans

98)    What are tables?

Ans    Tables : ZREKHA_EMP.

It creates a structure – the table work area in a program for the database tables, views or structure
ZREKHA_EMP. The

table work area has the same name as the object for which we created it. ZREKHA_EMP must be
declared in the ABAP

dictionary. The name and sequence of fields in the table work area ZREKHA_EMP corresponds exactly to
the sequence of

fields in the database table, view definition in the ABAP dictionary.

99)    What are client-dependant tables and independent tables?

Ans

100)   How to distinguish client-dependant tables from independent tables?

Anshttp://abap-tutorials.com 2010

101)   What is the use of Table maintenance allowed?

Ans Mark the Table maintenance allowed flag if users with the corresponding authorization may
change the data in the table

using the Data Browser (Transaction SE16). If the data in the table should only be maintained with
programs or with the

table view maintenance transaction (Transaction SM30), you should not set the flag.
102)    How to define Selection Screen?

Ans     Parameters, Select-options & Selection-Screen

103)    What are the check tables and value tables?

Ans Check Table: The ABAP Dictionary allows you to define relationships between tables using foreign
keys . A dependent

table is called a foreign key table, and the referenced table is called the check table. Each key field of the
check table

corresponds to a field in the foreign key table. These fields are called foreign key fields. One of the
foreign key fields is

designated as the check field for checking the validity of values. The key fields of the check table can
serve as input help

for the check field.

Value Table: Prior to Release 4.0, it was possible to use the value table of a domain to provide input
help. This is no

longer possible, primarily because unexpected results could occur if the value table had more than one
key field. It was

not possible to restrict the other key fields, which meant that the environment of the field was not
considered, as is

normal with check tables.

In cases where this kind of value help was appropriate, you can reconstruct it by creating a search help
for the data

elements that use the domain in question, and using the value table as the selection method.

Check table will be at field level checking.

Value table will be at domain level checking ex: scarr table is check table for carrid.http://abap-
tutorials.com 2010

104)    What is the difference between tables and structures?

Ans     Tables:

1)     Data is permanently stored in tables in the database.

2) Database tables are generated from them.
Structure:

1)     It contains data temporarily during program run-time.

2) No Database tables are generated from it.

105)    How to declare one internal table without header line without using structures?

Ans No, we cannot declare internal table without header line and without structure because it gives
error “ITAB cannot be a

table, a reference, a string or contain any of these object”.

        Code with Header without Structure

TABLES : ZREKHA_EMP.

DATA : ITAB LIKE ZREKHA_EMP OCCURS 0 WITH HEADER LINE.http://abap-tutorials.com 2010

        SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB.

APPEND ITAB.

ENDSELECT.

LOOP AT ITAB.

WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO.

ENDLOOP.

Code without Header with Structure

TABLES : ZREKHA_EMP.

DATA : BEGIN OF ITAB OCCURS 0,

        EMPNO LIKE XREKHA_EMP-EMPNO,

              EMPNAME LIKE XREKHA_EMP-EMPNAME,

              DEPTNO LIKE XREKHA_EMP-DEPTNO,

              END OF ITAB.

        SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB.

APPEND ITAB.

ENDSELECT.http://abap-tutorials.com 2010
       LOOP AT ITAB.

WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO.

       ENDLOOP.

106)   What are lock objects?

Ans Reason for Setting Lock: Suppose a travel agent want to book a flight. The customer wants to fly
to a particular city with a

certain airline on a certain day. The booking must only be possible if there are still free places on the
flight. To avoid the

possibility of overbooking, the database entry corresponding to the flight must be locked against access
from other

transactions. This ensures that one user can find out the number of free places, make the booking, and
change the

number of free places without the data being changed in the meantime by another transaction.

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock
mechanism.

When interactive transactions are programmed, locks are set and released by calling function modules
(see Function

Modules for Lock Requests). These function modules are automatically generated from the definition of
lock objects in

the ABAP Dictionary.

       Two types of Lock: Shared and Exclusive

107)   What are datasets? What are the different syntaxes?

Ans The sequential files (ON APPLICATION SERVER) are called datasets. They are used for file handling
in SAP.

OPEN DATASET [DATASET NAME]             FOR [OUTPUT / INPUT / APPENDING]

                                          IN [BINARY / TEXT] MODE

                                          AT POSITION [POSITION]

MESSAGE [FIELD]http://abap-tutorials.com 2010

READ DATASET [DATASET NAME] INTO [FIELD]
DELETE DATASET [DATASET NAME]

CLOSE DATASET [DATASET NAME]

TRANSFER [FIELD] TO [DATASET NAME]

108)   What are the events we use in dialog programming and explain them?

Ans    There are two events in Dialog Programming i.e. screen:

1. PBO (Process Before Output) – Before the screen is displayed, the PBO event is processed.

2. PAI (Process After Input) – When the user interacts with the screen, the PAI event is processed.

3. POH (Process On Help) - are triggered when the user requests field help (F1). You can program the
appropriate coding in

the corresponding event blocks. At the end of processing, the system carries on processing the current
screen.

4. POV (Process On Value) - are triggered when the user requests possible values help (F4). You can
program the

appropriate coding in the corresponding event blocks. At the end of processing, the system carries on
processing the

current screen.

109)   What is the difference between OPEN_FORM and CLOSE_FORM?

Ans OPEN_FORM – This module opens layout set printing. This function must be called up before we
can work with other

layout set function like WRITE_FORM. http://abap-tutorials.com 2010

WRITE_FORM – Output text element in form window. The specified element of the layout set window
entered is output.

The element must be defined in the layout set.

CLOSE_FORM – End layout set printing. Form printing started with OPEN_FORM is completed. Possible
closing

operations on the form last opened are carried out. Form printing must be completed by this function
module. If this is

not carried out, nothing is printed or displayed on the screen.

110)   What are the page windows? How many main windows will be there in a page window?
Ans Page Window: In this window, we define the margins for left, width, upper and height for the
layout of Header, Logo,

Main, & Footer.

111)   What are control events in a loop?

Ans Control level processing is allowed within a LOOP over an internal table. This means that we can
divide sequences of

entries into groups based on the contents of certain fields.

AT <level>.

<statement block>

ENDAT.

You can react to the following control level changes:

<level> Meaning

FIRST First line of the internal table

LAST Last line of the internal tablehttp://abap-tutorials.com 2010

NEW <f> Beginning of a group of lines with the same contents in the field <f> and in the fields left of <f>

END Of <f> End of a group of lines with the same contents in the field <f> and in the fields left of <f>

112)   How to debugg a script?

Ans    Go to SE71, give layout set name, go to utilities select debugger mode on.

113)   How many maximum sessions can be open in SAPgui?

Ans    There are maximum 6 sessions open in SAPgui.

114)   SAP Scripts and ABAP programs are client dependent or not? Why?

Ans

115) What are System Variable?

Ans System variables have been predefined by SAP. We can use these variables in formulas or, for
example, to pass on certain

pieces of information to a function module. How the function called by the function module behaves
depends on the
type of information passed on.

At present, we can use the following system variables:

System Variable Use Meaning

SY_MODE In function modules Current mode of the PI sheet

SY_TEST In function modules Status of the PI sheet (test or active)http://abap-tutorials.com 2010

SY_ROW In function modules Current table line

SY_VALUE or X Generally Refers to the immediately preceding input value

116)   Is it compulsory to use all the events in Reports?

Ans

117)   What is the difference between sum and collect?

Ans Sum: You can only use this statement within a LOOP. If you use SUM in an AT - ENDAT block, the
system calculates totals

for the numeric fields of all lines in the current line group and writes them to the corresponding fields in
the work area.

If you use the SUM statement outside an AT - ENDAT block (single entry processing), the system
calculates totals for the

numeric fields of all lines of the internal table in each loop pass and writes them to the corresponding
fields of the work

area. It therefore only makes sense to use the SUM statement in AT...ENDAT blocks.

If the table contains a nested table, you cannot use the SUM statement. Neither can you use it if you are
using a field

symbol instead of a work area in the LOOP statement.

       Collect:

118)   What are session method and call transaction method and explain about them?

Ans Session method – Use the BDC_OPEN_GROUP to create a session. Once we have created a
session, then we can insert

the batch input data into it with BDC_INSERT. Use the BDC_INSERT to add a transaction to a batch input
session. We
specify the transaction that is to be started in the call to BDC_INSERT. We must provide a BDCDATA
structure that http://abap-tutorials.com 2010

contains all the data required to process the transaction completely. Use the BDC_CLOSE_GROUP to
close a session after

we have inserted all of our batch input data into it. Once a session is closed, it can be processed.

Call Transaction -

In this method, we use CALL TRANSACTION USING to run an SAP transaction. External data does not
have to be

deposited in a session for later processing. Instead, the entire batch input process takes place inline in
our program.

119)     If you have 10000 records in your file, which method you use in BDC?

Ans Call transaction is faster then session method. But usually we use session method in real
time...because we can transfer

large amount of data from internal table to database and if any errors in a session, then process will not
complete until

session get correct.

120)     What are different modes of Call Transaction method and explain them?

Ans     There are three modes of Call Transaction method:

1)     A – Display All

Screens




2)     E – Display Errors

3) N – Background Processing

--------------------------------------------------------------------------------------------------------------------http://abap-
tutorials.com 2010

121)     What is the typical structure of an ABAP program?

Ans     HEADER, BODY, FOOTER.
122) What are field symbols and field groups? Have you used "component idx of structure" clause
with field groups?

Ans Field Symbols – They are placeholder or symbolic names for the other fields. They do not
physically reserve space for a

field, but point to its contents. It can point to any data objects.

       Field-symbols <fs>

Field Groups – Field groups does not reserve storage space but contains pointers to existing fields.

An extract dataset consists of a sequence of records. These records may have different structures. All
records with the

same structure form a record type. You must define each record type of an extract dataset as a field
group, using the

FIELD-GROUPS statement.

       Field-groups <fg>

123)   What should be the approach for writing a BDC program?

Ans    STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE

 to internal table CALLED "CONVERSION". http://abap-tutorials.com 2010

STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED

"SAP DATA TRANSFER".

STEP 3: DEPENDING UPON THE BDC TYPE

i) Call transaction (Write the program explicitly)

ii) Create sessions (sessions are created and processed. If success, data will transfer).

124)   What is a batch input session?

Ans BATCH INPUT SESSION is an intermediate step between internal table and database table. Data
along with the action is

stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and
how next screen is

processed.

       Create session – BDC_OPEN_GROUP
Insert batch input – BDC_INSERT

Close session – BDC_CLOSE_GROUP

125)     What is the alternative to batch input session?

Ans      Call Transaction Method & Call Dialog

126)     A situation: An ABAP program creates a batch input session. We need to submit the

program and the batch session in background. How to do it? http://abap-tutorials.com 2010

Ans      Go to SM36 and create background job by giving job name, job class and job steps

(JOB SCHEDULING)

127)     What is the difference between a pool table and a transparent table and how they are

stored at the database level?

Ans      Pool Table -

1)     Many to One Relationship.

2) Table in the Dictionary has the different name, different number of fields, and the fields have the
different name as

in the R3 Table definition.

3) It can hold only pooled tables.

Transparent Table –

1)     One to One relationship.

2) Table in the Dictionary has the same name, same number of fields, and the fields have the same
name as in the R3

Table definition.

3) It can hold Application data.

128)     What are the problems in processing batch input sessions? How is batch input process

different from processing on line?

Ans      Two Problems: -http://abap-tutorials.com 2010

1) If the user forgets to opt for keep session then the session will be automatically removed from the
session queue (log
remains). However, if session is processed we may delete it manually.

2) If session processing fails, data will not be transferred to SAP database table.

129)    Is Session Method, Asynchronous or Synchronous?

Ans     Synchronous

130)    What are the different types of data dictionary objects?

Ans     Different types of data dictionary objects:

1)     Tables

2) Views

3) Data elements

4) Structure

5) Domains

6) Search Helps

7) Local Objects

8) Matchcode

131) How many types of tables exist and what are they in data dictionary? http://abap-tutorials.com
2010

Ans     4 Types of Tables:

1. Transparent tables - Exists with the same structure both in dictionary as well as in database exactly
with the same data

and fields. Both Open SQL and Native SQL can be used.

2. Pool tables

3. Cluster tables - These are logical tables that are arranged as records of transparent tables. One cannot
use Native SQL on

these tables (only Open SQL). They are not manageable directly using database system tools.

4. Internal tables

132)    What is the step-by-step process to create a table in data dictionary?

Ans     Steps to create a table:
Step 1: creating domains (data type, field length, Range).

Step 2: creating data elements (properties and type for a table field).

Step 3: creating tables (SE11).

133)   Can a transparent table exist in data dictionary but not in the database physically?

Ans No, Transparent table do exist with the same structure both in the dictionary as well as in the
database, exactly with the

same data and fields.

134)   In SAP Scripts, how will u link FORM with the Event Driven?

Ans    In PAI, define function code and write code for the same.http://abap-tutorials.com 2010

135)   Can you create a table with fields not referring to data elements?

Ans    YES. e.g.:- ITAB LIKE SPFLI.

Here we are refering to a data object (SPFLI) not data element.

136)   What is the advantage of structures? How do you use them in the ABAP programs?

Ans    GLOBAL EXISTANCE (these could be used by any other program without creating it again).

137)   What does an extract statement do in the ABAP program?

Ans Once you have declared the possible record types as field groups and defined their structure, you
can fill the extract

dataset using the following statements:

EXTRACT <FG>.

When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds
the first extract

record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset

EXTRACT HEADER.

When you extract the data, the record is filled with the current values of the corresponding fields.

As soon as the system has processed the first EXTRACT statement for a field group <FG>, the structure of
the
corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the
field groups http://abap-tutorials.com 2010

<FG> and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT
statement, a

runtime error occurs.

By processing EXTRACT statements several times using different field groups, you fill the extract dataset
with records of

different length and structure. Since you can modify field groups dynamically up to their first usage in an
EXTRACT

statement, extract datasets provide the advantage that you need not determine the structure at the
beginning of the

program.

138)   What is a collect statement? How is it different from append?

Ans Collect : If an entry with the same key already exists, the COLLECT statement does not append a
new line, but adds the

contents of the numeric fields in the work area to the contents of the numeric fields in the existing
entry.



Append – Duplicate entries occurs.

139)   What is OPEN SQL vs NATIVE SQL?

Ans Open SQL – These statements are a subset of standard SQL. It consists of DML command (Select,
Insert, Update, Delete).

It can simplify and speed up database access. Buffering is partly stored in the working memory and
shared memory.

Data in buffer is not always up-to-date.

      Native SQL – They are loosely integrated into ABAP. It allows access to all functions containing
programming interface.

They are not checked and converted. They are sent directly to the database system. Programs that use
Native SQL are
specific to the database system for which they were written. For e.g. to create or change table definition
in the ABAP.

140)     What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?

Ans To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it
with the ENDEXEC

statement as follows:http://abap-tutorials.com 2010

EXEC SQL [PERFORMING <form>].

<Native SQL statement>

ENDEXEC.

There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk
(*) at the

beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP
syntax. You

need to know whether table and field names are case-sensitive in your chosen database.

141)     What is the meaning of ABAP editor integrated with ABAP data dictionary?

Ans ABAP Editor: Tool in the ABAP Workbench in which you enter the source code of ABAP programs
and check their syntax.

You can also navigate from the ABAP Editor to the other tools in the ABAP Workbench.

142)     What are the events in ABAP language?

Ans      The events are as follows:

1.     Initialization

2. At selection-screen

3. Start-of-selection

4. End-of-selection

5. Top-of-page

6. End-of-page

7. At line-selection
8. At user-command

9.     At PF

10. Get

11. At Newhttp://abap-tutorials.com 2010

12. At LAST

13. AT END

14. AT FIRST

143)     What is an interactive report? What is the obvious difference of such report compared

with classical type reports?

Ans      An Interactive report is a dynamic drill down report that produces the list on users choice.

Difference: -

a) The list produced by classical report doesn't allow user to interact with the system where as the list
produced by

interactive report allows the user to interact with the system.

B) Once a classical report, executed user looses control where as Interactive, user has control.

C) In classical report, drilling is not possible where as in interactive, drilling is possible.

144)     What is a drill down report?

Ans      Its an Interactive report where in the user can get more relevant data by selecting explicitly.

145)      How do you write a function module in SAP? Describe.

Ans

1. Called program - SE37 - Creating function group, function module by assigning attributes,
importing, exporting,

tables, and exceptions. http://abap-tutorials.com 2010

2. Calling program - SE38 - In program, click pattern and write function name- provide export,
import, tables,

exception values.

146)     What are the exceptions in function module?
Ans Exceptions: Our function module needs an exception that it can trigger if there are no entries in
table SPFLI that meet the

selection criterion. The exception NOT_FOUND serves this function.

COMMUNICATION_FAILURE & SYSTEM_FAILURE

147)

Ans

148) How are the date and time field values stored in SAP?

Ans     DD.MM.YYYY. HH:MM:SS

149)    What are the fields in a BDC_Tab and BDCDATA Table?

Ans     Fields of BDC_Tab & BDCDATA Table:

        Sr.No        Fields         -        Description

        1)           Program        -        BDC Module pool

        2)           Dynpro -           BDC Screen Number

        3)           Dynbegin           -     BDC Screen Starthttp://abap-tutorials.com 2010

        4)           Fname          -        Field Name

        5)           Fval           -        BDC field value

150)    Name a few data dictionary objects?

Ans     Different types of data dictionary objects:

1)     Tables

2) Views

3) Data elements

4) Structure

5) Matchcode

6) Domains

7) Search Helps

8) Local Objects
151)   What happens when a table is activated in DD?

Ans When the table is activated, a physical table definition is created in the database for the table
definition stored in the

ABAP dictionary. The table definition is translated from the ABAP dictionary of the particular database.

       It is available for any insertion, modification and updation of records by any user.

152) http://abap-tutorials.com 2010

Ans

153)   What are matchcodes? Describe?

Ans It is similar to table index that gives list of possible values for either primary keys or non-primary
keys.

154)   What transactions do you use for data analysis?

Ans

155)   What are the elements of selection screen?

Ans    There are 5 elements of selection screen:

       Selection-screen include blocks <B>

Selection-screen include parameters <P>

Selection-screen include select-options <S>

Selection-screen include comment <C>

Selection-screen include push-button <push>

156)   What are ranges? What are number ranges? http://abap-tutorials.com 2010

Ans Main function of ranges to pass data to the actual selection tables without displaying the
selection screen.

       Min, Max values provided in selection screens.

It is often necessary to directly access individual records in a data structure. This is done using unique
keys. Number

ranges are used to assign numbers to individual database records for a commercial object, to complete
the key. Such
numbers are e.g. order numbers or material master numbers.

157)    What are select options and what is the diff from parameters?

Ans    Parameters : We can enter a single value.

PARAMETERS: PARAM(10).

Select-options: We can enter low and high value i.e. range has to be specify. By using NO-INTERVAL user
can process

only single fields.

SELECT-OPTIONS: DNO FOR DEPT-DNO.

SELECT-OPTIONS: DNO FOR DEPT-DNO NO-INTERVAL.

SELECT-OPTIONS declares an internal table, which is automatically filled with values or ranges of values
entered by the

end user. For each SELECT-OPTIONS, the system creates a selection table.

SELECT-OPTIONS <SEL> FOR <field>.

A selection table is an internal table with fields SIGN, OPTION, LOW and HIGH.

The type of LOW and HIGH is the same as that of <field>.

The SIGN field can take the following values: I Inclusive (should apply) E Exclusive (should not apply)

The OPTION field can take the following values: EQ Equal GT Greater than NE Not equal BT Between LE
Less than or

equal NB Not between LT Less than CP Contains pattern GE Greater than or equal NP No pattern.
http://abap-tutorials.com 2010

DifferencesPARAMETERS allow users to enter a single value into an internal field within a report.

SELECT-OPTIONS allows users to fill an internal table with a range of values.

Select-options provide ranges where as parameters do not.

For each PARAMETERS or SELECT-OPTIONS statement you should define text elements by choosing

Goto - Text elements - Selection texts - Change.

Eg:- Parameters name(30).
When the user executes the ABAP/4 program, an input field for 'name' will appear on the selection
screen. You can

change the comments on the left side of the input fields by using text elements as described in Selection
Texts.

158)    How do you validate the selection criteria of a report? And how do you display initial

values in a selection screen?

Ans The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for
the input values on the

screen and respective messages can be sent.

To display initial values in the selection screen:

1)     Use INITIALIZATION EVENT

2) Use DEFAULT VALUE option of PARAMETERS Statement

3)     Use SPA/GPA Parameters (PIDs).http://abap-tutorials.com 2010

Validate: - by using match code objects.

Display :- Parameters <name> default 'xxx'.

        Select-options <name> for spfli-carrid.

Initial values in a selection screen:

        INITIALIZATION.

DNO-LOW = 10.

        DNO-HIGH = 30

        SIGN I.

OPTION NB.

APPEND DNO.

159)    What are selection texts?

Ans

160)    What is CTS and what do you know about it? http://abap-tutorials.com 2010
Ans CTS stands for Correction and Transport System. The CTS provides a range of functions that help
you to choose a

transport strategy optimally suited to your requirements. We recommend that you follow the transport
strategy while

you plan and set up your system landscape.

Correction and Transport System (CTS) is a tool that helps you to organize development projects in the
ABAP Workbench

and in Customizing, and then transport the changes between the SAP Systems and clients in your system
landscape. This

documentation provides you with an overview of how to manage changes with the CTS and essential
information on

setting up your system and client landscape and deciding on a transport strategy. Read and follow this
documentation

when planning your development project. For practical information on working with the Correction and
Transport

System, see Correction and Transport Organizer and Transport Management System.

161) When a program is created and need to be transported to prodn does selection texts always go
with it? If not how do you

make sure? Can you change the CTS entries? How do you do it?

Ans

162)   What is the client concept in SAP? What is the meaning of client independent?

Ans In commercial, organizational and technical terms, the client is a self-contained unit in the R3
system, with separate set of

Master data and its own set of Tables. When a change is made in one client all other clients are affected
in the system -

this type of objects are called Client independent objects.http://abap-tutorials.com 2010

163)   Are programs client dependent?

Ans    Yes, group of users can access these programs with a client number.

164)   Name a few system global variables you can use in ABAP programs?
Ans    SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM,

SY-TABIX.....

SY-LILLI is absolute number of lines from which the event was triggered.

165) What are internal tables? How do you get the number of lines in an internal table? How to use a
specific number occurs

statement?

Ans

1) It is a standard data type object, which exists only during the runtime of the program. They are
used to perform

table calculations on subsets of database tables and for re-organizing the contents of database tables
according to

users need.

2) Using SY-DBCNT.

3) The number of memory allocations the system need to allocate for the next record population.

166)   How do you take care of performance issues in your ABAP programs?

Ans Performance of ABAP programs can be improved by minimizing the amount of data to be
transferred. The data set must

be transferred through the network to the applications, so reducing the amount of time and also
reduces the network

traffic. http://abap-tutorials.com 2010

Some measures that can be taken are:

- Use views defined in the ABAP/4 DDIC (also has the advantage of better reusability).

- Use field list (SELECT clause) rather than SELECT *.

- Range tables should be avoided (IN operator)

- Avoid nested SELECTS.

167)   What are datasets?

Ans The sequential files (ON APPLICATION SERVER) are called datasets. They are used for file handling
in SAP.
168)    How to find the return code of an stmt in ABAP programs?

Ans     Open SQL has 2 system fields with return codes:



1)     SY-SUBRC

2) SY-DBCNT

Using function modules

169)    What are Conversion & Interface programs in SAP?

Ans     CONVERSION: Legacy system to flat file.

INTERFACE: Flat file to SAP system.http://abap-tutorials.com 2010

170)    Have you used SAP supplied programs to load master data?

Ans     SAP supplied BDC programs

RM06BBI0 (Purchase Requisitions)

RMDATIND (Material Master)

RFBIKR00 (Vendor Masters)

RFBIDE00 (Customer Master)

RVINVB00 (Sales Order)

171)    What are the techniques involved in using SAP supplied programs? Do you prefer to

write your own programs to load master data? Why?

Ans



                                          – first one is always session record)

                                                      – record type )

                              – STYPE, GROUP , MANDT, USERNAME , NO DATA

                            – consists of transaction code also – STYPE, BMM00, TCODE, MATNR and
Fields in Item -

ITEMS …
                           – sample data set creationhttp://abap-tutorials.com 2010

172)     What are logical databases? What are the advantages/disadvantages of logical databases?

Ans      To read data from a database tables we use logical database.

A logical database provides read-only access to a group of related tables to an ABAP/4 program.

Advantages: - The programmer need not worry about the primary key for each table. Because Logical
database knows how the

different tables relate to each other, and can issue the SELECT command with proper where clause to
retrieve the data.

1)     An easy-to-use standard user interface.

2) Check functions, which check that user input is complete, correct, and plausible.

3) Meaningful data selection.

4) Central authorization checks for database accesses.

5) Good read access performance while retaining the hierarchical data view determined by the
application logic.

6) No need of programming for retrieval, meaning for data selection

Disadvantages: -

1)     If you do not specify a logical database in the program attributes, the GET events never occur.

2) There is no ENDGET command, so the code block associated with an event ends with the next event
statement (such

as another GET or an END-OF-SELECTION).http://abap-tutorials.com 2010

3) Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level
tables should be

read so performance is slower.

173)     What specific statements do you using when writing a drill down report?

Ans      AT LINE-SELECTION

AT USER-COMMAND

AT PF.
174)     What are different tools to report data in SAP? What all have you used?

Ans

175)     What are the advantages and disadvantages of ABAP query tool?

Ans      Advantages: No programming knowledge is required.

Disadvantages: Depending on the complexity of the database tables, it may not be easy for the user to
select the

necessary data correctly.

176) What are the functional areas? User groups? How does ABAP query work in relation to
http://abap-tutorials.com 2010

these?

Ans Functional Areas - By creating functional areas, we can initially select this data. This ensures that
the data is presented to

the ABAP Query user in a meaningful way to accomplish the task, and that only the data that the user
may use is

presented.

User Groups – A user group is a collection of users that work with about the same data and carry out
similar tasks. The

members of a user group can use all programs (queries) created by any user of the group. Changes to
such a program

are at once visible to all users. This ensures that all members of a user group use the same evaluation
programs.

ABAP Query: It consists of three components – queries, functional areas and user groups. The functional
areas provide

the user with an initial set of data in accordance with the task to be accomplished. All users must be
members of at least

one user group. All members of one user group can access the same data as well as the same program
(queries) to

create lists.

177)     Is a logical database a requirement/must to write an ABAP query?
Ans     No, it is not must to use LDB. Apart from it, we have other options:

1)     Table join by Basis Table

2) Direct Read of table

3) Data Retrieval by Program

178)    What is the structure of a BDC sessions.

Ans     BDCDATAhttp://abap-tutorials.com 2010

179)    What are Change header and detail tables? Have you used them?

Ans

180)    What do you do when the system crashes in the middle of a BDC batch session?

Ans We will look into the error log file (SM35). Check number of records already updated and delete
them from input file and

run BDC again.

181)    What do you do with errors in BDC batch sessions?

Ans We look into the list of incorrect session and process it again. To correct incorrect session, we
analyze the session to

determine which screen and value produced the error. For small errors in data we correct them
interactively otherwise

modify batch input program that has generated the session or many times even the data file.

182)     How do you set up background jobs in SAP? What are the steps? What are the events

driven batch jobs?

Ans     Go to SM36 and create background job by giving job name, job class and job steps

(JOB SCHEDULING)

183)     Is it possible to run host command from SAP environment? How do you run?

Anshttp://abap-tutorials.com 2010

184)    What kind of financial periods exist in SAP? What is the relevant table for that?

Ans

185)    Does SAP handle multiple currencies? Multiple languages?
Ans    Yes.

186)   What is a currency factoring technique?

Ans

187)   How do you document ABAP programs? Do you use program documentation menu

option? http://abap-tutorials.com 2010

Ans

188)   What is SAP Script and layout set?

Ans The tool, which is used to create layout set is called SAP Script. Layout set is a design, appearance
and structure of

document.

189)   What are the ABAP commands that link to a layout set?

Ans    Control Commands, System Commands

190)   What is output determination?

Ans

191)   What is the field length of Packed Number? What is the default decimal of packed

number?

Anshttp://abap-tutorials.com 2010

192)   What are the different types of data types?

Ans    There are three types of data types:

Data Types

Elementary                          Complex                    References

Fixed         Variable              Structure     Table         Data           Objecthttp://abap-
tutorials.com 2010

Variable

193)   What is the syntax of Packed Number?

Ans    Data : NUM type P decimals 2.
194)    What are different types of attributes of Function Module?

Ans     There are 6 attributes of FM:

1.     Import

2. Export

3. Table

4. Changing

5. Source

6. Exception

195)    List of Screen elements.

Ans     There are 13 screen elements:

                                           i.    Input / output fields

                                       ii.       Text fields

                                      iii.       Checkbox

                                     iv.        Radio buttonhttp://abap-tutorials.com 2010

                                       v.        Push Button

                                     vi.        Drop down list

                                    vii.        Subscreen

                                   viii.        Table control

                                     ix.        Tabstrip control

                                       x.        Custom control

                                     xi.        Box

                                    xii.        Status icons

                                   xiii.        OK_CODE fields

196)    How many default Tab Strips are there? How to insert more Tabs in it?

Ans There 2 default Tab strips. Screen painter attributes contain Tab Title, which is used to insert
more tabs in tab strip.
197)    How to define Selection Screen?

Ans     There are 3 ways of defining selection screen:

1.     Parameters

2. Select-options

3. Selection-Screen

198)    What are the properties of Selection Screen?http://abap-tutorials.com 2010

Ans     There are 11 properties of selection screen:

1)     Default

2) Memory ID

3) Lowercase

4) Visible length

5) Obligatory

6) Matchcode

7) Check

8) Checkbox

9) Radiobutton Group

10) No-display

11) Modif ID

199)    What are the components of Selection Table?

Ans     There are four components of selection table:

Low, High, Sign, Options

200) How to display or know if the value entered contains records or not?http://abap-tutorials.com
2010

Ans     SY-SUBRC

201)    What are the sequences of event block?

Ans
                                       i.    Reports

                                   ii.      Nodes

                                  iii.      Data

                                 iv.        Initialization

                                   v.       At selection-screen

                                 vi.        Start-of-selection

                                vii.        Get deptt

                               viii.        Get emp

                                 ix.        Get deptt late

                                  x.        End-of-selection

                                 xi.        Form

                                xii.        Endform

202)   What are types of Select statements?

Ans    SELECT SINGLE <cols> ... WHERE ...

       SELECT [DISTINCT] <cols> ... WHERE ...

SELECT <lines> * ...http://abap-tutorials.com 2010

203)   What are DML commands?

Ans    Select, Insert, Delete, Modify, Update.

204)   What is Asynchronous and Synchronous Update?

Ans    Asynchronous Update – The program does not wait for the work process to finish the

update. Commit Work.

       Synchronous Update – The program wait for the work process to finish the update.

Commit Work and Wait.

205)   Write syntax for Message Error (Report)?

Ans    AT SELECTION-SCREEN.
SELECT * FROM ZREKHA_DEPTT INTO CORRESPONDING FIELDS OF ITAB

WHERE DEPTNO IN DEPTNO.

ENDSELECT.

If SY-DBCNT = 0.

MESSAGE E000 WITH ‘NO RECORDS FOUND’.

ENDIF.http://abap-tutorials.com 2010

206)      How to see the list of all created session?

Ans     There are two method to see all sessions:

1)     SHDB (Recording)

2) Write code in SE38 then save, check errors activate and execute it.

System

Service

Batch input

Session

207)      What are the function module in BDC?

Ans     There are three function module in BDC:

1)     BDC_OPEN_GROUP

2) BDC_INSERT

3) BDC_CLOSE_GROUP

208)      Write the steps to execute session method.

Ans     Steps for execution Session Method:http://abap-tutorials.com 2010

1)     System

2) Service

3) Batch Input
4) Session

5) Choose Session Name

6) Process

7) Asks for Mode (Display All Screen, Display Errors & Background)

8) Process

209)      What are the different types of mode (run code) in Call Transaction method?

Ans    There are three modes in Call Transaction:

                A – Displays All Screen

E – Display Errors

N – Background Processing

210)      Write the transaction code of Customer Master Data, Pricing, Inquiry, Quotation and Sales Order.

Ans    Customer Master Data -               XD01

       Pricing                          -

Inquiry                        -        VA11http://abap-tutorials.com 2010

       Quotation                        -       VA21

Sales Order                    -        VA01

                                    -          MM01

211)      What are the fields of Sales Order?

Ans    Transaction Code of Sales Order: VA01

       Table of Sales Order: VBAK

Order Type        -    AUART

       Sales Org       –      VKORG

       Dist Channel     –      VTWEG

       Division         –     SPART

       Sales Office     -      VKBUR
Sales Group       -     VKGRP

212)     What are different types of screen keywords?

Ans     There are four types of screen keywords: Module, Loop, Chain and Field.

213)     Write special commands of List.

Ans There are four specials commands of lists: Write, Uline, Skip and New-Pagehttp://abap-
tutorials.com 2010

214)     Write the following in different manner.

        IF       (A    GE           B)      AND ( A      LE     C)

Ans     IF       A     BETWEEN               B     AND C

215)     What are the different types of ABAP statements?

Ans     There are six types of ABAP statements:

1)     Declarative -            Types, Data, Tables

2) Modularization           -            Event Keywords and Defining Keywords

3)     Control                  -        If…Else, While, Case

4)     Call                 -            Perform, Call, Set User Command, Submit, Leave to

5)     Operational              -         Write, Add, Move

6)     Database                 -         Open SQL & Native SQL

216)     How data is stored in cluster table?

Ans     Each field of cluster table behaves as tables, which contains the number of entries.

217)     What are client dependant objects in ABAP / SAP?

Ans     SAP Script layout, text element, and some DDIC objects.http://abap-tutorials.com 2010

218)     On which event we can validate the input fields in module programs?

Ans In PAI (Write field statement on field you want to validate, if you want to validate group of fields
put in chain and End

chain statement.)

219) In selection screen, I have three fields, plant material number and material group. If I input plant
how do I get the
material number and material group based on plant dynamically?

Ans    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

to get material and material group for the plant.

220)   How do you get output from IDOC?

Ans Data in IDOC is stored in segments; the output from IDOC is obtained by reading the data stored
in its respective

segments.

221)   When top of the page event is triggered?

Ans    After executing first write statement in start-of-selection event.

222)   Can we create field without data element and how?

Ans In SE11, one option is available above the fields strip i.e. Data element / direct type.http://abap-
tutorials.com 2010

223)   Fields of VBAK Table.

Ans    VBAK – Sales Document : Header Data

Details about Sales Organization, Distribution Channel, Division, Sales Group, Sales Office, Business Area,
Outline

Agreements, etc

224)   Which transaction code can I used to analyze the performance of ABAP program.

Ans    Transaction Code AL21.

225)   How can I copy a standard table to make my own Z_TABLE?

Ans Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name
of the standard table

and in the Target table enter Z_table name and press enter.

226)   What is runtime analysis? Have you used this?

Ans It checks program execution time in microseconds. When you go to SE30. If you give desired
program name in
performance file. It will take you to below screen. You can get how much fast is your program.

227)     What is meant by performance analysis?

Anshttp://abap-tutorials.com 2010

228)     How to transfer the objects? Have you transferred any objects?

Ans

229)     How did you test the developed objects?

Ans     There are two types of testing

- Negative testing

- Positive testing

In negative testing, we will give negative data in input and we check any errors occurs.

In positive testing, we will give positive data in input for checking errors.

230)     How did you handle errors in Call Transaction?

Ans We can create an internal table like 'bsgmcgcoll'. All the messages will go to internal table. We
can get errors in this

internal table.

Below messages are go to internal table. When you run the call transaction.

1)     TCODEhttp://abap-tutorials.com 2010

2)     Message Type

3) Message Id

4) Message Number

5) MSGV1

6) MSGV2

7) MSGV3

8) MSGV4

CALL TRANSACTION TCODE USING BDCDATA MODE A/N/E.

UPDATE MODE A/S MESSAGE INTO BDCDATA.
THEN PUT LOOP…ENDLOOP OF BDCMSGCOLL

CALL FUNCTION ‘FORMAT_WRITE’

EXPORT = SYSTEM FIELD

IMPORT = MSG TEXT ERROR

231)   Among the Call Transaction and Session Method, which is faster?

Ans Call transaction is faster then session method. But usually we use session method in real
time...because we can transfer

large amount of data from internal table to database and if any errors in a session, then process will not
complete until

session get correct. http://abap-tutorials.com 2010

232)   What are the difference between Interactive and Drill Down Reports?

Ans ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT
USER-COMMAND

(pressing a button). You can use these events to move through layers of information about individual
items in a list.

Drill down report is nothing but interactive report...drilldown means above paragraph only.

233)   How to pass the variables to forms?

Ans

234)   What is the table, which contain the details of all the name of the programs and forms?

Ans Table contains vertical and horizontal lines. We can store the data in table as blocks. We can
scroll depends upon your

wish. And these all are stored in database (data dictionary).

235)   What are Standard Texts?

Anshttp://abap-tutorials.com 2010

236)   What is the difference between Clustered Tables and Pooled Tables?

Ans A pooled table is used to combine several logical tables in the ABAP/4 dictionary. Pooled tables
are logical tables that

must be assigned to a table pool when they are defined.
Cluster table are logical tables that must be assigned to a table cluster when they are defined. Cluster
table can be used

to store control data. They can also used to store temporary data or text such as documentation.

237)   What is PF-STATUS?

Ans PF-Status is used in interactive report for enhancing the functionality. If we go to SE41, we can
get menus, items and

different function keys, which we are using for secondary list in interactive report.

238)   Among "Move" and "Move Corresponding", which is efficient one?

Ans I guess, 'move corresponding' is very efficient then 'move' statement. Because usually we use this
statement for internal

table fields only...so if we give move corresponding. Those fields only moving to other place (what ever
you want).

239)   What are the Output Type, Transaction codes, Page Format?

Anshttp://abap-tutorials.com 2010

240)   Where we use Chain and End chain?

Ans    In Screen Programming

241) Do you use select statement in loop…end loop, how will be the performance? To improve the
performance?

Ans

242) In select-options, how to get the default values as current month first date and last date by
default? Eg: 1/12/2004 and

31/12/2004

Ans

243)   What are IDOCs?

Ans IDOCs are intermediate documents to hold the messages as a container. http://abap-
tutorials.com 2010

244)   What are screen painter? Menu painter? Gui status? ..etc.

Ans    dynpro - flow logic + screens.
menu painter -

GUI Status - It is subset of the interface elements (title bar, menu bar, standard tool bar, push buttons)
used for a certain

screen.

The status comprises those elements that are currently needed by the transaction.

245)      What is screen flow logic? What are the sections in it? Explain PAI and PBO.

Ans    The control statements that control the screen flow.

PBO - This event is triggered before the screen is displayed.

PAI - This event is responsible for processing of screen after the user enters the data and clicks the
pushbutton.

246)      Overall how do you write transaction programs in SAP?

Ans    Create program-SE93-create transaction code -Run it from command field.

   Create the transaction using object browser (SE80)

Define the objects e.g. screen, Transactions. – Modules – PBO, PAI.http://abap-tutorials.com 2010

247) Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What
is the other type of

screen painter called?

Ans    Yes.

       Operating System – Windows based

Screen Painter – Alpha numeric Screen Painter

248)      What are step loops? How do you program page down page up in step loops?

Ans    Step loops are repeated blocks of field in a screen.

   Step loops: Method of displaying a set of records.

Page down & Page up: decrement / increment base counter

Index = base + sy-step1 – 1

249)      Is ABAP a GUI language?

Ans    Yes, ABAP IS AN EVENT DRIVEN LANGUAGE.
250)   Normally how many and what files get created when a transaction program is written?

What is the XXXXXTOP program?http://abap-tutorials.com 2010

Ans    Main program with A Includes

1. TOP INCLUDE – GLOBAL DATA

2. Include for PBO

3. Include for PAI

4. Include for Forms

251)   What are the include programs?

Ans When the same sequence of statements in several programs is to be written repeatedly. They are
coded in include

programs (External programs) and are included in ABAP/4 programs.

252)   Can you call a subroutine of one program from another program?

Ans    Yes, only external subroutines Using 'SUBMIT' statement.

253)   What are user exits? What is involved in writing them? What precautions are needed?

Ans User defined functionality included to predefined SAP standards. Point in an SAP program where
a customer's own

program can be called. In contrast to customer exits, user exits allow developers to access and modify
program components and

data objects in the standard system. On upgrade, each user exit must be checked to ensure that it
conforms to the standard

system.

There are two types of user exit:

1. User exits that use INCLUDEs - These are customer enhancements that are called directly in the
program.

2. User exits that use TABLEs - These are used and managed using Customizing. Should find the
customer enhancements

belonging to particular development class.

254)   What are RFCs? How do you write RFCs on SAP side?http://abap-tutorials.com 2010
Ans

255)   What are the general naming conventions of ABAP programs?

Ans    Should start with Y or Z.

256)   How do you find if a logical database exists for your program requirements?

Ans    SLDB-F4.

257) How do you find the tables to report from when the user just tell you the transaction he uses?
And all the underlying

data is from SAP structures?

Ans    Transaction code is entered in command field to open the table – Utilities –

Table contents display.

258)   How do you find the menu path for a given transaction in SAP?

Ans

259)   What are the different modules of SAP?

Ans    FI, CO, SD, MM, PP, HR. http://abap-tutorials.com 2010

260)   How do you get help in ABAP?

Ans    HELP-SAP LIBRARY, by pressing F1 on a keyword.

261)   What are different ABAP/4 editors? What are the differences?

Ans

262)   What are the different elements in layout sets?

Ans    PAGES, Page windows, Header, Paragraph, Character String, Windows.

263)   Can you use if then else, perform..etc statements in sap script?

Ans    Yes.

264)   What type of variables normally used in sap script to output data?

Ans

265)   How do you number pages in SAP Script layout outputs?http://abap-tutorials.com 2010

Ans    & page &       &next Page &
266)   What takes most time in SAP script programming?

Ans    LAYOUT DESIGN AND LOGO INSERTION.

267)   How do you use tab sets in layout sets?

Ans    Define paragraph with defined tabs.

268)   How do you backup SAP Script layout sets? Can you download and upload? How?

Ans SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Give source form
name, source client (000

default), Target form name.

Download :- SE71, type form name -> Display -> Utilities -> form info -> List -> Save to PC file.

Upload :- Create form with page, window, page window with the help of downloaded PC file. Text
elements for Page

windows to be copied from PC file.

269)   What are presentation and application servers in SAP?

Ans The application layer of an R/3 System is made up of the application servers and the message
server. Application

programs in an R/3 System are run on application servers. The application servers communicate with the
presentation

components, the database, and also with each other, using the message server.

270) In an ABAP/4 program, how do you access data that exists on Presentation Server vs on an
Application Server?http://abap-tutorials.com 2010

Ans    Using loop statements and Flat

271)   What are different data types in ABAP/4?

Ans

Elementary -

               Predefined: C, D, F, I, N, P, T, X.

User defined: TYPES.

Structured -
Predefined: TABLES.

User defined: Field Strings and internal tables.

272)     What is difference between session method and Call Transaction?

Ans     Call Transaction –

1.     Single transaction

2. Synchronous processing

3. Asynchronous and Synchronous update

4. No session log is created

5. Faster

Session –http://abap-tutorials.com 2010

1. Multiple Transaction

2. Asynchronous processing

3. Synchronous update

4. Session log is created

5. Slower

273)     Setting up a BDC program where you find information from?

Ans

274)     What has to be done to the packed fields before submitting to a BDC session.

Ans     Fields converted into character type.

275)     What is the structure of a BDC sessions.

Ans     BDCDATA (standard structure).

276)     What are the fields in a BDC_Tab Table.

Ans     PROGRAM, DYNPRO, DYNBEGIN, FNAM, FVAL.

277)     What do you define in the domain and data element.http://abap-tutorials.com 2010

Ans Domain - Technical details are defined in Domain like data type, number of decimal places and
length.
     Data Element – Functionality details are defined in Data elements – Field Text, Column Captions,
Parameters ID, and

Online Field Documentation.

278) What is the difference between a pool table and a transparent table and how they are stored at
the database level.

Ans Pool tables are a logical representation of transparent tables. Hence no existence at database
level.

Where as transparent tables are physical tables and exist at database level.

Pool Table -

4)     Many to One Relationship.

5) Table in the Dictionary has the different name, different number of fields, and the fields have the
different name as

in the R3 Table definition.

6) It can hold only pooled tables.

Transparent Table –

4)     One to One relationship.

5) Table in the Dictionary has the same name, same number of fields, and the fields have the same
name as in the R3

Table definition.

6) It can hold Application data.http://abap-tutorials.com 2010

279)     What is cardinality?

Ans For cardinality one out of two (domain or data element) should be the same for Ztest1 and Ztest2
tables. M:N Cardinality

specifies the number of dependent(Target) and independent (source) entities which can be in a
relationship.

280)     For Sales Document: Item Data, which table is used?

Ans VBAP – Sales Document, Sales Document Item, Material Number, Material Entered, Batch
Number, Material Group,

Target Quantity in Sales Document.
281)   What are the types of tables?

Ans

1) Transparent table                                  5) Pool table

2) Cluster table are data dictionary table objects        6) Sorted table

3) Indexed table                                     7) Hash table

4) Internal tables.

282)   What are pooled table?

Ans Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary.
The data from several

different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or
table cluster are

referred to as pooled tables or cluster tables. http://abap-tutorials.com 2010

A table in the database in which all records from the pooled tables assigned to the table pool are stored
corresponds to

a table pool. The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a
long argument

field (Vardata).

Table Clusters Several logical data records from different cluster tables can be stored together in one
physical record in a

table cluster.

A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing
continuation

records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the
cluster tables for

this key. If the data does not fit into the long field, continuation records are created. Control information
on the

structure of the data string is still written at the beginning of the Vardata field.

283)   What are Hashed Tables?
Ans Hashed tables - This is the most appropriate type for any table where the main operation is key
access. You cannot access

a hashed table using its index. The response time for key access remains constant, regardless of the
number of table

entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you
want to construct

and use an internal table, which resembles a database table or for processing large amounts of data.

SAMPLE PROG: THIS DOES NOTHING.

REPORT Z_1 .

TABLES: MARA.

DATA: I TYPE HASHED TABLE OF MARA WITH UNIQUE KEY MATNR

284)   How did you test the form u developed? How did you take the print of it?

Anshttp://abap-tutorials.com 2010

285)   How many maximum number of fields can be there in a table?

Ans

286) How many primary keys can be there in a table?

Ans

287) What are the steps to perform Performance Tuning? What will you do increase the performance of
your system?

Ans

288) What is mandatory in Screen Painter?

Ans

289) If u are entering large amount of data, and system fails, then how many records will be entered
or no records or half

records will be entered?

Ans

290) In Screen Painter, if two fields are mandatory and user do not want to enter anything but he
wants to come out of the
screen, then what will he do?

Anshttp://abap-tutorials.com 2010

291)   What is At-Exit and User-Exit?

Ans

292)   How will you find the standard tables, you only know there names like Customer Master Table?

Ans

293) How will change Development Class?

Ans

294) How will you call both Function Module and Function Group?

Ans

295) What is ALV?

Ans

296) What is Chain-Field & Chain-Loop?

Ans

297)   What is Value-Ranges?

Anshttp://abap-tutorials.com 2010

298)   How will you provide help for value request particular fields?

Ans

299) How will you find relationship between two or more tables?

Ans

300) In BDC’s, if you forget to write one field, then how will you modify that field in your BDC program?

Ans

301) Detail concept of Transport Organizer.

Ans

302) Which is slower “Select *” and “Select field1,field2”?
Ans

303) What are the errors in “Call Transaction”?

Ans

304) What is QA and production?

Anshttp://abap-tutorials.com 2010

305)      How will you display only 10 lines in Report?

Ans

306) In BDC, if out of 10 records, 7 are successful and there are 3 records with some missing fields, how
will you modify those

fields?

Ans

307)      How will you set breakpoint to 100 messages?

Ans

308) How will you set Reports to Background job?

Ans

309) Name the tables, which is used to see all the transaction available.

Ans       See tables, TSTC and TSTCT for all the transaction available

310)      List of SAP supplied Programs.

Ans

Details (5) Program

Purchase Requisitions RM06BB10

Material Master RMDATINDhttp://abap-tutorials.com 2010

Vendor Master RFBIKR00

Customer Master RFBIDE00

Sales Order RVINVB00

SAP SCRIPT PROGRAMS (9)
Logo RSTXLDMC

Debug RSTXDBUG

Upload / Download (Import / Export) RSTXSCRP

Convert Page Format RSTXFCON

Text File Inconsistent RSTXCHK0

Copy Table Across Client RSCLTCOP

Transfer Scripts Files Across System (Not Clients) RSTXSCRP

Comparing The Contents Of A Table RSTBSERV

Change The Development Class RSWBO052

REPORTS (2)

Submit A BDC Job With An Internal Batch Number RSBDCBTC

Release Batch Input Sessions RSBDCSUB

STANDARD PROGRAM (7)

Table Adjustment Across Clients RSAVGL00

Extended Program List RSINCL00

Get The Oracle Release RSORAREL

Display All Instance Parameters RSPARAM

Substitution / Validation Utility RSUGBR00

Check Passwords Of Users SAP And DDIC In All Clients RSUSR003

Last Users Last Login RSUSR006http://abap-tutorials.com 2010

311)   How to schedule a Report in background? what is the use of background job please explain about
it?

Ans    There are 3 ways to schedule in background:

SM36

SE38

SA38
The easiest of the three is SA38.

Why background? In foreground jobs are only allowed a certain amount of runtime. Long running jobs
usually times out

in foreground, and have to be run background. Some customers has day-end jobs to fill custom tables,
and these only

run late at night, so they are scheduled as background jobs as well. There may be any of a hundred
reasons why you

want a job to run in background instead of foreground, and these are only 2 of them.




To have a better idea about what is Unicode, let us first look at what is a CodePage.
CodePage
A Code page is another name for character encoding (A character encoding system consists of a code that
pairs each character from a given repertoire with something else, such as a sequence of natural numbers,
octets or electrical pulses, in order to facilitate the transmission of data (generally numbers and/or text)
through telecommunication networks or storage of text in computers).


Code Page
Some relevant Terms:
Character: a, b, c, A, B,…
Coded character: A=65, B=66,…
Character Set: A set of characters, to be used together (e.g. Latin alphabet)
Code page: A set of coded characters (e.g. ISO-8859-1, Shift-JIS)
Locale: Code page + properties and rules (e.g. isdigit, collation, …)
Why the Need for Unicode
Every standard code page supports only a certain group of languages (e.g Western European, Eastern
European, Japanese).
Within one computer system only one code page can be supported in a clean way. Therefore a universal
code page that supports all letters, punctuation signs, technical symbols etc. of all languages is required.
Unicode Features
Unicode is a superset of all existing character sets. Unicode encodes plain text (no rendering information). It
defines characters, not glyphs (semantics, not visual representation). Unicode unifies characters used in
different scripts (CJK* Unification; CJK= Chinese, Japanese, Korean).
In Unicode there is a space for 1,000,000 characters. 64,000 characters coded by one 16bit code point.
Further characters coded by two 16bit code points (surrogates).


Unicode - Detailed view
Unicode Encoding Forms
UTF-8
byte-based encoding scheme; one character is coded with 1-4 bytes; compatible with 7-bit ASCII.
UTF-16
16bit units; often used characters occupy one 16bit unit; further characters are coded with two 16bit units
UTF-32
32bit units; fixed size for all characters
Note: All encoding forms support the same amount of characters.
Unicode in SAP
UTF-8
for external communication (e.g file, network); no endian problems; minimum average data size; limited backward
compatibility to non-Unicode systems.
UTF-16
internal (in memory); best compromise between memory usage and algorithmic complexity; fits to Java and Microsoft
environment; best way to migrate existing ABAP and C programs.

Everything function that is to performed in SAP is represented in the form of a Transaction and to execute
that Transaction, SAP provide a Transaction Code (T-Code). On the SAP Intial Screen, you can enter this T-
Code in the T-Code field provided at the top.


You can execute the following commands in the transaction code (tcode)
field with Enter. You will find some useful transaction codes below to work in
tandem             with           the           following         commands:
To call a transaction – In the same session (window) Enter: /nxxxx (xxxx
= transaction code). – In an additional session, Enter: /oxxxx (xxxx =
transaction                                                             code).
If you enter this function before any of the tcodes below, you are able to
break out of your current screen/business and begin a completely new
session. Otherwise, the current business process has to be terminated, and
return to the initial user screen (the main menu) has to be initiated before
entering tcode spro). /o tcode saves you the effort of having to do this.
To end the current transaction Enter: /n. Caution: Unsaved changes are lost without warning
To delete the current session. Enter: /i.
To generate a session list Enter: /o. To log off from the system Enter: /nend.
(OSS Note 0026171 has additional information on OKCodes in SAP, and is a very useful read)
Now, since I am on ABAP module, T-Codes related to the module are marked as bold in the following list.
First                                                                                                        Steps:
AL08                  List             of               All            Users                   Logged             On
RZ20                                  CCMS                               Monitor                                Sets
SA38                                ABAP                             Program                              Execution
SCC4                                 Display                             View                               “Clients”
SE11                                                 ABAP                                                Dictionary
SE16                                                   Data                                                Browser
SE38                                                    ABAP                                                  Editor
SE80                     Object                    Navigator                   (ABAP                    Workbench)
SE93                                                Maintain                                            Transaction
SLICENSE                                     SAP                     License                           Administration
SM02                                                 System                                               Messages
SM04                                                     User                                                    List
SM12                     Select                   Lock                 Entries
SM13                                 Update                          Requests
SM21                                     System                            Log
SM28              SAP               Initial         Consitency          Check
SM31                     Maintain                  Table                 Views
SM37                     Simple                  Job                 Selection
SM50                                Process                          Overview
SM51                                    SAP                            Servers
SM66             Global              Work           Process           Overview
SMLT                              Language                         Management
SR13          Administration            of      the          SAP        Library
SU01 User Maintenance
Software Logistics
SAINT Add-On Installation Tool
SE01 Transport Organizer (Extended View)
SE03 Transport Organizer Tools
SE09 Transport Organizer
SPAM Support Package Manager
SPAU Modification Adjustment
SPDD Modification Adjustment Dictionary
SPRO Customizing: Execute Project
SPRO_ADMIN Customizing: Project Administration
STMS Transport Management System

Client Administration
BDLS Tool: Conversion of Logical System Names
SCC1 Copy by Transport Request
SCC3 Client Copy / Transport Log Analysis
SCC4 Display View “Clients”
SCC7 Post-Client Import Methods
SCC8 Client Export
SCC9 Remote Client Copy
SCCL Local Client Copy
SCMP View / Table Comparison
SCU0 Customizing Cross-System Viewer
SE01 Transport Organizer (Extended View)
STMS Transport Management System
User & Authorization
BD82 Generate Partner Profile
LICENSE_ADMIN License Administration Workbench
PFCG Profile Generator / Role Maintenance
SCUG Central User Administration – Transfer Users
SM19 Security Audit: Administer Audit Profile
SM20 Analysis of Security Audit Log
SU01 User Maintenance
SU05 Maintain Internet User
SU10 User Maintenance: Mass Changes
SU20 Maintain Authorization Fields
SU21 Maintain Authorization Objects
SU24 Maintain Assignmt. of Authorization Objects
SU25 Profile Generator: Upgrade / First Install.
SU3 Maintain User Profile
SU53 Display Authorization Data for User
SUCOMP User Company Address Maintenance
SUGR Maintain User Groups
USMM System Measurement
Background Processing
RZ01 Job Scheduling Monitor
RZ04 CCMS: Maintain Operation Modes/Instances
SM36 Define Background Job
SM37 Simple Job Selection
SM37C Extended Job Selection
SM49 External Operating System Commands
SM61 Background Controller List
SM62 Event History
SM64 Background Events
SM65 Analysis Tool – Background Processing
SM69 External Operating System Commands
SMX Job Overview
Update
SM12 Lock Entries
SM13 Update Requests
SM14 Update Program Administration
Output Configuration & Administration
SPAD Spool Administration
SP01 Output Controller: Spool Request Selection
SP12 TemSe – Admin. of Temp. Sequential Data
Data Archiving
AOBJ View Cluster Maintenance
DB15 Tables and Archiving Objects
FILE Logical File Path Definition
OAAD ArchiveLink: Admin. of Stored Documents
OAC0 Content Repositories
OAM1 ArchiveLink: Monitor
SARA Archiv Administration
SARI Archive Info System: Central Management
SF01 Logical File Names, Client-Specific
SM37 Simple Job Selection
Data Transfer & Exchange
BAPI BAPI Explorer
BD73 Error Handlung for Non-Posted IDocs
BD82 Generate Partner Profile
BDM2 IDoc Tracing
BMV0 Manage Data Transfer
IDOC IDoc and EDI Basis: Repair & Check
RZ12 RFC Server Groutp Maintenance
SCOT SAPConnect: Administration
SHDB Transaction Recorder: Recording Overview
SM35 Batch Input: Session Overview
SM58 Transactional RFC
SM59 Configuration of RFC Connections
SMQ1 qRFC Monitor – Outbound Queue
SMQ2 qRFC Monitor – Inbound Queue
SMQR qRFC Monitor – QIN Scheduler
SMT1 Disply and Maintain Trusted Systems
SOST SAPConnect: Transmissen Requests
SXDA Data Transfer Workbench
WE05 IDOC List
WE21 Ports in IDoc Processing
Instance Maintenance
RZ03 Server Statuses and Alerts
RZ04 Maintain Operation Modes and Instances
RZ10 Edit Profiles
RZ11 Maintain Profile Parameters
RZ12 RFC Server Group Maintenance
SM50 Process Overview
SM63 Display/Maintain Operation Mode Set
SMGW Gateway Monitor / Active Connections
SMLG Maintain Logon Groups
SMMS Message Server Monitor
System Monitoring
AL08 List of All Users Logged On
AL11 SAP-Directories
DB13 DBA Cockpit: System Config. Maintenance
DB24 Logs for Adminstrative Database Operations
OS03 Parameter Changes in Operation System
OS07 Operation System Monitor
RZ03 Disply Server Statuses and Alerts
RZ20 CCMS Monitor Sets
SM04 User List
SM12 Select Lock Entries
SM14 Update Program Administration
SM21 System Log: Local Analysis
SM35 Batch Input: Session Overview
SM37 Simple Job Selection
SM50 Process Overview
SM51 SAP Servers
SM58 Transactional
RFCSM66 Global Work Process Overview
SMGW Gateway Monitor / Active Connections
SMICM ICM Monitor
SMMS Message Server Monitor
SMQ1 qRFC Monitor – Outbound Queue
SMQ2 qRFC Monitor – Inbound Queue
SP01 Output Controller: Spool Request Selection
SSAA Administrative Activities
ST01 System Trace
ST02 Tune Summary
ST03, ST03N Workload Monitor
ST04 Maintain Database Integration
ST05 Performance Analysis
ST06 Operation System Monitor
ST07 Application Monitor: User Distribution
ST10 Table Call Statistics
ST11 Error Log Files
ST22 ABAP Runtime Error
ST30 Global Performance Analysis
STAD SAP Workload: Business Transact. Analysis
TU02 Parameter Changes in SAPSYSTEM
Monitoring Architecture
AL15 SAPOSCOL Destination
OS07 Operating System Monitor
RZ04 Maintain Operation Modes and Instances
RZ20 CCMS Monitor Sets
RZ21 Monitoring: Properties and Methods
SE91 Message Maintenance
SE92 System Log Message Maintenance
SM21 System Log: Local Analysis
ST02 Tune Summary
Miscellaneous T-Codes
LSMW Legacy System Migration Workbench
OSS1 SAP Online Service System
SNOTE SAP Note Assistant
SCAT Computer Aided Test Tool
SCU0 Compare Tables
SE18 Business Add-Ins: Definitions
SE19 Business Add-Ins: Implementations
SE24 Class Builder
SE32 ABAP/4 Text Element Maintenance
SE35 ABAP/4 Dialog Modules
SE36 ABAP/4: Logical Databases
SE37 ABAP/4 Function Modules
SE41 Menu Painter
SE43 Maintain Area Menu
SE51 Screen Painter: Initial Screen
SE71 SAPScript Layouts Create/Change
SE72 SAPscript styles
SE73 SAPscript font maintenance (revised)
SE74 SAPscript format conversion
SE75 SAPscript Settings
SE76 SAPscript Translation Layout Sets
SE77 SAPscript Translation Styles
SE93 Maintain Transaction
SHD0 Transaction variant maintenance
SM30 Maintain Table Views
SM35 View Batch Input Sessions
SM37 View background job
SM50 Process Overview
SPRO Start SAP IMG (Implementation Guide)
SQ00 ABAP/4 Query: Start Queries
SQ01 ABAP/4 Query: Maintain Queries
SQ02 ABAP/4 Query: Maintain Funct. Areas
SQ03 ABAP/4 Query: Maintain User Groups
SQ07 ABAP/4 Query: Language Comparison
OAER Image Upload
SNRO/NRIV Maintain Number Ranges
SE54 Maintain Authorization Groups



There are few formatting options available in SAP for text formatting in SAPScript as well as Smartforms.




SAPScript Formatting
Smartforms Formatting
Following are the few useful formatting options:
Offset
N left-most characters of the symbol value will not be displayed.
If symbol has the value 123456789, the following will be displayed:
&symbol& -> 123456789
&symbol+3& -> 456789
&symbol+7& -> 89
&symbol+12& ->
&symbol+0& -> 123456789
Output Length
to define how many character positions should be copied from the value.
If symbol has the value 123456789.
&symbol(3)& -> 123
&symbol(7)& -> 1234567
The SYST-UNAME field contains the logon name of a user called Einstein. The
Dictionary entry for this field contains an output length of 12.
&SYST-UNAME&… -> Einstein…
&SYST-UNAME(9)&… -> Einstein …
&SYST-UNAME(*)&… -> Einstein …
Omitting the Leading Sign
The S option can be used to ensure that the value is formatted without the sign.
The ITCDP-TDULPOS field contains the value -100.00. The ABAP/4 Dictionary
definition for this field includes a leading sign.
&ITCDP-TDULPOS& -> 100.00-
&ITCDP-TDULPOS(S)& -> 100.00
Leading Sign to the Left
This option enables you to specify that the leading sign should be placed to the left of the number.
&ITCDP-TDULPOS& -> 100.00-
&ITCDP-TDULPOS(<)& -> -100.00
Leading Sign to the Right
If you used the SET SIGN LEFT control command to specify that the leading sign should be output before
the value, this specification can be overridden for individual symbols to enable these to be output with the
leading sign to the right.
Syntax:
&symbol(>)&
Omitting Leading Zeros
Certain symbol values are output with leading zeros. If you wish to suppress these, you may do so with the
Z option.
Assuming the current date is 1.1.1994, &DAY& -> 01
&DAY(Z)& -> 1
Space Compression
The C option has the effect of replacing each string of space characters with a single space and shifting
the ’words’ to the left as necessary to close up the gaps.
Assuming ‘ Albert Einstein ‘ is the symbol value,
&symbol& -> Albert Einstein
&symbol(C)& -> Albert Einstein
Number of Decimal Places
A program symbol of one of the data types DEC, QUAN and FLTP can contain decimal place data. This option
is used to override the Dictionary definition for the number of decimal places for the formatting of this
symbol value.
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and
an output length of 17.
&EKPO-MENGE& -> 1,234.560
&EKPO-MENGE(.1) -> 1,234.6
&EKPO-MENGE&(.4) -> 1,234.5600
&EKPO-MENGE&(.0) -> 1,235
Specifying an Exponent for Floating Point Numbers
The way that a floating point number is formatted depends on whether an exponent is specified.
PLMK-SOLLWERT field is assumed to have the value
123456.78 and to be of data type FLTP.
&PLMK-SOLLWERT& -> +1.23456780000000E+05
&PLMK-SOLLWERT(E3)& -> +123.456780000000E+03
&PLMK-SOLLWERT(E6)& -> +0.12345678000000E+06
&PLMK-SOLLWERT(E0)& -> +123456.780000000
&PLMK-SOLLWERT(E)& -> +123456.780000000
Right-Justified Output
Right-justified formatting can be specified with the R option. This option has to be used in conjunction with
an output length specification. If symbol has the value 1234.
&symbol& -> 1234
&symbol(8R) -> 1234
Fill Characters
Leading spaces in a value can be replaced with a fill character.
The figure for customer sales in the KNA1-UMSAT field is $700. The Dictionary description of the field
specifies an output length 8.
&KNA1-UMSAT& -> 700.00
&KNA1-UMSAT(F*)& -> **700.00
&KNA1-UMSAT(F0)& -> 00700.00
Suppress Output of Initial Value
The I option can be used to suppress the output of symbols which still contain their initial value.
Assuming KNA1-UMSAT contains the value 0 and the currency is DEM.
&KNA1-UMSAT& -> 0,00
&KNA1-UMSAT(I)& ->
If the field contains an amount other than 0, this value will be output in the normal way.
&KNA1-UMSAT& -> 700,00
&KNA1-UMSAT(I)& -> 700,00
Ignore Conversion Routines
SAPscript conversion routines specified in the Dictionary are automatically recognized and used when
program symbols are being formatted. Using the K option can prevent these conversions.
Date Mask
The formatting for date fields can be defined with the SAPscript SET DATE MASK command. Executing this
command causes all subsequent date fields to be output using the specified formatting.
/: SET DATE MASK = ‘date_mask’
The following templates may be used in the date mask:
DD day (two digits)
DDD name of day (abbreviated)
DDDD name of day (written out in full)
MM month (two digits)
MMM name of month (abbreviated)
MMMM name of month (written out in full)
YY year (two digits)
YYYY year (four digits)
LD day (formatted as for the L option)
LM month (formatted as for the L option)
LY year (formatted as for the L option)
Time Mask
You can use the SAPscript SET TIME MASK command to format time fields in a way that differs from the
standard setting.
Assuming the current time is 10:08:12.
&TIME& -> 10:08:12
/: SET TIME MASK = ‘HH:MM’
&TIME& -> 10:08
/: SET TIME MASK = ‘HH hours MM minutes’
&TIME& -> 10 hours 08 minutes
&TIME(Z)& -> 10 hours 8 minutes
Other Standard Outputs:
&DAY&,     &MONTH&,       &YEAR&,     &HOURS&,      &MINUTES&,       &SECONDS&,       &DATE&,      &TIME&,     &PAGE&,
&NEXTPAGE&.
-------------------------------------------------------------------------------------------------------------------------
ABAP (Advanced Business Application Programming, originally Allgemeiner Berichts-
Aufbereitungs-Prozessor, German for “general report creation processor”) is a very high
level programming languagecreated by the German software company SAP.




It is currently positioned, alongside the more recently introduced Java, as the language
for programming SAP‟s Web Application Server, part of its NetWeaver platform for
building business applications. Its syntax is somewhat similar to COBOL.

Introduction
ABAP is one of the many application-specific fourth-generation languages (4GLs) first
developed in the 1980s. It was originally the report language for SAP R/2, a platform
that enabled large corporations to build mainframe business applications for materials
management and financial and management accounting.
ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the
German meaning of “generic report preparation processor”, but was later renamed
toAdvanced Business ApplicationProgramming. ABAP was one of the first languages to
include the concept of Logical Databases(LDBs), which provides a high level of
abstraction from the basic database level.
The ABAP programming language was originally used by developers to develop
theSAP R/3platform. It was also intended to be used by SAP customers to enhance
SAP applications – customers can develop custom reports and interfaces with
ABAP programming.The language is fairly easy to learn for programmers but it is not a
tool for direct use by non-programmers. Good programming skills, including knowledge
of relational database design and preferably also of object-oriented concepts, are
required to create ABAP programs.
ABAP remains the language for creating programs for the client-server R/3 system,
which SAP first released in 1992. As computer hardware evolved through the 1990s,
more and more of SAP‟s applications and systems were written in ABAP. By 2001, all
but the most basic functions were written in ABAP. In 1999, SAP released an object-
oriented extension to ABAP called ABAP Objects, along with R/3 release 4.6.




ABAP System Fields
ABAP system fields are always available in ABAP programs. The runtime system fills them according to
context. They can then be used in programs to query the system status. System fields are variables but
you should always treat them as though they were constants, and only read them. If you change their
values, important information for the flow of the program may be lost. In exceptional circumstances,
system fields may be overwritten in an ABAP program to control the system – for example, SY-LSIND (for
navigating to a detail list).
With one exception the names and data types of the system fields are stored in the ABAP Dictionary in
the SYST structure and realized as components of the predefined structure SY in ABAP programs.
The system field SY-REPID is not part of SYST or SY. Instead, every program contains the
predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding
program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.
All system fields are addressed using SY field name and their types using SYST field name.




Alphabetical Overview
The following table lists the definitions of the structure SYST in the ABAP Dictionary alphabetically. The
character in the first column indicates how you can use the corresponding system field in ABAP
programs.Name is the name of the component, Type is the Dictionary data type, and Length is the field
length defined in the Dictionary. The Use column shows in which environment the system fields are set.
The Descriptionindicates the content.
    Name         Type        Length     Use                     Description

    ABCDE        CHAR        26         Constants               Alphabet (A,B,C,...)

    APPLI        RAW         2          Obsolete
    BATCH        CHAR        1          Background              Program runs in the background
                                        processing
    BATZD        CHAR        1          Obsolete
    BATZM        CHAR        1          Obsolete
    BATZO        CHAR        1          Obsolete
    BATZS        CHAR        1          Obsolete
    BATZW        CHAR        1          Obsolete
BINPT   CHAR   1    Batch input         Program runs under batch input

BREP4   CHAR   4    Obsolete
BSPLD   CHAR   1    Obsolete
CALLD   CHAR   1    ABAP Program        Call mode of ABAP program

CALLR   CHAR   8    Printing Lists      ID for print dialog function

CCURS   DEC    9    Obsolete
CCURT   DEC    9    Obsolete
CDATE   DATS   8    Obsolete
CFWAE   CUKY   5    Internal

CHWAE   CUKY   5    Internal

COLNO   INT4   10   Creating Lists      Current column in the list

CPAGE   INT4   10   List processing     Current page number

CPROG   CHAR   40   ABAP Program        External procedure call

CTABL   CHAR   4    Obsolete
CTYPE   CHAR   1    Obsolete
CUCOL   INT4   10   Screens             Horizontal cursor position at PAI

CUROW   INT4   10   Screens             Vertical cursor position at PAI

DATAR   CHAR   1    Screens             Displays user input

DATLO   DATS   8    Date and time       Local date of user

DATUM   DATS   8    Date and time       Current (application server) date

DAYST   CHAR   1    Date and time       Daylight saving time flag

DBCNT   INT4   10   Database accesses   Number of processed table rows

DBNAM   CHAR   20   ABAP Program        Linked logical database

DBSYS   CHAR   10   R/3 System          Name of central database system

DCSYS   CHAR   4    Obsolete
DEBUG   CHAR   1    Internal

DSNAM   CHAR   8    Internal

DYNGR   CHAR   4    ABAP Program        Screen group of current screen

DYNNR   CHAR   4    ABAP Program        Number of current screen

ENTRY   CHAR   72   Internal

FDAYW   INT1   3    Date and time       Factory calendar weekday

FDPOS   INT4   10   Character strings   Offset in character strings
FFILE   CHAR   8     Internal

FLENG   INT4   10    Internal

FMKEY   CHAR   3     Obsolete
FODEC   INT4   10    Internal

FOLEN   INT4   10    Internal

FTYPE   CHAR   1     Internal

GROUP   CHAR   1     Internal

HOST    CHAR   8     R/3 System        Name of application server

INDEX   INT4   10    Loops             Current loop pass

INPUT   CHAR   1     Internal

LANGU   LANG   1     R/3 System        Current language

LDBPG   CHAR   40    ABAP Program      Program of logical database

LILLI   INT4   10    List processing   Selected list row

LINCT   INT4   10    Creating Lists    Page length of list

LINNO   INT4   10    Creating Lists    Current row

LINSZ   INT4   10    Creating Lists    Column width of list

LISEL   CHAR   255   List processing   Content of selected row

LISTI   INT4   10    List processing   Index of selected list

LOCDB   CHAR   1     Obsolete
LOCOP   CHAR   1     Obsolete
LOOPC   INT4   10    Screens           Number of rows visible in table

LPASS   CHAR   4     Internal

LSIND   INT4   10    List processing   Index of detail list

LSTAT   CHAR   16    List processing   ID for list levels

MACDB   CHAR   4     Obsolete
MACOL   INT4   10    Printing Lists    Columns from SET MARGIN statement

MANDT   CLNT   3     R/3 System        Client number from logon

MARKY   CHAR   1     Obsolete
MAROW   INT4   10    Printing Lists    Rows from SET MARGIN statement

MODNO   CHAR   1     R/3 System        Index of external modes

MSGID   CHAR   20    Messages          Message class

MSGLI   CHAR   60    Messages          Message line
MSGNO   NUMC   3    Messages           Message number

MSGTY   CHAR   1    Messages           Message type

MSGV1   CHAR   50   Messages           Message variable

MSGV2   CHAR   50   Messages           Message variable

MSGV3   CHAR   50   Messages           Message variable

MSGV4   CHAR   50   Messages           Message variable

NEWPA   CHAR   1    Internal

NRPAG   CHAR   1    Internal

ONCOM   CHAR   1    Internal

OPSYS   CHAR   10   R/3 System         Operating system of application server

PAART   CHAR   16   Print parameters   Print formatting

PAGCT   INT4   10   Obsolete
PAGNO   INT4   10   Creating Lists     Current page:

PAUTH   NUMC   2    Internal

PDEST   CHAR   4    Print parameters   Output device

PEXPI   NUMC   1    Print parameters   Retention period

PFKEY   CHAR   20   Screens            Current GUI status

PLAYO   CHAR   5    Internal

PLAYP   CHAR   1    Internal

PLIST   CHAR   12   Print parameters   Name of spool request

PNWPA   CHAR   1    Internal

PRABT   CHAR   12   Print parameters   Part of cover sheet


PRBIG   CHAR   1    Print parameters   Selection cover page

PRCOP   NUMC   3    Print parameters   Number of copies

PRDSN   CHAR   6    Print parameters   Name of spool dataset

PREFX   CHAR   3    Obsolete
PRI40   CHAR   1    Internal

PRIMM   CHAR   1    Print parameters   Print immediately

PRINI   NUMC   1    Internal

PRLOG   CHAR   1    Internal

PRNEW   CHAR   1    Print parameters   New spool request
PRREC   CHAR   12   Print parameters    Recipient

PRREL   CHAR   1    Print parameters    Delete after print

PRTXT   CHAR   68   Print parameters    Text for cover sheet

REPI2   CHAR   40   Internal

REPID   CHAR   40   ABAP Program        Current main program

RSTRT   CHAR   1    Internal

RTITL   CHAR   70   Print parameters    Title of printing program

SAPRL   CHAR   4    R/3 System          Release status R/3 System

SCOLS   INT4   10   Screens             Number of columns

SFNAM   CHAR   30   Obsolete
SFOFF   INT4   10   Internal

SLSET   CHAR   14   Selection screens   Name of variant

SPONO   NUMC   10   Printing Lists      Spool number

SPONR   NUMC   10   Obsolete
SROWS   INT4   10   Screens             Number of rows

STACO   INT4   10   List processing     First displayed column

STARO   INT4   10   List processing     Uppermost displayed row

STEPL   INT4   10   Screens             Index of current table row

SUBCS   CHAR   1    Internal

SUBRC   INT4   10   Return value        Return value after ABAP statement

SUBTY   RAW    1    Internal

SYSID   CHAR   8    R/3 System          Name of R/3 System

TABID   CHAR   8    Internal

TABIX   INT4   10   Internal Tables     Current row index

TCODE   CHAR   20   ABAP Program        Current transaction code

TFDSN   CHAR   8    Obsolete
TFILL   INT4   10   Internal Tables     Current number of rows

TIMLO   TIMS   6    Date and time       Local time of user

TITLE   CHAR   70   Screens             Text in header line

TLENG   INT4   10   Internal Tables     Row size

TLOPC   INT4   10   Internal

TMAXL   INT4   10   Obsolete
TNAME   CHAR   30    Obsolete
TOCCU   INT4   10    Obsolete
TPAGI   INT4   10    Obsolete
TSTIS   INT4   10    Internal

TTABC   INT4   10    Obsolete
TTABI   INT4   10    Obsolete
TVAR0   CHAR   20    Creating Lists   Text variable for headers

TVAR1   CHAR   20    Creating Lists   Text variable for headers

TVAR2   CHAR   20    Creating Lists   Text variable for headers

TVAR3   CHAR   20    Creating Lists   Text variable for headers

TVAR4   CHAR   20    Creating Lists   Text variable for headers

TVAR5   CHAR   20    Creating Lists   Text variable for headers

TVAR6   CHAR   20    Creating Lists   Text variable for headers

TVAR7   CHAR   20    Creating Lists   Text variable for headers

TVAR8   CHAR   20    Creating Lists   Text variable for headers

TVAR9   CHAR   20    Creating Lists   Text variable for headers

TZONE   INT4   10    Date and time    Time difference to Greenwich Mean Time

UCOMM   CHAR   70    Screens          Function code that triggered PAI

ULINE   CHAR   255   Constants        Horizontal line with length 255

UNAME   CHAR   12    R/3 System       Logon name of user

UZEIT   TIMS   6     Date and time    Current (application server) time

VLINE   CHAR   1     Constants        Vertical line

WAERS   CUKY   5     Obsolete
WILLI   INT4   10    Obsolete
WINCO   INT4   10    Obsolete
WINDI   INT4   10    Obsolete
WINRO   INT4   10    Obsolete
WINSL   CHAR   79    Obsolete
WINX1   INT4   10    Obsolete
WINX2   INT4   10    Obsolete
WINY1   INT4   10    Obsolete
WINY2   INT4   10    Obsolete
   WTITL        CHAR        1          Creating Lists          Flag for standard page header

   XCODE        CHAR        70         Internal

   XFORM        CHAR        30         Internal

   XPROG        CHAR        40         Internal

   ZONLO        CHAR        6          Date and time           Time zone of user

Key:
       The system field is set by the runtime environment. Its content can be evaluated in the
       ABAP program but not changed.
       The system field is set by the runtime environment. Its content can be changed in the
       ABAP program to influence the runtime environment.
       The system field must be set in the ABAP program. It can then be evaluated by the
       runtime environment or the program.
       The system field is only for internal use and must not be used in ABAP programs.

       The system field is obsolete and its content is not set. It cannot be used in ABAP
       programs.




ABAP System Fields
System fields are filled by the ABAP runtime environment and can be used in an
ABAP program to query system statuses. With one exception ( sy-repid), system
fields are variables, but they should only be accessed on a read-only basis. Otherwise,
important information for further program execution often gets lost. System fields in
ABAP programs can only be overwritten in a few cases to control system behavior.

With the exception of sy-repid, the data types of the system fields are defined in the
structure SYST in the ABAP Dictionary (as of release 6.10), and are instantiated in
ABAP programs as components of the predefined structure sy. The structure sy exists
only once in an internal session and is used by all programs of an internal session.

The structure sy can also be addressed via syst. There is also a predefined data
type sy, which can be used instead of the data type SYST of the ABAP Dictionary.

The following table shows the system fields that can be used in ABAP programs. All
other components of the structure sy are either intended for internal use by the ABAP
runtime environment or are obsolete.
Name    Type     Content

sy-              Contains the Latin alphabet. Can be used to access individual letters directly by specifying the
        c(26)
abcde            offset/length, regardless of the code page.

sy-
        c(1)     Set to "X" in an ABAP program that runs in the background, otherwise initial.
batch

sy-              Set to "X" during processing of batch input sessions, and in ABAP programs called
        c(1)
binpt            using CALL TRANSACTION USING. Otherwise initial.

                 Contains a blank character in the first program in a call sequence, otherwise contains the
                 value "X". Is set to "X" after calls using CALL TRANSACTION, CALL DIALOG, or SUBMIT
sy-
        c(1)     ... AND RETURN. Empty if the program was started using LEAVE TO
calld
                 TRANSACTION or a transaction from the screen. A call using SUBMIT (without AND
                 RETURN) assumes the value of the calling program.

                 When printing lists, contains a value that displays where printing was started - for
sy-
        c(8)     example, NEW-PAGE for program-controlled printing, or RSDBRUNT for printing from
callr
                 the selection screen.

                 Current position during creation of a list in the list buffer. Counting begins at 1. In non-
                 Unicode systems, this position also corresponds to the column in the displayed list. In
sy-
        i        Unicode systems, this is only guaranteed for the lower and upper output limits applicable to
colno
                 each output, as one character may take up more columns in the list than positions in the list
                 buffer.

sy-              Page number of the page displayed at the top of the list for which a list event was triggered.
        i
cpage            Counting begins at 1.

              In procedures called externally, the name of the calling program, Otherwise the name of the
sy-           current program. If a procedure called externally calls another external procedure, sy-
        c(40)
cprog         cprog contains the name of the framework program, and is not set to the name of the
              framework program of the subsequent calling program.

sy-
        i        Horizontal cursor position in the display on a screen. Counting begins at column 2.
cucol

sy-
        i        Vertical cursor position on the screen display of a screen. Counting begins at line 1.
curow

sy-              At PAI, contains "X" if at least one input field of a screen has been changed by a user or by
        c(1)
datar            further data transfer, otherwise initial.

sy-
        d        Local date of the user - for example, "19990723". Can be set using GET TIME.
datlo
sy-
        d        Local date of the ABAP system. Can be set using GET TIME.
datum

sy-
        c(1)     "X" during summertime, otherwise initial.
dayst

sy-
        i        SQL statements set the content of sy-dbcnt to the number of processed table lines.
dbcnt

sy-
        c(20) In executable programs, the linked logical database.
dbnam

sy-
        c(10) Central database system - for example, "ORACLE", "INFORMIX".
dbsys

                 Screen group of the current screen. In the Screen Painter, several screens can be assigned to
sy-
        c(4)     a common screen group, which can be used, for example, for making modifications to all
dyngr
                 screens in the group at once.

                 Number of the current screen. During selection screen processing, this is the current
sy-
        c(4)     selection screen. During list processing, the number of the subscreen container. During
dynnr
                 processing of a subscreen screen (including in tabstrips), this screen number.

sy-
        b        Factory calendar weekday, Monday = 1, ..., Friday = 5.
fdayw

sy-
        i        Found location for search in byte-type and character-type data objects.
fdpos

                 Network name of the computer on which the current application server is instantiated - for
sy-host c(32)
                 example, "KSAP0001", "HS01234".

sy-              Loop index. In DO and WHILE loops, contains the number of the loop passes including the
        i
index            current pass.

sy-              Single-character language key - for example, "D", "E", "F" - for the current text environment.
        c(1)
langu            Set according to the logon language of the user or by using the statement SET LOCALE.

sy-
        c(40) In executable programs, the database program of the linked logical database.
ldbpg

sy-              List line for which a list event was triggered. Counting begins at 1 and includes the page
        i
lilli            header.

        i
sy-              Page length of the current list during list creation. sy-linct is 0 for a standard list of any
linct              length, and has a value that is not 0 for lists with a defined page length.




sy-
          i        Current list line during list creation. Counting begins at 1 and includes the page header.
linno

sy-
          i        Line width of the current list in the list buffer during list creation.
linsz

sy-                Content of the list line in the list buffer, on which the cursor was positioned while a list event
          c(255)
lisel              was triggered (restricted to the first 255 lines).

sy-
          i        List level of the list for which a list event was triggered.
listi

sy-
          i        Number of lines currently displayed in a table control.
loopc

                   List level of the list that is currently being created (basic list: 0, details lists: greater than 0).
sy-
          i        For every interactive list event, sy-lsind is automatically increased by an increment of
lsind
                   1. sy-lsind can only be changed in ABAP programs for navigating between details lists.

sy-
          i        When printing lists, contains the number of columns on the left edge.
macol

sy-
          c(3)     client identifier with which the user has logged on - for example, "401", "800".
mandt

sy-
          i        When printing lists, contains the number of lines on the top margin.
marow

                   Indexing of external sessions. Contains the value 0 in the first session. In new sessions that
sy-
          i        are opened using the Create Session function or by calling a transaction with /o in the input
modno
                   field of the standard toolbar, this value is increased by 1.

sy-
          c(20) After the statement MESSAGE, contains the message class.
msgid

sy-
          n(3)     After the statement MESSAGE, contains the message number.
msgno

sy-
          c(1)     After the statement MESSAGE, contains the message type.
msgty

sy-           After the statement MESSAGE, contain the contents of the fields that were used as
        c(50)
msgv1         placeholders in the message.
... sy-
msgv4

sy-
        c(10) Operating system of the current application server - for example, "SOLARIS", "HP-UX".
opsys

sy-
        i        Current page in list creation.
pagno

sy-
        c(20) GUI status of the current screen.
pfkey

sy-
        c(6)     When printing lists, contains the name of the spool file.
prdsn

              Name of the current ABAP program. For procedures called externally, name of
              the framework program of the procedure. sy-repid when transferring actual parameters
sy-
        c(40) to an external procedure, before release 6.10, the formal parameter was not set to the name
repid
              of the caller, but to the name of the procedure instead. As of release 6.10, sy-repid can
              be transferred to procedures without help fields.

sy-
        c(4)     Release status of the ABAP system - for example, "46D", "610".
saprl

sy-
        i        Number of columns of the current screen.
scols

sy-
        c(14) Variant that was used for filling a selection screen.
slset

sy-
        n(10) When printing lists, contains the name of the spool number.
spono

sy-
        i        Number of lines of the current screen.
srows

sy-              Number of the first column displayed in the list for which a list event has been triggered.
        i
staco            Counting begins at 1.

sy-              Number of the list line displayed at the top of the page at the top of the list, for which a list
        i
staro            event was triggered. Counting begins at 1 and does not include the page header.

sy-
        i        Index of the current line in a table control. This is set for every loop pass.
stepl

                 Return value that is set by many ABAP statements. In general, the value 0 means that the
sy-
        i        statement was executed with no problems. Depending on which statement was used to
subrc
                 set sy-subrc, the cause of any errors can be derived from the corresponding value.
sy-                Name of the ABAP system - for example, "S01", "K99"
          c(8)
sysid
                   .

sy-                Table index. Last addressed line of a standard table or sorted table. Is set to 0 if hashed
          i
tabix              table is accessed.

sy-                Name of the current transaction code. Initial in background processing, unless a transation
          c(20)
tcode              was called during background processing.

sy-                In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tfill is filled
          i
tfill              with the number of lines in the internal table that has been addressed.

sy-
          t        Local time of the user, for example "152557". Can be set using GET TIME.
timlo

sy-
          c(70) Text that appears in the title bar of the screen.
title

sy-                In the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, sy-tleng is filled
          i
tleng              with the line size of the internal table that is being addressed.

sy-
              These system fields can be assigned values in the program. At the event TOP-OF-PAGE, the
tvar0
        c(20) content of sy-tvar0 to sy-tvar9 replaces the placeholders "&0" to "&9" in the list and
... sy-
tvar9         column headers of the text elements of the program.


sy-
          i        Time difference to the UTC reference time in seconds - for example, "3600", "10800".
tzone

sy-
          c(70) Function code that triggered the event PAI.
ucomm

sy-
          c(255) Contains a horizontal line of length 255 for displaying in lists.
uline

sy-
          c(12) User's logon name - for example, "KELLERH".
uname

sy-
          t        Local time of the ABAP system. Can be set using GET TIME.
uzeit

sy-
          c(1)     Contains a vertical line (|) for displaying in lists.
vline

sy-                In the statements REPORT, PROGRAM, and FUNCTION-POOL, set to "N" if the addition NO
          c(1)
wtitl              STANDARD PAGE HEADING is used, otherwise initial.
sy-
          c(6)    Time zone of the user - for example, "CET", "PST".
zonlo




The data type and length of the system fields are specified in the second column in the
notation type(length).

As of release 6.10, the system field sy-repid is no longer a part of the
structures SYST or sy. Instead, each program contains the predefined constants sy-
repid and syst-repid, which both contain the name of the relevant program. There are
also two predefined types with the same names, sy-repid and syst-repid, of
type c and length 40.
Notes


       As of Release 7.0, the static methods of the class CL_ABAP_SYST also return
        important system statuses. There is no possibility of a previous overwriting in
        the program.

       If possible, a system field should be evaluated directly following the statement
        that set it, so that it is not overwritten by other statements. If necessary, store
        the values of system fields in auxiliary variables.

       A system field should only be used as an operand at a read position if its
        content is not set by the same statement. Otherwise, the system may behave
        unexpectedly.

       System fields and the corresponding structure SYST have a purely programm-
        internal significance. No dynpro fields should be created with reference to
        system fields, since the corresponding field helpsare not intended for end
        users.

       Internal system fields are intended solely for internal use within the ABAP
        runtime environment and in the kernel. They must not be overwritten in ABAP
        programs and should not be read processed either.

       The obsolete system fields were copied in the transition from R/2 to R/3 and
        are no longer supplied. These system fields must no longer be used.

       An extended list of system fields is available in the application help.
1. Preparation of the data records by the L.D.B and reading of the data records in the actual report are
       accomplished with the command pair Put and Get.
2. The three main elements of LDB are Structure, Selections, and Database Program.
3. In LDB what determines hierarchy of the tables?

Structure.


4. In general what are the two ways in which one can retrieve data from tables?

Using Select statements, Database Program.


5. With LDB one can modify the pre-generated selection screen to their needs (T/F).

Yes.


6. Logical databases are programs that read data from Database tables (Dictionary Structures).
7. The event Get<table name> LATE process all tables that are hierarchically superior to the <table
       name>. (True/False)


False. It processes all tables that are hierarchically inferior to the <table name>.


8. The Database Program of LDB is a collection of SUBROUTINES, which selects data and passes it to the
report.


9. The layout of the Database program is determined by both Structure andSelections.
10. The order in which data is made available to the report depends on Structureof the LDB.
11. Apart from the structure and selections of the LDB the GET statements in the report determines the
       behavior of the database at runtime.
12. Node at the highest level in the structure is known as Root.
13. There can be more than one node at the highest level in the structure. (T/F)

False. One can define only one node at the highest level in the structure on LDB.


14. All nodes in the structure of LDB need not be defined in the ABAP/4 Dictionary (T/F).

False. One has to define all nodes in the Dictionary or one has to select all nodes that are defined in the
Dictionary.


15. It is not possible to use ABAP/4 Dictionary Structures without an underlying database using LDB.
       (T/F)


True. One can use additionally related tables, along with the tables defined in the structure of LDB.


16. Dynamic selections allow the user to define further selections for database access in addition to the
       selection criteria already defined in the LDB selections.
17. Check statement can be used along with the event GET in the report for checking the selections,
     which are not table-specific values.
18. In sense of Database Management System (DBMS) LOGICAL DATABASE is a database Structure.
     (T/F).


False.


19. It is not necessary to maintain the Parent-Child relationship between the tables in Logical Database
     Structure. (T/F)


False. One has to maintain the Parent-Child relationship.


20. Is it possible to extract data from tables without using the event ‘GET’ in the report with an
     appropriate LDB. (T/F).


False. One can extract data from tables using Select statements in a report, though the report is having a LDB
attribute.


21. What sorts of tables one can se in designing the hierarchy of a LDB?

Tables, which are having Foreign Key relations.


22. A report program, which uses only SELECT statements, is called SQL Report.
23. One cannot use SELECT statements in a report program linked to a Logical Database (T/F). False.
24. Is it true that the Logical Database reads the data from the database tables using Select Statements
     (T/F).


Yes. We are coding that in Database part of LDB.




25. In a report with an LDB attribute, you do not have to define how the information should be retrieved
     from the database tables, but only how the data should be represented on the screen. (T/F).


True.


26. One can use the event GET in a report without LDB attribute. (T/F).

False.


27. The last character of the LDB name denotes Application.
28. The structure of Logical Databases reflects the Foreign Key dependencies of hierarchical tables in
     the SAP system.
29. It is mandatory that for each table in the LDB hierarchy there should exist one GET statement in the
     report. (T/F).
 False. It is not necessary.


 30. What happens if a report does not contain a GET statement for a particular node of a Logical
      Database.


 Process will transfer to the next event.


 31. In a Logical Database, one can define input fields on the selection screen withSelect-
      Options and Parameters statements.
 32. Suppose a logical database program contains the following lines:

 SELECT-OPTIONS CONNID FOR SPFLI-CONNID.


 PARAMETERS CARRID LIKE SFLIGHT-CARRID FOR TABLE SFLIGHT.


 What will be the output, for the above two statements?


 Only select-options connid for spfli-carrid will be displayed on the screen.




 33. Consider a report with F1S attribute, what will be the output for the following code. Whether you will
      get the data from spfli and sflight or not, with corresponding tables statement,


GET SPFLI.


GET SFLIGHT.


Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.


Yes, you will get the data from spfli and sflight.




 34. Consider a report with F1S attribute, what will be the output of the following code. Whether you will
      get the data from sbook or not, with corresponding tables statement.


 GET SPFLI.


 GET SFLIGHT.


 Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.


 You cannot extract data from sbook.
 35. Identify any errors in the following code and correct the same, and what will be the output. If there
      exists corresponding tables statement, for spfli, sflight, sbook.


 GET SPFLI.


 GET SBOOK.


 Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid, sbook-class.


 No syntax errors. You will get data from all the three tables.




 36. Does the following two statements do the same task? If so which one takes less time and which one
      is recommended.


Select * from spfli where spfli-carrid = „LH‟ and spfli-connid = „400‟.


Endselect.


Select * from spfli. Check: spfli-carrid = „LH‟ and spflid-connid = „400‟.


Endselect.


-Yes they will do the same task. Second Select statement takes less time and is recommended.




 37. If you want to improve the response time (time to access data) Logical Databases permits you to
      achieve this using VIEWS.
 38. Is there any upper limit (max) to the possible number of nodes in a logical database structure? If so
      what is the limit?


 Yes, there is an upper limit for defining number of nodes in a Logical Database Structure.


 Maximum nodes = 1200 / length where length = max. Length of name in the structure.




 39. In the structure of Logical Database nodes at different levels are displayed in the same columns.
      (T/F) If false what types of nodes are displayed in the same columns. If true what type of nodes are
      not displayed in the same columns.
False. Nodes at same levels are displayed in the same columns.




40. What are the advantages of Logical Databases?

It offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It
offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data
selections. It contains central authorization checks for data base accesses. Enhancements such as improved
performance immediately apply to all report programs that use the logical database.




41. Though all the ABAP/4 Dictionary Structures that exists in the structure of the LDB, being defined in
    Database Program, we are defining the Dictionary Structures in the Report. What is the reason for
    such declaration?


By declaring so we are providing work areas for data passing between Logical Database and Report. In
addition, the logical database configures the selection screen depending on the selection of database tables.




42. Is it mandatory to declare all the tables in Report by the key word tables for all the tables that exist in
    the structure of LDB, and are being defined in the Database part of LDB.


No, It is not mandatory to declare all tables in report.




43. If one wants to access data using Logical Database, the use of events is unavoidable. (T/F). True.

						
Related docs
Other docs by LBY2ks
eckbo
Views: 175  |  Downloads: 0
Tdoclist_RAN1 20 2350 Aug_2007
Views: 95  |  Downloads: 0
sbirsttr2001
Views: 0  |  Downloads: 0
macrosswalk2 11 11
Views: 12  |  Downloads: 0
plan 20de 20afaceri
Views: 7  |  Downloads: 0
SHERLOCK - Excel - Excel
Views: 295  |  Downloads: 0
AGU_OS10_Affiliation_List_Media
Views: 21  |  Downloads: 0
trudnosti_perevoda_Guskova_Ziborova
Views: 81  |  Downloads: 0
bees
Views: 10  |  Downloads: 0
lecture1
Views: 1  |  Downloads: 0