Monday, November 10, 2014

‘HELLO WORLD’ ABAP PROGRAM | ABAP Project


  • Call Transaction ‘SE38′.
  • Create a new program.

To proceed in an SAP 3.x system you must be registered as a Developer. You get your Developer Key from your Sys. admin in a couple of minutes/hours/days after you applied for it. It must be entered once when you create your first program.

Program attributes:

  • Type: 1
  • Application: S
  • Choose a meaningful title
  • (Save)
  • Choose Development Class &TMP or press Button ‘Local object’

Now you can edit the source code.

Position the cursor in a line number cell. Press F1 for the help of editor line commands.

enter i3 which inserts three new rows into your program.

report zhello.
write: / 'hello world'.
(Save, Generate, Execute)

In 3.x you can set your Editor mode in menu /Settings/Editor mode

(in 2.x this is the only editor mode)

If you choose Command mode you get an extra input line, where you can execute commands. Position the cursor here and press F1 for the available commands. My favorite one is the HELP command.Try out the HELP WRITE command. What you see now is a hypertext (clickable). I know that this online help is an online meaningless chaos for the first time, but sooner or later it should become your reference

SAP ABAP JOBS-2014 | 2015

ABAP , Abap Consultant , Sap Abap Consultant , ABAP IS , ABAP ISU

NTT DATA


Experience :4 to 9 yrs

Salary Rs 3.10 - 9.50 Lacs p.a.

Location :Bengaluru / Bangalore , Delhi / NCR , Hyderabad / Secunderabad , Mumbai , Noida / Greater Noida

Key Skills :ABAP Workflow  Workflow Management  Webdynpro  Adobe Forms  Web Dynpro Abap  Sap Abap sap abap consultant  abap consultant  abap technical consultant

Job Function :IT / Telecom - Software

Industry :IT-Software

Specialization :Software Engineer

Qualification: 
Any Post Graduate
Any Graduate

100 [UPDATED] ABAP Interview Questions and Answers

ABAP Interview Questions :

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 contradiction. 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 seldomly 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 ease 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 are included in the index. Yhe 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 has 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 has 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-organising 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 language-dependent 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 applications.

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 documents. 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 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).

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 SAPscripts 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.

23. What is the difference between macro and subroutine?

Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the 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 Technical Interview Questions:


1. What is the typical structure of an ABAP program?
2. What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups?
3. What should be the approach for writing a BDC program?
4. What is a batch input session?
5. What is the alternative to batch input session?
6. 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?
7. What is the difference between a pool table and a transparent table and how they are stored at the database level?
8. What are the problems in processing batch input sessions? How is batch input process different from processing on line?
9. What do you define in the domain and data element?
10. What are the different types of data dictionary objects?
11. How many types of tables exist and what are they in data dictionary?
12. What is the step-by-step process to create a table in data dictionary?
13. Can a transparent table exist in data dictionary but not in the database physically?
14. What are the domains and data elements?
15. Can you create a table with fields not referring to data elements?
16. What is the advantage of structures? How do you use them in the ABAP programs?
17. What does an extract statement do in the ABAP program?
18. What is a collect statement? How is it different from append?
19. What is open sql vs native sql?
20. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
21. What is the meaning of ABAP editor integrated with ABAP data dictionary?
22. What are the events in ABAP language?
23. What is an interactive report? What is the obvious diff of such report compared with classical type reports?
24. What is a drill down report?
25. How do you write a function module in SAP? Describe.
26. What are the exceptions in function module?
27. What is a function group?
28. How are the date abd time field values stored in SAP?
29. What are the fields in a BDC_Tab Table?
30. Name a few data dictionary objects?
31. What happens when a table is activated in DD?
32. What is a check table and what is a value table?
33. What are match codes? Describe?
34. What transactions do you use for data analysis?
35. What is table maintenance generator?
36. What are ranges? What are number ranges?
37. What are select options and what is the diff from parameters?
38. How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?
39. What are selection texts?
40. What is CTS and what do you know about it?
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?
44. Name a few system global variables you can use in ABAP programs?
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?
46. How do you take care of performance issues in your ABAP programs?
47. What are datasets?
48. How to find the return code of a stmt in ABAP programs?
49. What are interface/conversion programs in SAP?
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?
53. What specific statements do you using when writing a drill down report?
54. What are different tools to report data in SAP? What all have you used?
55. What are the advantages and disadvantages of ABAP query tool?
56. What are the functional areas? User groups? How does ABAP query work in relation to these?
57. Is a logical database a requirement/must to write an ABAP query?
58. What is the structure of a BDC sessions.
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?
61. What do you do with errors in BDC batch sessions?
62. How do you set up background jobs in SAP? What are the steps? What are the event driven batch jobs?
63. Is it possible to run host command from SAP environment? How do you run?
64. What kind of financial periods exist in SAP? What is the relevant table for that?
65. Does SAP handle multiple currencies? Multiple languages?
66. What is a currency factoring technique?
67. How do you document ABAP programs? Do you use program documentation menu option?
68. What is SAPscript and layout set?
69. What are the ABAP commands that link to a layout set?
70. What is output determination?

Sap Abap Tutorials

