Subscribe

RSS Feed (xml)



Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Tuesday, October 12, 2010

How can I copy a standard table to make my own z_table.

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.

WE CAN CREATE A STRUCTURE LIKE THE SAME STRUCTURE AS DATABASE TABLE AND WE CAN USE

SELECT* FROM DATABASE TABLE INTO TABLE ITAB

OR

INSERT INTO ITAB VALUES DATABASE TABLE



Use SE11 & there is copy(ctrl+f5) button is available after copy activate the Ztable, it's simple to copy a database table, but note that if in database table maintenance generator is available then you have to define your maintenance generator in your copied Ztable.

what is difference between sy-ucomm and ok_code ?

SY-UCOMM IS A system variable. It contains the latest user action triggered. Whereas ok_code is generally a variable that we declare as a type of sy-ucomm. Usually in ABAP programing it is a good practice not to refer to sy-ucomm directly, or sometimes we need to store a user interaction for later validation, these are the scenarios where an ok_code value comes handy.

eg.

data: ok_code type sy-ucomm.

clear ok_code.
ok_code = sy-ucomm.
case ok_code.
when 'XYZ'.
..........
..........
WHEN OTHERS.
ENDCASE.

Hope that clears the matter.

More than 100 ABAP Interview Faq's

1. What is the typical structure of an ABAP/4 program?
ANS:-
HEADER ,BODY,FOOTER.

2. What are field symbols and field groups.?
Have you used "component idx of structure" clause with field groups?

ANS:-
Field symbols:-

Field groups :-

Can any body explain me what is field group?

Field groups are groups similar fields together into one name. Field group works in conjuction with

INSERT f1 f2 INTO fg
EXTRACT fg
SORT BY fg
LOOP ... ENDLOOP

INSERT f1 f2 INTO fg
---------------------

The insert statement is used to create a field group dynamically by inserting the field into it. Only global data fields can be inserted and not local data fields eg : in form modules.

EXTRACT fg
----------

This will combine all the fields in the fieldgroup and write them to a sequential dataset as a single record.

SORT BY fg
----------

Sorting of sequential dataset by field group.

LOOP AND ENDLOOP
---------------

LOOP.
AT ***
......
....
ENDAT.
AT ***
.....
....
ENDAT.
ENDLOOP. *-- Chinmaya

3. 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".
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?
ANS:-
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?
ANS:-
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?
ANS:-
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?
ANS:-
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?
ans:-
tables, structures, views, domains, data elements, lock objects, Matchcode objects.

11. How many types of tables exists and what are they in data dictionary?
ans :-
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.

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

14. What are the domains and data elements?
ANS:-
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?
ANS:-
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?
ANS:-
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it again).

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

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.

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?
ANS:-
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:- by Madhukar
Open SQL , native SQL are the interfaces to create the database applicatons.
Open SQL is consistant across different types of existing Databases.
Native SQL is the database language specific to database.Its API is specific to the databse.
Open SQL API is consistent across all vendors

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

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

22. What are the events in ABAP/4 language?
ANS:-
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.

23. What is an interactive report?
What is the obvious diff 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.
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?
ANS:-
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.
ANS:-
creating function module:-
called program - se37-creating funcgrp,funcmodule by assigning attributes,importing,exporting,tables,exceptions.
calling program - SE38-in pgm click pattern and write function name- provide export,import,tables,exception values.

26. What are the exceptions in function module?
ANS:-
COMMUNICATION_FAILURE
SYSTEM_FAILURE

27. What is a function group?
ANS:-
GROUP OF ALL RELATED FUNCTIONS.

28. How are the date and time field values stored in SAP?
ANS:-
DD.MM.YYYY. HH:MM:SS

30. Name a few data dictionary objects? //rep//
ANS:-
TABLES,VIEWS,STRUCTURES,LOCK OBJECTS,MATCHCODE OBJECTS.

31. What happens when a table is activated in DD?
ANS:-
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?
ans:-
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?
ANS:-

