Batch
input Session
|
Call
transaction
|
error log is created
|
errors need to be handled explicitly
|
ASynchronous processing
|
Synchronous processing
|
Synchronous database update
|
Synchronous and asynchronous database
updating both possible
|
Transfers data for multiple transactions
|
Transfers data for a single transaction
|
Process is slower.
|
Process is faster
|
Transfers data for multiple transactions
|
Transfers data for a single transaction
|
Monday, 29 April 2013
Difference between Batch input and Call Transaction in BDC
programs on internal table
1 .TYPES : BEGIN OF t_testcntrlstr,
A TYPE c,
B TYPE c,
C TYPE c,
END OF t_testcntrlstr.
DATA : i_testcntrlstr TYPE STANDARD TABLE OF t_testcntrlstr,
wa_testcntrlstr TYPE t_testcntrlstr.
LOOP AT i_testcntrlstr INTO wa_testcntrlstr.
AT FIRST.
WRITE : 'At First Output'.
WRITE : / wa_testcntrlstr-A ,
wa_testcntrlstr-B ,
wa_testcntrlstr-C .
ENDAT.
ENDLOOP.
Considering the table i_testcntrlstr contains the data as follows
A B C
1 1 2
1 2 2
2.REPORT zsaptechnical_test.
DATA: pos LIKE sy-index,
index(1).
DO 10 TIMES.
CHECK sy-index BETWEEN 2 AND 6.
ADD 1 TO pos.
MOVE sy-index TO index.
WRITE AT pos index.
ENDDO.
3. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so that it appears as follows?
FRUIT QTY PRICE
Apples 12 22.50
Apples 9 18.25
Oranges 15 17.35
Bananas 20 10.20
Bananas 15 6.89
Bananas 5 2.75
A: SORT itab DESCENDING BY QTY PRICE.
B: SORT itab BY PRICE FRUIT.
C: SORT itab.
D: SORT itab BY PRICE DESCENDING.
4. The following program outputs what?
report zjgtest1
write: /1 'Ready_'.
PARAMETER: test.
INITIALIZATION.
write: /1 'Set_'.
START-OF-SELECTION.
write: /1 'GO!!'.
A: Set_ GO!! (each on its own line)
B: Set_ Ready_ GO!! (all on their own lines)
C: Ready_ GO!! (each on its own line)
D: Ready_ Set_ GO!! (all on their own lines)
5. Assuming an internal table contains 2000 entries, how many entries will it have after the following line of code is executed?
DELETE itab FROM 1500 TO 1700.
A: This is a syntax error.
B: 1801
C: 1800
D: 1799
6.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
7.DATA: BEGIN OF itab OCCURS 10,
qty type I,
END OF itab.
DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.
LOOP AT itab WHERE qty > 10.
WRITE: /1 itab-qty.
ENDLOOP.
This will result in:
A: Output of only those itab rows with a qty field less than 10
B: Output of the first 10 itab rows with a qty field greater than 10
C: A syntax error
D: None of the above
8.report zjgtest1
write: /1 'Ready_'.
INITIALIZATION.
write: /1 'Set_'.
START-OF-SELECTION.
write: /1 'GO!!'.
A: Set_ GO!! (each on its own line)
B: Set_ Ready_ GO!! (all on their own lines)
C: Ready_ GO!! (each on its own line)
D: Ready_ Set_ GO!! (all on their own lines)
9.report zjgtest1
write: /1 'Ready_'.
PARAMETER: test.
INITIALIZATION.
write: /1 'Set_'.
INITIALIZATION.
write: /1 'Set_'.
START-OF-SELECTION.
write: /1 'GO!!'.
A: Set_ GO!! (each on its own line)
B: Set_ Ready_ GO!! (all on their own lines)
C: Ready_ GO!! (each on its own line)
D: Ready_ Set_ GO!! (all on their own lines)
10.DATA: BEGIN OF itab OCCURS 0,
fval type i,
END OF itab.
itab-fval = 1.
APPEND itab.
itab-fval = 2.
DO 2 TIMES.
APPEND INITIAL LINE TO ITAB.
ENDDO.
DESCRIBE TABLE ITAB.
WRITE: / SY-TFILL.
11.REPORT ZTESTING1.
write: /1 'Ready_'.
END-OF-SELECTION.
WRITE:'HAI'.
START-OF-SELECTION.
WRITE:'BYE'.
INITIALIZATION.
WRITE:/ 'HELLO'.
Difference between SAP SCRIPTS and SMART FORMS
Scripts
|
Smart
forms
|
client
dependent
|
client
independent
|
one
main window required at least
|
no
need main window to create form
|
In sap script
99 main windows
|
Smartform
only one main window
|
.no
colors
|
colors
exits
|
no
drag and drop
|
drag
and drop
|
will
not support multiple page format
|
supports
multi page formats
|
paragraph
and character format cannot be reused because they are customized inside
form
|
paragraph
and character format can be reused outside the form separately
|
we
can integrate form scripts to smart forms
|
not
possible for smart forms to scripts
|
driver
program required to print output
|
without
driver program we can print output
|
Events in classical and interactive reports
1. LOAD-OF-PROGRAM
First event to be called before any of the other ABAP code is processed
2. INITIALIZATION
Called after the abap selection screen code has been processed (i.e. parameters, select-options etc) but before these are displayed to the user. So you can use it to initialize input fields of the selection screen or change the default values of these before the user gets to enter data into them.
3. AT SELECTION SCREEN OUTPUT
This is called just before the selection screen is displayed and can be used to manipulate the actual selection screen attributes using teh loop at screen functionality. This allows you to do things like hide fields, grey them out so they are output only or make them intensified etc.
LOOP AT SCREEN.
IF SCREEN-name = 'P_FIELd1'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON
This allows you to add processing to a selection screen field for when it is chnaged, user presses F1 or F4 etc using the following parameters
<parameter1>
Block <block1>
HELP-REQUEST for <parameter1> (i.e. When press F1)
VALUE-REQUEST for <parameter1> (i.e. When press F4)
RADIOBUTTON for <parameter1> (i.e. When press F4)
AT SELECTION-SCREEN ON P_FIELD1.
AT SELECTION-SCREEN ON help-request for P_FIELD1.
4. START-OF-SELECTION
This is the first event after all screen selection processing has been completed. If no other events are declared then there is no need to manually code this event as all processing statements will be automatically assigned to an implicit START-OF-SELECTION block. It is a good ideal to put it in though as it separates the code and makes it easier to read. GGenerally you would put all you data selection ABAP code within this event.
5. TOP-OF-PAGE
This is called when a new page is started with an ABAP list and is used to display a header for the list.
6.AT LINE-SELECTION:Allows the user to interact with the lists.
7.AT USER-COMMAND:USed for handling Push buttons.
8.SET PF-STATUS:Provides User Interface.
9. TOP-OF-PAGE During LINE_SELECTION
If you use the 'DURING LINE-SELECTION' addition this event is also triggered when creating detailed lists.
10. END-OF-PAGE
This is displayed at the end of each page if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer.
REPORT demo_rep NO STANDARD PAGE HEADING
LINE-COUNT 0(1).
11. END-OF-SELECTION
If your report is linked to a logical database this event is called after the logical database has completely finished its work. Otherwise this event is trigged after the START-OF-SELECTION event so you would generally use it to processes the data retrieved in that event.
Sunday, 28 April 2013
Data Dictionary interview Questions part1
1)What are the different types of data dictionary objects?
Data Dictionary Objects
1 Tables
2 Views
3 Domain
4 Data Element
5 Type Groups
6 Search Helps/Matchcode Objects
7 Lock objects
8 Structures
9 Table Types
2)What is lock object ?
LockObjects used to synchornize access of several users using same data.
3)How to eliminate duplicate entries in internal tables?
SORT itab.
DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.
4)What is the basic difference internal tables and database tables?
The basic difference is database tables are stored in DB serverand the internal tables are virtual tables these are created run time only
Internal tables are created dynamically, the memory of internal tables is not permant memory, for internal tables the memory will be created in the application server and it is external memory and terminates after the program termination.
5)How many ways you can create Table?
User can create a Database table in two ways.
1.Top-to-bottom approach: In this approach, first fields are defined and later domain and data element are defined.
2.Bottom-to-top approach: In this approach, first domain and data element are defined and later fields are defined.
6)What is SQL Trace?
SQL Tracer is a tool used to measure the performance of ABAP program.
Tcode :st05
7)how to creat transactions?
We can use TC SE93 for creating our own transaction code.
8)Open SQL vs. Native SQL
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.
9)Which statement is used to get the number of lines in an internal table?
DESCRIBE table .
sy-tfill.
10)Can you create a table with fields not referring to data elements?
Yes
11)Which database object is used for storing the system variables?
SYST table
12)Which transaction code is used executing a report (type 1 program)?
SE38
13)When is the TOP-OF-PAGE event triggered?
After executing first write statement in start-of-selection event.
14)Which transaction code is used for deleting the user lock on tables?
sm12
15)how many types of buffering?
Ans: There are three type of buffer
1 single record->it buffers only records based on select query statement.
2 generic buffer->it buffers all the records which match to primary key and generic key
3 full buffer
Buffering is use for improve performance.
16)Select up to 1 row and select single difference ?
Select single fetches first matching record. If more than one matching records are there then only the first matching record will be considered other records will not be taken into account. Where as select up to 1 rows will fetch all the matching records from the database.(Again it will assign only One Record to the internal table/Work area)
17)19. Different types of locks?
1. Read lock (shared lock)
Protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table.
2. Write lock (exclusive lock)
Protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.
3.Enhanced write lock (exclusive lock without cumulation)
Works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.
18) Control break events in ABAP:-
1. AT-FIRST: This is used when we want to execute the statements before records are processed.
2. AT-LAST: This event is used when we want to execute the statements after all records are processed.
3. AT-NEW: This event is used when we want to execute the statement before group of records are processed.
4. AT-END: This event is used when we want to execute the statements after processing of group of records.
What is the difference between SAP memory and ABAP memory?
1.SAP MEMORY is a global memory
data sending between main sessions using get parameter and set parameter is sap memory.
SAP memory is available to the user during the entire terminal session.
2.ABAP MEMORY is local memory.
data sending between internal sessions using import or export parameters is abap memory.
ABAP memory is available to the user during a life time a of a external session.
For example, we have four programs in abap memory and assigned some varibles to a particular program in abap memory then those varibles can't be used by anyother program in abap memory i.e., the variables are only for that program and also local to that memory,whereas sap memory can access all the abap memory or else it can perform any kind of modifications.
DIFFERENCE BETWEEN CHECK TABLE AND VALUE TABLE
Value Table :
1. Is to display possible values for a field. When the particular field is placed on any screen when you press F4 then possible values are displayed from Value table.
2. Maintain value table at domain level.
Check Table:
1.check tabke works at table level.
2.When there is a foreign key ralationship between 2 tables then,
the first table is called as foreign key table and the table which you have a relationship from this table to the second table is check table.
You can enter values in the foreign key table if there exist a record in check table.
DIFFERENCE BETWEEN FUNCTION MODULE AND SUBROUTINE
FUNCTION MODULE
|
SUBROUTINE
|
.they can be tested by
itself
|
they cannot .
|
.they can be remote enabled
|
they cannot .
|
they can handle exceptions
|
Only a few can handle.
|
.they have to be
maintained in
a function group.
|
It is not necessary
|
.Can return the value
|
Can not return the Value
|
Executable programs
|
NON Executable programs
|
Subscribe to:
Posts (Atom)