Sap Abap Tutorials:


  1. SAP Introduction
  2. Abap Shortcut And Commands
  3. Abap Formating Options
  4. Abap Basic Concepts
  5. CONTROL BREAK STATEMENTS
  6. Abap DATA DICTIONARY
  7. DESIGNING OF SELECTION SCREEN
  8. INCLUDE Program
  9. INTERNAL TABLES
  10. SELECT OPTIONS, Structure of Selection Table
  11. Table Maintenance Generator - TMG Create Entries, ...
  12. Editable ALV With Save Functionality Using Normal ...
  13. FUNCTION MODULES, SUBROUTINES, VARIANT CREATION
  14. Table Joins
  15. Creation of DB view
  16. CREATION OF VIEW & HOW TO CALL VIEW INTO PROGRAM
  17. STRUCTURE CREATION & HOW TO CALL A STRUCTURE INTO ...
  18. Abap Report - Types of Report and Events in Report...
  19. Abap Interactive Reports
  20. Abap DAILOG and MODULE POOL program
  21. ALV -- ABAP LIST VIEWER
  22. Abap AT EXIT-COMMAND, SUBSCREENS
  23. Abap TABLE CONTROL
  24. CALLING A REPORT PROGRAM INTO MODULE POOL Abap
  25. Drop down List Box Abap
  26. Abap BDC (Batch Data Communication)
  27. Abap CALL TRANSACTION
  28. SubTotal And Total In ALV Grid Without ABAP OOPs C...
  29. Abap LSMW ( Legacy System Migration Workbench )
  30. Creating files at Application Layer which is perma...
  31. Abap SAP SCRIPTS
  32. Abap SESSION METHOD
  33. Abap SUBROUTINES in SCRIPTS
  34. Coloring a Particular Cell in ALV withouts ABAP OO...
  35. Abap RFC CREATION, Create FM in SAPLER
  36. Abap IDOC - IDOC Types , IDOC Record Types , ALE(A...
  37. BAPI (Business Application Programming Interface)
  38. Business Add-Ins (BADIs)
  39. Abap IDOC Transaction Codes and IDOC Demo Program
  40. Abap Inbound Idocs
  41. Abap USER-EXITS
  42. Basic Transaction Codes Involved in IDOC/ALE
  43. Master Data Transactions Abap
  44. IDOC Reduction Maintenance Abap
  45. Message Control (Output TYpes) Abap
  46. Buffering Types Abap
  47. Change Pointers abap
  48. EXTENSION OF IDOC USING USER EXITS Abap
  49. Search Help and Lock Object
  50. SMART FORMS Abap


Sunday, November 9, 2014

106 TOP SAP ABAP Interview Questions and Answers PDF

sap abap interview questions and answers for experienced pdf--CLICK HERE

106 Top SAP ABAP Interview Questions and Answers:

1)   What is SAP ABAP?

2)   What do you mean by an ABAP data dictionary?

3)   Explain the difference between pool tables and transparent tables?

4)   What do you mean by BDC (Batch Data Communications) programming?

5)   Describe the data classes?

6)   What are the internal tables?

7)   List down the functional modules used in sequence in BDC?

8)   What is a foreign key relationship?

9)   In ABAP what are the differences between table and structure in data dictionary?

11)   What are the components of SAP scripts?

12)   How to create ‘table cluster’?

13)   How can you format the data before write statement in the report?

14)   Explain the difference between Template and Table?

15)   Mention what is ALV programming in ABAP? When is this grid used in ABAP?

16)   When do we use End-of-selection?

17)   Mention the difference between ABAP and OOABAP? In what situation do you use OOABAP?

18)   What is table buffer?  Which type of tables used this buffer?

19)   What is the use of ‘pretty printer’?

20)   What is the difference between ‘Type’ and ‘Like’?

21)   What are the different ABAP/4 editors? What are the differences?

22)   Explain the difference between dialog program and a report?

23)   What is lock object?

24)   How data is stored in cluster table?

25)   How can you debug a script form?

26)   What are different types of data dictionary objects?

27)   What are the ways you can do the tuning? What are the major steps will you use for these?

28)   In the ‘select’ statement what is ‘group by’?

29)   What is dispatcher?

30)   Mention what are the two methods of modifying SAP standard tables?

31)   What is the difference between a ‘Database index’ and a ‘Match code’?

32)   Explain the benefits of modularization technique?

33)   How can you create callable modules of program code within one ABAP/4 program?

34)   What are different types of parameters? How can you distinguish between different kinds of parameters?

35)   What are the different databases Integrities?

36. What are ranges? What are number ranges?
ANS:-
max,min values provided in selection screens.

37. What are select options and what is the diff from parameters?
ANS:-
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 <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.
diff:-
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.
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?
ANS:-
validate :- by using match code objects.
display :- Parameters <name> default ‘xxx’.
select-options <name> for spfli-carrid.

39. What are selection texts?
ANS:-

40. What is CTS and what do you know about it?
ANS:-
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?
ANS:-

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

43. Are programs client dependent?
ANS:-
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?
ANS:-
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?
ANS:-
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.
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 <FS> [<TYPE>].
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?
ANS:-
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?
ANS:-
Using function modules.

49. What are interface/conversion programs in SAP?
ANS :
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?
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.
adv:-
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.
disadv:-
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?
ans:-
AT LINE-SELECTION,AT USER-COMMAND,AT PF.

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

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?
ans:-
we will look into the error log file (SM35).

61. 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 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?
ans:-
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?

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

65. Does SAP handle multiple currencies? Multiple languages?
ans:-
Yes.
66. What is a currency factoring technique?

68. What is SAPscript and layout set?
ans:-
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?
ans:-
control commands,system commands,

70. What is output determination?

71. What are IDOCs?
ans:-
IDOCs are intermediate documents to hold the messages as a container.

72. 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.

73. 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.

74. Overall how do you write transaction programs in SAP?
ans:-
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?
ans:-
step loops are repeated blocks of field in a screen.

77. Is ABAP a GUI language?
ANS:-
Yes.
ABAP IS AN EVENT DRIVEN LANGUAGE.

78. Normally how many and what files get created when a transaction program is written?
What is the XXXXXTOP program?
ans:-
ABAP/4 program.
DYNPRO

79. What are the include programs?
ANS:-
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?
ans:-  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?
ANS:-
Should start with Y or Z.

84. How do you find if a logical database exists for your program requrements?
ans:-
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?
ans:-
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?
ans:-

87. What are the different modules of SAP?
ans:-
FI,CO,SD,MM,PP,HR.

89. How do you get help in ABAP?
ans:-
HELP-SAP LIBRARY,by pressing F1 on a keyword.

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

91. What are the different elements in layout sets?
ans:-
PAGES,Page windows,Header,Paragraph,Character String,Windows.

92. Can you use if then else, perform ..etc statements in sap script?
ans:-
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?
ANS:-
LAYOUT DESIGN AND LOGO INSERTION.

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?
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.

99. In an ABAP/4 program how do you access data that exists on a presentation server vs on an application server?
ans:-
i)using loop statements.
ii)flat

100. What are different data types in ABAP/4?
ans:-
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?
ans:-

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

103. What has to be done to the packed fields before submitting to a BDC session.
ans:-
fields converted into character type.