35. What is table maintenance generator?
ANS:-

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 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.
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 default 'xxx'.
select-options 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 [].

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?

what is the difference between SE38 and SE80?

SE 38 is the abap editor which is used to create the programs.

SE 80 is the Repository Browser means portion of database that is used to maintain SAP application components

Important FAQ's in SAP and ABAP

statements in sap?

Ans: Insert, Update, Delete.

What is the difference between open sql & native sql?

Ans: 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 is Primary key, foreign key ? what is primary index? secondary index?

Ans: Primary index: the primary index contains key fiels of a table and a pointer to non-key fields of the table. The primary index is created automatically when a table is created in database and moreover you can further define reference to the primary index which are known as Secondary index.

How many indexes can be created for a table?

Ans: 9.

What is data class?

Ans: The data class specifies in which table space the table is created in database.

Give few names of cluster tables in sap?

Ans: sorry i dont know

Give few names of pooled tables in sap?

Ans: A pool table has many to one relation with the table in the database. For one table in the database there are 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 pool 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.
Sorry I dont know table names

Give few names of transparent tables?

Ans: A transparent 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). sorry i dont know table names

What is a buffer and how many types?

Ans: Buffer is othing but which stores data temporarily. there are two types of buffers. they are Roll and Page areas.
Pages : it stores the application data.
Roll area: it stores the data of previous pages.Data areas of used programs are created in roll areas for each internal session.

What is table maintenance generator and how to create that? What is the transaction code?

Ans: Table maintanence generator is nothing but making a table available for adding records and deleting records.
The transaction code used is SM30.

How to add new fields to a standard sap table?

Ans: 1. Appended structures 2. Customizing tables

What are lock objects?

Ans: Lock objects are nothing but which holds a data for particular field value until you remove a lock..

What is the use of start-of-selection event?

Ans: Start-of-selection is called implicity even it is not used in the program. start-of-selection is triggered after the standard selection screen has been displayed.

What is the difference between end-of-page and end-of-selection?

Ans: End-of-page : is footer of the page. End-of-selection: is triggered At the end of the processing block.

If you write a write statement after end-of-selection, will that be triggered?

Ans: Yes

How to create a button in selection screen?

Ans: Using parametres

How to add a gui status in a selection screen?

Ans: sorry i dont know i thik using set pf.

How to create a check box/option button in a list?

Ans: Regarding Runtime creation of Check Boxes

Can you call a bdc program from a report? how?

Ans: Yes through Submit and return

Can you call a transaction from a report? how?

Ans: Yes Using Call transaction and leave to.

What are ALV reports? how they are different from normal reports?
Ans:
these reports are used to find subtotals and totals in a report. If you want i’ll give you an example program

What are the main events that are used in an ALV report?
Ans:
sorry i dont know

What is the use of SLIS type pool in alv reports?

Ans: Slis type pool is a global defination of pooltypes of catalog structure, table and layout which we use in ALV reports

Difference between top-of-page and top-of-page during at-line- selection?

Ans: Top-of-page is a header on primary list. Top-of-page during line-selection is a header on secondary lists

In an interactive report, after going to 5th list, can you come back to 2nd list? how?

How many type of internal tables are there?

Ans: Standard, Hashed, Sorted tables

What is the difference between hashed & sorted internal tables?

Ans: Sorted internal table works on Binary Search and Hashed internal tables works on hashed alogorthim through indexes.

What is the difference between standard and sorted internal tables? (in performance wise)

Ans: Sorted table improve the performance in case of a huge table which has no: of records

What is the use of at new statement?

Ans:sorry i dont know

When do you need to create an internal table with header line? and with out a header line? line?

Ans: If we don’t want to use any explicit work area then its better to go for an internal table with header line.

What does it mean occurs 0 while creating an internal table?

Ans: sorry i dont know

Which of these methods can be best used in background process?

Ans : Batch Input method.