104. What is the structure of a BDC sessions.
ans:-
BDCDATA (standard structure).

105. What are the fields in a BDC_Tab Table.
ans:-
program,dynpro,dynbegin,fnam,fval.

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

  1. sap abap interview questions and answers on smartforms
  2. sap abap interview questions and answers on reports
  3. sap abap interview questions and answers pdf for freshers

sap abap interview questions and answers 2014
sap abap interview questions for experienced
sap abap interview questions for 2+ years experience
sap abap interview questions and answers pdf
sap abap interview questions for freshers
sap abap interview questions and answers pdf for freshers
sap abap interview questions accenture

sap abap interview questions and answers for freshers

  • sap abap interview questions on reports
  • sap abap interview questions for 3 years experience
  • sap abap interview questions to 3+ years of experience
sap abap interview questions and answers for 2 years experienced
sap abap interview questions for experienced candidates
sap abap interview questions for 2 years experience
sap abap interview questions for 2+ years experience
abap interview questions for experienced
abap interview questions pdf
abap interview questions on reports
abap interview questions for freshers
abap interview questions accenture

  1. abap interview questions on data dictionary
  2. abap interview questions accenture
  3. abap interview questions pdf

abap interview questions for 3 years experience
abap interview questions 2012
ibm abap interview questions
abap interview questions on reports
abap interview questions for freshers
abap interview questions on data dictionary
sap abap interview questions and answers pdf
abap interview questions and answers ibm
abap interview questions and answers in accenture

  • sap abap interview questions and answers for freshers
  • abap interview questions and answers for freshers
  • abap interview questions and answers in pdf

abap interview questions download

web dynpro abap interview questions and answers
abap tutorial for beginners pdf
abap tutorial for beginners
abap tutorial pdf
abap programming
abap tutorial download
abap ebook
abap tutorial pdf free download
sap abap tutorial for beginners

sap abap tutorials for beginners pdf


  1. sap abap tutorials for beginners pdf download
  2. abap programming language tutorial
  3. sap abap basics for beginners pdf


  • sap abap beginners guide
  • abap programs for beginners
  • sap-abap sample programs for beginners

module pool programming in abap step by step pdf
sap abap tutorials pdf
sap abap tutorials for beginners
sap abap material
sap abap tutorials free download
badi in sap abap tutorials
sap abap tutorials videos
sap abap tutorials ppt
sap abap fresher jobs


abap interview questions for 3 years experience
abap interview questions 2012
ibm abap interview questions
abap interview questions on reports
abap interview questions for freshers
abap interview questions on data dictionary
sap abap interview questions and answers pdf
abap interview questions and answers ibm
abap interview questions and answers in accenture
sap abap interview questions and answers for freshers
abap interview questions and answers for freshers
abap interview questions and answers in pdf
sap abap beginners guide
abap programs for beginners
sap-abap sample programs for beginners
module pool programming in abap step by step pdf
sap abap tutorials pdf
sap abap tutorials for beginners
sap abap material
sap abap tutorials free download
badi in sap abap tutorials 

Object Oriented Classic Program for Single Table

Object Oriented Classic Program for Single Table :

Class statement defines a class. A class can be defined completely by its definition and implementation. Class definition contains the properties of the class and it contains Public, Protected & Private section. All the attributes and methods will have to be declared under any of its properties. Class implementation contains the implementation of methods declared in the same class. This method contains the general functionality for which the method is build. A class declaration completes when we define and implement it.

Here is a program which shows a list of data from a single table MARA based on the input on Selection Screen. Selection screen contains a select-option and the pattern is block b1. We are displaying 4 fields of MARA like Material, Date, Name & Type. 

Structure of internal table and the declaration of internal table are in the Public section of the class so that every attributes and methods can have the access of the table. In the implementation part we selecting fields from MARA and writing the desired output.

We are creating instance under the START-OF-SELECTION and calling the method. Here the object must be reference to the class.



*&---------------------------------------------------------------------*
*& Report  ZSR_TEST
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zsr_test.

TABLES: mara.

INITIALIZATION.

  SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
  SELECT-OPTIONS  s_matnr FOR mara-matnr OBLIGATORY.
  SELECTION-SCREEN END OF BLOCK b1.
*----------------------------------------------------------------------*
*       CLASS cls1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cls1 DEFINITION.
  PUBLIC SECTION.

    TYPES: BEGIN OF ty_mara,
            matnr TYPE mara-matnr,
            ersda TYPE mara-ersda,
            ernam TYPE mara-ernam,
            mtart TYPE mara-mtart,
           END OF ty_mara.

    DATA: wa_mara TYPE ty_mara,
          it_mara TYPE STANDARD TABLE OF ty_mara.

    METHODS: met1.

  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.                    "cls1 DEFINITION

*----------------------------------------------------------------------*
*       CLASS cls1 IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cls1 IMPLEMENTATION.

  METHOD met1.

    SELECT matnr ersda ernam mtart
      FROM mara INTO TABLE it_mara
      WHERE matnr IN s_matnr.

    IF sy-subrc = 0.
      SORT it_mara BY matnr.
      LOOP AT it_mara INTO wa_mara.
        AT FIRST.
          WRITE: /3 'MATERIAL', 20 'DATE', 33 'NAME', 43 'TYPE'.
          ULINE.
          SKIP.
        ENDAT.
        WRITE: / wa_mara-matnr,
                 wa_mara-ersda,
                 wa_mara-ernam,
                 wa_mara-mtart.
      ENDLOOP.
    ELSE.
      MESSAGE 'No data found' TYPE 'I'.
    ENDIF.

  ENDMETHOD.                                                "met1

ENDCLASS.                    "cls1 IMPLEMENTATION

START-OF-SELECTION.
  DATA: obj1 TYPE REF TO cls1.

  CREATE OBJECT: obj1.

  CALL METHOD: obj1->met1.



Ouput of Selection Screen:


By giving the proper value the List output is:
Here Material No has been selected from 601010007 to 601010050. Since 601010050 is not in the database the last Material no is 601010049.


Saturday, November 8, 2014

80 [UPDATED] SAP ABAP Multiple Choice Questions and Answers pdf

SAP ABAP Internal Tables Interview Questions and Answers for pdf, SAP Certification Questions and Answers for freshers