What is direct input method?

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

Ans: Exec Sql[Performing

[Native sql statements] endexec. The above is the syntax for the native sql statements.

Disadvantages:

. Syntax check is not done to statements written inside the EXEC SQL statements.

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

What transactions do you use for data analysis?

ANs: Sorry i dont know but for runtime analysis we use transaction code : se30.

What are selection texts?

Ans: in the selection screen you can change the name of the field,title etc using selection texts. go to text—> text elemets—-> selection texts in the menu bar to set selection texts.

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

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

Ans: Through functions.

What is performance tuning?

Ans: Performance tuning for Data Selection Statement

What are steps you follow to improve the performance of a report?

Ans: 1) USe select fields statements (not select *)

2) Use views rather than tables 3) Don’t use nested Select.

What is the role of secondary index in performance?

Ans: sorry i dont know

What is the role of ST05 in performance tuning?

Ans: SQL trace

What is the role of extended syntax check in performance tuning?

Ans: sorry i dont know

Will join conditions in sql queries affect perfomance? how?

Ans : Yes

Will sorted internal tables help in performance?

Ans: Yes

Will where conditions in a sql query help improve performance?

Ans: No Not at all

Does select single *.. / select * .. affect performance? how?

Ans: Select single we use for first hit of the record. so obviously Select single will improve the performance.

BDC FAQ - Frequently Asked Questions

BDC FAQ - Frequently Asked Questions

Explain BDC.

BDC stands for batch data communication is used to tranfer data from non sap system to sap system.
There are two method used 2 transfer data using BDC
1 DIRECT METHOD
2 BATCH INPUT METHOD it is also of two type :-
i) CALL TRANSACTION METHOD
ii) SESSION METHOD

The major difference b/w call transaction and session method is that in call transaction method data is updated Synchronously but session method is asynchronously session is generated in session method but session is not generated in call transaction method

BDC is all about automating the screen flow. for example, lets say we send an IDoc to external system using transcation we19. If the requirement is to automate it , then BDC can be used.
Procedure:
1. record the transaction with tcode shdb
2. copy the transaction recording program code from where you want to execute it
3. use the method to call : call transaction or session method

The above are the ways to automate those screen flows for which recording is performed.

Once you are done.. in the field values of BDC recording, put the values as input values whatever you want to mention.

How to handle errors in call transaction method and session method.

You can try this code to handle your BDC errors and display the corresponding error messages:

if session ne 'X'.
call transaction tcode using itab_bdc mode 'N' UPDATE 'S' MESSAGES INTO i_errors.

* N - no display
* E - errors only
* A - display ALL screens
elseif session = 'X'.
call function 'BDC_INSERT'
exporting
tcode = tcode
tables
dynprotab = itab_bdc
exceptions
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
others = 7

*Check SY-SUBRC
if sy-subrc <> 0. "Unsuccessful
loop at i_errors.
MESSAGE ID i_errors-msgid TYPE i_errors-msgtyp NUMBER
i_errors-msgnr WITH i_errors-msgv1 i_errors-msgv2
i_errors-msgv3 i_errors-msgv4 INTO i_error_messages-message.

append i_error_messages.
endloop.
endif.
endif.

interview questions faqs freshers sap abap java

What an table cluster?
an table cluster combines several logical tables in the ABAP/D Dictionary.
Several logical rows D m different cluster tables r brought together
in the an single physical record. records D m cluster tables
assigned B an cluster r thus stored in the an single common table in the the
database.




What database utility ?
Database utility interface between ABAP/D Dictionary and underlying SAP system.

The database utility interface between ABAP/D Dictionary and relational database underlying SAP system. You could call database utility D m initial screen off ABAP/D Dictionary with Utilities ® Database utility.
The database utility allows you B create, delete and convert objects D m ABAP/D Dictionary in the database
MODULARIZATION

What Modularization and its benefits?
If program contains same or similar blocks off statements or it required B process same function several times, we could avoid redundancy by using modularization techniques. By modularizing ABAP/D programs we make them easy B read and improve their structure. Modularized programs r also easier B maintain and B update.

How could we create callable modules off program code within one ABAP/D Program?
A. By defining macros.
By creating include programs in the library.

What r subroutines?
Subroutines r program modules which could B called D m other ABAP/D programs or within same program.

What r types off Subroutines?

Internal Subroutines source code off internal subroutines will B in the same ABAP/D program as calling procedure (internal call).
External Subroutines source code off external subroutines will B in the an ABAP/D program other than calling procedure.

What r different types off parameters?

Formal parameters Parameters which r defined during definition off subroutine with FORM statement.

Actual parameters Parameters which r specified during call off an subroutine with PERFORM statement.

How could one distinguish between different kinds off parameters?
A. Input parameters r used B pass data B subroutines.
Output parameters r used B pass data D m subroutines.

What r different methods off passing data?

Calling by reference During an subroutine call, only address off actual parameter transferred B formal parameters. formal parameter has no memory off its own, and we work with field off calling program within subroutine. If we change formal parameter, field contents in the calling program also change.
Calling by value During an subroutine call, formal parameters r created as copies off actual parameters. formal parameters have memory off their own. Changes B formal parameters have no effect on actual parameters.
Calling by value and result During an subroutine call, formal parameters r created as copies off actual parameters. formal parameters have their own memory space. Changes B formal parameters r copied B actual parameters at end off subroutine.
The method by which internal tables r passed By Reference.




What difference between function module and an normal ABAP/D subroutine?
In contrast B normal subroutines function modules have uniquely defined interface.
Sub routines do not return values.
Sub routines do not return exceptions.
Sub routines cannot B tested independently.
Declaring data as common parts not possible for function modules. Function modules r stored in the an central library.

What an function group?
A function group an collection off logically related modules that share global data with each other. All modules in the group r included in the same main program. When an ABAP/D program contains an CALL FUNCTION statement, system loads entire function group in the with program code at runtime. Every function module belongs B an function group.

What difference between internal tables and extract datasets?

The lines off an internal table always have same structure. By using extract datasets, you could handle groups off data with different structure and get statistical figures D m grouped data.
You have B define structure off internal table at begining. You need not define structure off extract dataset.
In contrast B internal tables, system partly compresses extract datasets when storing them. This reduces storage space required.
Internal tables require special work area for interface whereas extract datasets do not need an special work area for interface.


LOGICAL DATABASE.

What r logical databases ? ?? What r advantages/disadvantages off logical databases?
Ans - an Logical Database an hierarchical structure off tables. Use GET statement B process Logical Databases.
LDB consists off logically related tables grouped together – used for reading and processing data.
Advantages = A . No need off programming for retrieval , meaning for data selection
B . Easy B use standard user interface, have check completeness off user input.

Disadvantages = A . Fast in the case off lesser no. off tables But if table in the lowest level off hierarchy, all upper level tables should B read so performance slower.

Preparation off data records by L.D.B and reading off data records in the actual report r accomplished with command pair.
- Put and Get.

The three main elements off LDB r
- Structure, Selections, Database Program.

What sort off tables one could use in the designing hierarchy off an LDB ?
- Tables which r having Foreign key relations.

The structure off Logical Databases relfects ________________ dependencies off hierarchical tables in the SAP System.
- Foreign key
If you want B improve response time ( time B access data ) Logical DataBases permits you B achieve this using ______________
- VIEWS.
What r advantages off Logical DataBases ?
- It offers an easy-to-use selection screen. You could modify pre-generated selection screen B your needs. It offers check functions B check whether user input complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for database accesses. Enhancements such as improved performance immediately apply B all report programs that use logical database.


Report FORMATTING

In order B suppress leading zeros off an number field keywords used r
NO-ZERO.

The Command that allows for vertical alignment off fields one below other.
UNDER.