SAP ABAP Multiple Choice Questions and Answers


****35 MY EXPERIENCE - SAP ABAP Interview Questions and Answers PDF****


1. This data type has a default length of one and a blank default value.
A: I
B: N
C: C
D: D
Ans:C

2. A DATA statement may appear only at the top of a program, before START-OFSELECTION.
A: True
B: False
Ans:B

3. If a field, NAME1, is declared as a global data object, what will be output by the
following code?
report zabaprg.
DATA: name1 like KNA1-NAME1 value 'ABAP programmer'.
name1 = 'Customer name'.
CLEAR name1.
perform write_name.
FORM write_name.
name1 = 'Material number'.
WRITE name1.
ENDFORM.
A: Customer name
B: ABAP programmer
C: Material number
D: None of the above
Ans:C

4. All of these allow you to step through the flow of a program line-by-line except:
A: Enter /h then execute
B: Execute in debug mode
C: Enter /i then execute
D: Set a breakpoint
Ans: C

5. Which of the following may NOT be modified using the ABAP Dictionary
transaction?
A: Type groups
B: Search help
C: Lock objects
D: Function groups
Ans:D

6. In a line of code, text-100, is an example of which type of text element?
A: Text symbol
B: Selection text
C: Text title
D: Text identifier
Ans:A

7. The editor function that formats and indents the lines of code automatically is called
____.
A: Auto align
B: Pretty printer
C: Generate version
D: Syntax check
Ans:B

8. A DO loop increments the system field ____.
A: SY-LOOPI
B: SY-TABIX
C: SY-LSIND
D: SY-INDEX
Ans: D

9. The event that is processed after all data has been read but before the list is displayed
is:
A: END-OF-PAGE.
B: START-OF-SELECTION.
C: END-OF-SELECTION.
D: AT LINE-SELECTION.
Ans:A ? C

10. The field declared below is of what data type?
DATA: new_fld(25).
A: P
B: N
C: I
D: C
Ans: D

11. In regard to the INITIALIZATION event, which of the following is NOT a true
statement?
A: Executed before the selection screen is displayed.
B: You should use SET PF-STATUS here.
C: You can assign different values to PARAMETERS and SELECT-OPTIONS here.
D: Executed one time when you start the report.
Ans: B

12. 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
Ans: B

13. The business (non-technical) definition of a table field is determined by the field's
____.
A: domain
B: field name
C: data type
D: data element
Ans: D

14. In regard to the three-tier client/server architecture, which of the following is a true
statement?
A: The presentation server processes the SAP program logic.
B: An application server is responsible for updating database tables.
C: Typically, there is a one-to-one ratio of database servers to presentation servers.
D: The application server layer is the level between a presentation server and a
database server.
Ans: D,B

15. What will be output by the code below?
DATA: alph type I value 3.
write: alph.
WHILE alph > 2.
write: alph.
alph = alph - 1.
ENDWHILE.
A: 3
B: 3 2
C: 3 3 2
D: 3 3
Ans: D

16. To allow the user to enter a single value on a selection screen, use the ABAP
keyword ____.
A: SELECT-OPTIONS.
B: PARAMETERS.
C: RANGES.
D: DATA.
Ans: B

17. 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.
REFRESH itab.
WRITE: /1 itab-fval.
A: 1
B: 2
C: blank
D: 0
Ans: B

18. You can define your own key fields when declaring an internal table.
A: True
B: False
Ans: A

19. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must
include an index number.
A: True
B: False
Ans : B

20. If itab contains 20 rows, what will SY-TABIX equal when the program reaches the
WRITE statement below?
SY-TABIX = 10.
LOOP AT itab.
count_field = count_field + 1.
ENDLOOP.
WRITE: /1 count_field.
A: 0
B: 10
C: 20
D: 30
Ans: C

More SAP ABAP Interview Questions : Click Here

21. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good
method for improving performance.
A: True
B: False
Ans:B

22. To select one record for a matching primary key, use ____.
A: SELECT
B: SELECT INTO
C: SELECT SINGLE
D: SELECT ENTRY
Ans: C

23. In regard to MOVE-CORRESPONDING, which of the following is NOT a true
statement?
A: Moves the values of components with identical names.
B: Fields without a match are unchanged.
C: Corresponds to one or more MOVE statements.
D: Moves the values of components according to their location.
Ans: D

24. The ABAP keyword for adding authorizations to a program is ____.
A: AUTH-CHECK
B: AUTHORITY-CHECK
C: AUTHORIZATION-CHECK
D: AUTHORITY-OBJECT
Ans:B

25. To read an exact row number of an internal table, use this parameter of the READ
TABLE statement.
A: INDEX
B: TABIX
C: ROW
D: WHERE
Ans: B ? A

26. To remove lines from a database table, use ____.
A: UPDATE
B: MODIFY
C: ERASE
D: DELETE
Ans: D

27. Which table type would be most appropriate for accessing table rows using an
index.
A: Hashed table
B: Standard table
C: Sorted table
D: None of these may be accessed using an index.
Ans: C

28. 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.
Ans: A

29. The following code reorders the rows so that:
DATA: itab LIKE kna1 OCCURS 0 WITH HEADER LINE.
itab-name1 = 'Smith'. itab-ort01 = 'Miami'. APPEND itab.
itab-name1 = 'Jones'. itab-ort01 = 'Chicago'. APPEND itab.
itab-name1 = 'Brown'. itab-ort01 = 'New York'. APPEND itab.
SORT itab BY name1 ort01.
A: Smith appears before Jones
B: Jones appears before Brown
C: Brown appears before Jones
D: Miami appears before New York
Ans: C

30. 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
Ans:C

31. When writing a SELECT statement, you should place as much load as possible on
the database server and minimize the load on the application server.
A: True
B: False
Ans: B

32. All of the following pertain to interactive reporting in ABAP except:
A: Call transactions and other programs from a list.
B: Secondary list shows detail data.
C: Good for processing lists in background.
D: AT USER-COMMAND
Ans:C

33. 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.
Ans: D

34. Errors to be handled by the calling program are defined in a function module's
____.
A: exceptions interface
B: source code
C: exporting interface
D: main program
Ans :A