In order B concatenate strings only for output purposes command _________ could B used in the conjunction with 'Write' statement.
NO-GAP.

Data could B moved D m one field B another using an 'Write ' Statement and stored in the desired format.
TRUE. Write Date_A B Date_B format DD/MM/YY.

In order B have boldfaced text as output command used
Write (f) INTENSIFIED.

Background and foreground colors could B interchanged using command
Format inverse.

Which datatype cannot B used B define parameters.
Type F.

For each new event, system resets all formatting options B their default values. TRUE.



The processing block following END-OF-PAGE processed only if you reserve lines for footer in the LINE-COUNT option off REPORT statement.

To execute an page break under condition that less than an certain number off lines left on an page acheived by ________________________.
RESERVE n lines.

What limit for length off an page if page length not specified in the report statement.
F 0,000 Lines.

How could Symbols or R/C icons B output on screen?
WRITE (symbol-name) AS SYMBOL.
WRITE (icon-name) AS ICON.

More than 100 ABAP Interview Faq's

1. What is the typical structure of an ABAP/4 program?
ANS:-
HEADER ,BODY,FOOTER.

2. What are field symbols and field groups.?
Have you used "component idx of structure" clause with field groups?

ANS:-
Field symbols:-

Field groups :-

Can any body explain me what is field group?

Field groups are groups similar fields together into one name. Field group works in conjuction with

INSERT f1 f2 INTO fg
EXTRACT fg
SORT BY fg
LOOP ... ENDLOOP

INSERT f1 f2 INTO fg
---------------------

The insert statement is used to create a field group dynamically by inserting the field into it. Only global data fields can be inserted and not local data fields eg : in form modules.

EXTRACT fg
----------

This will combine all the fields in the fieldgroup and write them to a sequential dataset as a single record.

SORT BY fg
----------

Sorting of sequential dataset by field group.

LOOP AND ENDLOOP
---------------

LOOP.
AT ***
......
....
ENDAT.
AT ***
.....
....
ENDAT.
ENDLOOP. *-- Chinmaya

3. 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".
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?
ANS:-
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?
ANS:-
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?
ANS:-
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?
ANS:-
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?
ans:-
tables, structures, views, domains, data elements, lock objects, Matchcode objects.

11. How many types of tables exists and what are they in data dictionary?
ans :-
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.

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

14. What are the domains and data elements?
ANS:-
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?
ANS:-
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?
ANS:-
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it again).

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

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.

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?
ANS:-
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:- by Madhukar
Open SQL , native SQL are the interfaces to create the database applicatons.
Open SQL is consistant across different types of existing Databases.
Native SQL is the database language specific to database.Its API is specific to the databse.
Open SQL API is consistent across all vendors

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

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

22. What are the events in ABAP/4 language?
ANS:-
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.

23. What is an interactive report?
What is the obvious diff 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.
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?
ANS:-
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.
ANS:-
creating function module:-
called program - se37-creating funcgrp,funcmodule by assigning attributes,importing,exporting,tables,exceptions.
calling program - SE38-in pgm click pattern and write function name- provide export,import,tables,exception values.

26. What are the exceptions in function module?
ANS:-
COMMUNICATION_FAILURE
SYSTEM_FAILURE

27. What is a function group?
ANS:-
GROUP OF ALL RELATED FUNCTIONS.

28. How are the date and time field values stored in SAP?
ANS:-
DD.MM.YYYY. HH:MM:SS

30. Name a few data dictionary objects? //rep//
ANS:-
TABLES,VIEWS,STRUCTURES,LOCK OBJECTS,MATCHCODE OBJECTS.

31. What happens when a table is activated in DD?
ANS:-
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?
ans:-
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?
ANS:-

35. What is table maintenance generator?
ANS:-

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 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.
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 default 'xxx'.
select-options 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 [].

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?

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

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

107. What is the difference between a pool table and a transparent table and how they are stored at the database level.
ans:-
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?
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.