35. In regard to the START-OF-SELECTION event, which of the following is a true
statement?
A: Executed before the selection screen is displayed.
B: This is the only event in which a SELECT statement may be coded.
C: Executed when the user double-clicks a list row.
D: Automatically started by the REPORT statement.
Ans:D

36. The order in which an event appears in the ABAP code determines when the event
is processed.
A: True
B: False
Ans: B

37. The SAP service that ensures data integrity by handling locking is called:
A: Update
B: Dialog
C: Enqueue/Dequeue
D: Spool
Ans: C

38. What standard data type is the following user-defined type?
TYPES: user_type.
A: N
B: C
C: I
D: Undefined
Ans: B

39. Which ABAP program attribute provides access protection?
A: Status
B: Application
C: Development class
D: Authorization group
Ans:D

40. Page headers for a secondary list should be coded in which event?
A: TOP-OF-PAGE.
B: START-OF-SELECTION.
C: TOP-OF-PAGE DURING LINE-SELECTION.
D: AT USER-COMMAND.
Ans: C

41. Given:
PERFORM subroutine USING var.
The var field is known as what type of parameter?
A: Formal
B: Actual
C: Static
D: Value
Ans:B

42. The following statement will result in a syntax error.
DATA: price(3) type p decimals 2 value '100.23'.
A: True
B: False
Ans: B

43. The following code indicates:
CALL SCREEN 300.
A: Start the PAI processing of screen 300.
B: Jump to screen 300 without coming back.
C: Temporarily branch to screen 300. *
D: Exit screen 300.
Ans:C

44. Which of the following would be stored in a table as master data?
A: Customer name and address
B: Sales order items
C: Accounting invoice header
D: Vendor credit memo
Ans: A

45. In relation to an internal table as a formal parameter, because of the STRUCTURE
syntax, it is possible to:
A: Use the DESCRIBE statement within a subroutine.
B: Loop through the internal table within a subroutine.
C: Access the internal table fields within a subroutine.
D: Add rows to the internal table within a subroutine.
Ans: C

46. This data type has a default length of one and a default value = '0'.
A: P
B: C
C: N
D: I
Ans: C

47. To prevent duplicate accesses to a master data field:
A: Create an index on the master data field.
B: Remove nested SELECT statements.
C: Use SELECT SINGLE.
D: Buffer the data in an internal table.
Ans: A ? C

48. In regard to the code below, which of the following is not a true statement?
TABLES: KNA1.
GET KNA1.
Write: /1 kna1-kunnr.
END-OF-SELECTION.
A: The GET event is processed while a logical database is running.
B: All the fields from table KNA1 may be used in the GET event.
C: You can code the GET event elsewhere in the same program.
D: None of the above.
Ans: D

49. The following code indicates:
SELECT fld1 FROM tab1 INTO TABLE itab
UP TO 100 ROWS
WHERE fld7 = pfld7.
A: Itab will contain 100 rows.
B: Only the first 100 records of tab1 are read.
C: If itab has less than 100 rows before the SELECT, SY-SUBRC will be set to 4.
D: None of the above.
Ans: D

50. To place a checkbox on a list, use
A: WRITE CHECKBOX.
B: FORMAT CHECKBOX ON.
C: WRITE fld AS CHECKBOX.
D: MODIFY LINE WITH CHECKBOX.
Ans:C

51. Which of the following is NOT a true statement in regard to a sorted internal table
type?
A: May only be accessed by its key.
B: Its key may be UNIQUE or NON-UNIQUE.
C: Entries are sorted according to its key when added.
D: A binary search is used when accessing rows by its key.
Ans: A

52. The following code indicates:
CALL SCREEN 9000 STARTING AT 10 5 ENDING AT 60 20
A: Screen 9000 is called with the cursor at coordinates (10,5)(60,20).
B: Screen 9000 must be of type "Modal dialog box."
C: Display screen 9000 in a full window.
D: Screen 9000 may only contain an ABAP list.
Ans:A

53. 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.
Ans:A

54. Function module source code may not call a subroutine.
A: True
B: False
Ans: B

55. This data type has a default length of eight and a default value = '00000000'.
A: P
B: D
C: N
D: C
Ans: B

56. Within the source code of a function module, errors are handled via the keyword:
A: EXCEPTION
B: RAISE
C: STOP
D: ABEND
Ans:B

57. Which of these is NOT a valid type of function module?
A: Normal
B: Update
C: RFC
D: Dialog
Ans:D

58. To call a local subroutine named calculate answer, use this line of code:
A: PERFORM calculate answer.
B: CALL calculate answer.
C: USING calculate answer.
D: SUB calculate answer.
Ans:A

59. Given:
DO.
Write: /1 'E equals MC squared.'.
ENDDO.
This will result in ____.
A: output of 'E equals MC squared.' on a new line one time
B: an endless loop that results in an abend error
C: output of 'E equals MC squared.' on a new line many times
D: a loop that will end when the user presses ESC
Ans.B

60. The following code indicates
write: /5 'I Love ABAP'.
A: Output 'I Lov' on the current line
B: Output 'I Love ABAP' starting at column 5 on the current line
C: Output 'I Lov' on a new line
D: Output 'I Love ABAP' starting at column 5 on a new line
Ans: D

61. 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
Ans: A

62. A select statement has built-in authorization checks.
A: True
B: False
Ans:B

63. 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
Ans:B

64. Page footers are coded in the event:
A: TOP-OF-PAGE.
B: END-OF-SELECTION.
C: NEW-PAGE.
D: END-OF-PAGE.
Ans:D

65. Page headers for a secondary/details list can be coded in the event:
A: GET.
B: INITIALIZATION.
C: TOP-OF-PAGE DURING LINE-SELECTION.
D: NEW-PAGE.
Ans:C

66. To both add or change lines of a database table, use ____.
A: INSERT
B: UPDATE
C: APPEND
D: MODIFY
Ans:D

67. To select one record for a matching primary key, use ____.
A: SELECT
B: SELECT INTO
C: SELECT SINGLE
D: SELECT ENTRY
Ans:C

68. After adding rows to an internal table with COLLECT, you should avoid adding
More rows with APPEND.
A: True
B: False
Ans:A

69. The output for the following code will be
report zabaprg.
DATA: my_field type I value 99.
my_field = my_field + 1.
clear my_field.
WRITE: 'The value is', my_field left-justified.
A: The value is 99
B: The value is 100
C: The value is 0
D: None of the above
Ans: C

70. If this code results in an error, the remedy is
SELECT * FROM tab1 WHERE fld3 = pfld3.
WRITE: /1 tab1-fld1, tab1-fld2.
ENDSELECT.
A: Add a SY-SUBRC check.
B: Change the * to fld1 fld2.
C: Add INTO (tab1-fld1, tab1-fld2).
D: There is no error.
Ans: C,D

71. To summarize the contents of several matching lines into a single line, use this
SELECT statement clause.
A: INTO
B: WHERE
C: FROM
D: GROUP BY
Ans:D

72. 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
Ans: A

73. All of the following are considered to be valid ABAP modularization techniques
except:
A: Subroutine
B: External subroutine
C: Field-group
D: Function module
Ans:C


74. To create a list of the top 25 customers, you should use
A: DELETE ADJACENT DUPLICATES
B: READ TABLE itab INDEX 25
C: LOOP AT itab FROM 25
D: APPEND SORTED BY
Ans:D

75. 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.
Ans:B

76. In an R/3 environment, where is the work of a dialog program performed?
A: On the application server using a dialog work process service.
B: On the presentation server using a dialog work process service.
C: On the database server using a dialog work process service.
D: None of the above.
Ans: A

77. In regard to Native SQL, which of the following is NOT a true statement?
A: A CONNECT to the database is done automatically.
B: You must specify the SAP client.
C: The tables that you address do not have to exist in the ABAP Dictionary.
D: Will run under different database systems.
Ans:D

78. To change one or more lines of a database table, use ____.
A: UPDATE
B: INSERT
C: INTO
D: MOD
Ans:A

79. Which is the correct sequence of events?
A: AT SELECTION-SCREEN, TOP-OF-PAGE, INITIALIZATION
B: START-OF-SELECTION, AT USER-COMMAND, GET dbtab
C: INITIALIZATION, END-OF-SELECTION, AT LINE-SELECTION
D: GET dbtab, GET dbtab LATE, START-OF-SELECTION
Ans:B

80. Which of the following is NOT a numeric data type?
A: I
B: N
C: P
D: F
Ans: B

More SAP ABAP Interview Questions : Click Here

Friday, November 7, 2014

15 [UPDATED] SAP ABAP SMARTFORMS Interview Questions and Answers

SAP ABAP SMARTFORMS Interview Questions and Answers

1.Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.

2.Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.

3.Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.

4.Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.

5.Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.

6.Smartforms output difference

Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.
It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.

7.SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.

8.SmartForm Doublesided printing question
Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).
Transport Smart Forms

9.How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.
Smartforms: protect lines in main window.

10.How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.

11.Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.

12.Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.

32 [UPDATED] ABAP SAP SCRIPTS Interview Questions and Answers

ABAP SAP SCRIPTS Interview Questions and Answers :


Q1: What is the meaning of a SAP Script and what is the role of it?
A1: SAP Script is in fact the word processor of the SAP system, very similar to the most used text processors available for personal use on computers. Usually companies print the documents in their own layout like invoices, delivery notes and others. There is a standard layout (or predefined) but sometimes the standard layout has to be expanded according to the requirements with additional data like addresses or purchase orders. These details are inserted by employees or they are extracted from database tables. Companies use a high amount of these documents, so printing them has become a big requirement. Larger documents are printed like paychecks, reminders, order confirmations, payslips and others, for making this possible SAP Script is developed in such a way that it can make all the document types mentioned above, it has the IT tool that is used for text insertion and the printing of forms in the R/3 programs. Usually SAP can give us these document types in a standard form but each company can modify them or replace them at their desire and according to their needs.

Q2: Which are the variables that we can utilize for data output in SAP Script?
A2: &Tables name-fields&

Q3: What is the meaning of a Compare Tool in SAP Script?
A3: For object comparison between clients there are many utilities within SAP Script, for example for the comparison of these objects-Documents, Layout sets and Styles we have a Compare Tool. With the Compare Tool we can make many things like: verifying if an object can be found in each of the two clients or showing why multiple versions of an object are different. For the page layout management or to format the text in a document we can use Layout Sets. The Standard styles and layout sets are found in Client 000 in the SAP system.

Q4: How can we describe better the SAP Script ?
A4: SAP Script is by definition the text handling system of SAP R/3, it has a high degree of integration in the SAP system, it is the standard and the most used tool for several tasks that involve the processing of text in the entire SAP system.

Q5: What is the meaning of Layout Sets?
A5: In SAP Script Layout Sets are the tools that define the layout of pages (documents). A layout is constructed from many components, some of them even handle the layout itself for single pages or some are filled with details about the text that is about to be printed on the pages. The Layout Set speaks about how a document will look and how it will be constructed, it will contain text blocks with areas for variables that can be useful for other programs, each SAP Script document has a Layout Set. When we want to modify our documents, for instance when we have to move text blocks, choose a different font, set a specific paragraph type, insert tabs all these can be made from the Layout Set. For text formatting we have two possibilities: We insert the text and output it in normal text maintenance or we can insert the text through the Layout Set.
    The text can be formatted through the ABAP/4 application and the Layout Set, the application will output single text blocks, elements of a text or a whole document. The formatting of our text is given by the use of Styles, they make the formatting by configuring the character formats and the paragraphs that we use in the document. Styles can be useful for highlighting strings of characters and even entire paragraphs, they can be attributed to every type of text but mainly they will be used in the basic windows of Layout Sets, where the text is inserted straight from the user in a document.
     An important element is the header data, which can be used on Styles for show valuable details( in this way an end user can choose a style in the simplest way) and Layout Sets as well, where it has the role of control and information.
     The Layout Set maintenance also contains windows, which are places in a page where the text will output in the near future, every Layout Set contains one or multiple windows, if the window is missing then text formatting will not be possible in SAP Script.
      Window types that are used in Layout Sets:
a)      MAIN-in this type of window the output of text is made continuously, it is a window type that is common to the dialog users, like the body text of letters.
b)      VAR- this type of window contains variable text in every page where the window is found, these windows will be formatted for every page.
c)      CONST-this type of window contains constant text so it will be formatted only one time.

W can classify the elements of a Layout Set like this:
a)      The header data- it contains data about the construction and the Layout Set like who made the document, what elements were used etc. This is the start page.
b)      The paragraph formats –they are needed for text formatting exactly as in Styles but their usage extends to the processing of text like formatting the text elements as well.
c)      The character formats-these can be used for formatting paragraphs and text, they actually format the text from inside paragraphs
d)     The windows- they are placed only after their assigning to pages and attributing measurement units.
e)      The pages- They give us a beginning and a finish in the formatting of text.
f)        The page windows- They bring the pages and the windows together and their measurements are stated.
The management commands in SAP Script are meant for handling the output formatting and they are not read by the SAP Script Editor but processed by the SAP Script Composer which is an application that transforms the text from the editing form to the printing form.

Q6: Can we describe the way in which the Layout Sets are backed up, uploaded and downloaded in SAP Script?
A6: For the SAP Script backup we have go to transaction SE71to select Utilities then Copy from client then Give source from name then source client (000 default) and Target from name. For downloading we must go to transaction SE71 the we must write the name of the form then we select Display, Utilities, form info, List and we hit Save to PC file. Fro Upload we have to create form with page then window, pagewindow with the downloaded PC file. From the PC file we will have the page window text elements.

Q7: What is the way to count pages the SAP Script outputs?
A7: &page&, &nextPage&.

Q8: How can we classify the SAP Script components?
A8: SAP Script can be classified in: SAP Script text, Layout Set, Symbols, ABAP print program and function modules such as read text, open/close form and others.

Q9: What is the way to deposit the text in SAP Script?
A9: For text storage SAO Script uses ITF or the Interchange Text Format but it also has the options to convert RTF or Rich Text Format and also ASCII which are formats for other text processors.

Q10: How can we describe symbols and what are the main types with example?
A10: The constant that may be entered into a document has the name of symbol and has the role of keeping the supplementary work if phrases or portions of the text get replaced, the symbol name is enclosed with &. Example: &variable name&, or system symbols like &Date&, &time& an others. Standard symbols are the ones that the user has defined and they are kept in the table TTDTG. Examples of standard symbols: &SGDH& for :”dear sir/madam” and &MFG& for:”yours Faithfully”. The program symbols show ABAP/4 program data that invoked a function for text processing, example: Itab-connid. The text symbols are good for every block type of text to define but it becomes valid just where it has been defined, example: Define &Symbol&=’value’.

Q11: How can we implement the tab sets in Layout Sets?
A11: We can do this by defining the paragraphs using defined tabs.

Q12: What is the role of the composer?
A12: For getting a final look of our documents we will combine the Layout Set with the print program, the print program is being started by SAP Script so the process of printing begins, each of the commands inserted with the aid of the SAP Script interface is given to the composer. The print program specifies a Layout Set which contains the details that will be sent to the composer, and in this way the documents will be formatted base on the details provided. When there are variables in a document they are they will be replaced with R/3 data, for example the actual date or with data from the print program. In the end the document is finished with the use of the print program and the composer will put it in the spool.

Q13: What is the way to define the text symbols?
A13: We can define the text symbols with the aid of the control command DEFINE &x1&=’56’

Q14: What activity is the most time-consuming from all in SAP Script coding?
A14: The most time-consuming is when we define Layout Sets.

Q15: What commands are used in ABAP/4 for connecting a Layout Set?
A15: We can use the following: the call functions OPEN-form, WRITE-form or CLOSE-form.

Q16: How do we define the data tab space in SAP Script and where?
A16: We may define the tabs after we define the text element paragraphs.

Q17: Which are the commands mainly used for control?
A17: The main control commands are PROTECT, ENDPROTECT, DEFINE, NEW-PAGE, INCLUDE, IF, ENDIF.

Q18: How can we introduce a logo in our program and what is the name of the program for logo upload and also what syntax can be used for this in SAP Script?
A18: We can use the “RSTXLDMC” report for uploading a logo and this statement: /:INCLUDE’ZHEX-MACRO-XXX’OBJECTTEXTID ST LANGUAGE’E’. The name of the object is represented by ‘XXX’.

Q19: What purpose has an ABAP application in SAP Script?
A19: The purpose of an ABAP application can include multiple parts like:
a)      It makes the definition of the processing logic of the Layout Set, or so to speak-what order the elements of text have and when are they used again.
b)      It takes the data from the R/3 program that is found in the database.
c)      It selects a Layout Set to print.
d)     Chooses printer, fax or monitor as the output device.
e)      It makes print configurations regarding the counting of pages that will be printed.

Q20: What is the correct syntax used for a box command?
A20: The syntax looks like this one: BOX XPOS 2MM WIDTH 0 CM HEIGHT ‘9.5’ CM FRAME 10 TW.

Q21: How do we define variables?
A21:  DEFINE &CUST&=’00000021’.

Q22: How can we describe symbols more detailed?
A22: The values that are entered in the time of print formatting are stored in symbols and these symbols can be found under names between”&” and they are not case sensitive.
System symbols are: DATE, DAY, NAME_OF_DAY, MONTH, YEAR, TIME, HOURS, MINUTES, SECONDS, PAGE, NEXTPAGE, DEVICE, SPACE, ULINE, VLINE. Standard symbols are the ones from table TTDG and are defined by the user. To show them or modify them we can use the transaction SM30. An example of standard symbol: &MFG&. The standard text is a normal text that can be found in one or multiple forms and they can be written , modified or shown with the aid of the transaction SO10. For text classification we have text ID. For putting standard texts in forms we can do this with the command INCLUDE like the following: INCLUDEZ_BC460_EX4_HF OBJECTTEXT ID SDVD. We can use the PARAGRAPH parameter to format standard texts, in the next example we will see how we can center the text:
INCLUDEZ_BC460_EX4_HF OBJECTTEXT ID SDVD LANGUAGE EN PARAGRAPH C.
Name:Z_BC460_EX4_HF
Object: Text
Text id: SDVD(TEXT id from SO10)
Language EN
Paragraph: C (Centered0.
Program symbols are used for database content. For tables: kna1, in forms: &KNA1-NAME1&, for formatting: &SYMBOL& (it means there is no formatting), &SYMBOL(5)&Length(the data and length), &SYMBOL(Z)&Suppress leading zeros, &SYMBOL+4&Offset(the start of the output), &SYMBOL(I)&Suppress initial value, &SYMBOL(C)&Compress blank spaces(one space from the compression of consecutive spaces), &SYMBOL(S)&Operators are suppressed, &SYMBOL(R)&Right align output, &SYMBOL(8.2)&Decimal format(length), &SYMBOL(*)&Dictionary length(the ABAP dictionary), &’text1’SYMBOL’text2’&Text entered prior to and after the symbol.

Q23: Can we give a detailed description on the Control commands?
A23: For the changing of text output we use control commands./: is the format key that can be used in the format column, there is the intensity (grey scale) in percents, the frame thickness is given by frame parameters with zero as the initial value. Every parameter such as width and height, xpos and ypos or frame will have a measurement unit like: CH-character, TW-twip, IN-inch, PT-point, MM-millimeter, LN-line, CM-centimeter; as an example we have: BOX XPOS ’10.14’ MM YPOS ‘5.79’ MM HEIGHT ‘9’ MMWIDTH ‘14’ MM INTENSITY 8 FRAME 0 TW. This is making 2 lines and 2 rectangles for building a 3 column table and a highlighting heading section.
     POSITION and SIZE are commands used for configuring the initial box parameters, a very good thing when we have many boxes with equal parameters. With POSITION WINDOW we can configure the position in relation to the window (to the left or to the right), after that we can use POSITION for setting the coordinates related to the window start. “+” and “-“ can be used for position configuration in ORIGIN.
        The Styles are utilized in forms for setting paragraphs or formats of characters and for this we have multiple standard Styles in SAP; we can also define personal styles. For the creation, finding and keeping of styles there is the transaction SE72. With the aid of the Format menu and then Style we will give the text a style and for non permanent modifications to the style we will use /: as a command.

Q24: How do we import or use graphics in Sap Script?
Q24: For importing graphics in SAP there is the transaction SE78. We may include using Edit, Graphic, Create in the form painter or we can use the statement INCLUDE, case in which we will use the window script editor-Include, Graphic like in this example (with a bitmap):
/:BITMAP MYLOGO OBJECT GRAPHIC ID BMAP TYPE BMON.

Q25: How are the modifications made?
A25:  Changes to the normal SAP program have to be made only in the case when this is compulsory. When we require supplementary data , we should use the statement PERFORM and we don’t have to modify the print program. He print program modification can take place due to reasons like these: modifications in structure or the requirement for fresh text elements. The print program the will print supplementary forms will be crucial to deciding what are the print programs and forms that we will use. They exist in the TNAPR table and they are specific for a particular output type; the programs used for output are: view V_TNAPR for entry modification from transaction SE30, for importing or exporting a SAP Script form from a PC file we will use RSTXSCRP, for getting the print application name we will use SD or the TNAPR table (for SD documents).

Q26: How can we define and enter a standard text?
A26: The default text type that can be implemented in multiple forms is called a standard text. With the aid of the transaction SO10 we can make, modify or display a standard text. For classifying the texts we will use text ID. With the command INCLUDE we can introduce a standard texts in forms like in this example: /:INCLUDEZ_BC460_EX4_HF OBJECT TEXT ID SDVD. With the aid of the parameter PARAGRAPH we can format standard texts and for centering texts we can see the example: /:INCLUDEZ_BC460_EX4_HF OBJECT TEXT ID SVD LANGUAGE EN PARAGRAPH C. For address format we can use the command ADRESS-ENDADRESS which is determined by the country parameter from the postal standards that the country of the recipient has. Example:
ADDRESS DELIVERY PARAGRAPH AD
NAME &KNA1-NAME&
STREET & KNA1-STRAS&
POSTCODE&KNA1-PSTLZ&
CITY&KNA1-ORT01&’
COUNTRY &KNA1-LAND1&
FROMCOUNTRY ‘de’
ENDADDRESS.
For pagebreak avoiding in paragraphs :
/:PROTECT
:
:
/:ENDPROTECT.
The lines of text that are to be defended against pagebreaks will be met between the command IF and the command ENDIF, as in every ABAP program like this:
/:IF condition
:
:
/:ENDIF
and
/:IF condition
:
/:ELSE
:
/:ENDIF. An exact expression would be: /: &SPFLI-CITYTO&=”BERLIN” …text… /:ENDIF.

Q27: What separates a Window from a Page Window?
A27: The Page Window is when we declare the parameters of a window that was declared before and the document look (width, height and the margins –left and right). Window is when we talk about the type window, about the initial paragraph or the text components (SAP Scripts) that have to be included. The windows are those places stated from the start in the layout set , the text blocks that we find on a page are the windows.

Q28: How do we load graphics like logos in SAP Script?
A28: We can load graphics like files with the .tif extension in SAP Script in standard text with the aid of RSTXLDMC.

Q29: Which are the most used programs from SAP Script?
A29: For the transformation of the page format we have RSTXFCON, for downloading and uploading the layout sets we have RSTXSCRP, for the debugging of SAP Script we have RSTXDBUG, for moving script files from system to system we can use RSTXSCRP, to modify development classes of different objects we will use RSWBO052, for table contents comparison between clients we have to use RSTBSERV.

Q30: What are the steps and other details of debugging?
A30: We will use Tools then Word Processing then Layout Set and we will write the layout name the we go to Utilities and Activate Debugger. It doesn’t matter which layout set we choose we choose the debugger. The layout set will call the debugger. If we try to copy a form from client to client and we try to also modify the copied form we will have these error messages:
a)      Form not found. The solving of this problem is trying to copy again but with a language specification.
b)      Text file is inconsistent. From SE38 we have to run “RSTXCHKO”, the form name will be required and checking all the checkboxes (and running the program) fixes the problem.

Q31: How can we copy a table from client to client?
A31: We can do this with the aid of RSCLTCOP.

Q32: What is the way for making a script layout backup for future loading from the HDD?
A32: This can be done with the EXPORT MODE, a script with a similar name to the initial script will be made, if this is already made we will receive an error.