Professional Documents
Culture Documents
ABAP Interview Questions
ABAP Interview Questions
Grand total:
for this go to table-> right click ->select Text
then write the grand total is &v_total&.
1
5. Types of updating in call tr?
Ans. There are three types of updating in Call transaction.
1.Synchronous update
2.Asynchronous update
3.Local update
ANS. A> select statement which is used to read all the records from
the database.select single statement read the single record
from the database.
B> Select statement can be executed without where clause
but,select single needs to have where clause and we need to
specify the full primary key.
2
7.USING MM01 CREATE THE MATERIAL.
8.SEND THE DATA USING BD10 TRANSACTION.
9.GOTO WE05 F8
10.CHECK THE STATUS OF OUTBOUND IDOC , IF U GOT THE STATUS.03 IT WILL SUSCESS.
11. LOG ON RECEIVER PARTNER CLNT AND GOTO BD11 TRANSACTION
GIVE THE MATERIAL NUMBER U CREATED.& F8.
12 GOTO WE05 TRANSACTION & F8 CHECK THE STATUS OF DATA.
IF U GET 53 STATUS YOU WILL SUSCESS.
15. what are parameters of BDC OPEN AND INSERT fun module ?
ANS: CALL FUNTION ‘BDC_OPEN_GROUP’
CLIENT = <> “IN WHICH SESSION BE PROSSED
GROUP = <> “SESSION NAME
HOLD DATE = <> “ SESSION CANNOT PROCESS UNTIL THIS LOCK DATE
KEEP = <> “FLAG INDICATE WHETHER SESSION KEPT OR DELETE
USER = <> “AUTHORISATION WILL BE CHECK
PROGRAM = <> “NAME OF THE PROGRAM
3
EXPORTING.
TCODE = <>”TRANSACTION CODE
DYNPROTAB = <> “ BDC INTERNAL TABLE NAME
4
1.Synchronous processing i.e we can process single
transaction in a single program.
2.Synchronous and Asynchronous database updation.
3.Error log cannot be created.
4.Significance for sy-subrc.
5.It is faster than session method.
6. We can directly execute this method.
22. APPL2?
ANS. APPL2 - Organization and customizing. This is used at
the time of system configuration. it is done one time and
rarely changed.
30.Sort statement?
ANS. its is used for sorting internal table.
synatx :
SORT <itab> by <field> Ascending/descending.
31. How to fetch all the data from the Internal table?
5
ANS. EXAMPLE: LOOP AT IT_TAB INTO WA_IT_TAB
WA_IT_FINAL-MATNR = WA_IT_TAB-MATNR
WA_IT_FINAL-ERNAM = WA_IT_TAB-ERNAM
ENDLOOP.
37. In ABAP What is the Use of "FOR ALL ENTRIES" Clause & when
it is being used. And what it really does?
ANS. 1. duplicate rows are automatically removed
2. if the itab used in the clause is empty , all the rows in
the source table will be selected .
3. performance degradation when using the clause on big tables.
EXAPLE: SELECT MATNR ERNAM FROM MARA
INTO TABLE IT_MARA
FOR ALL ENTRIES IN IT_VBAP
WHERE MATNR = IT_MARA-MATNR.
6
ANS. to upload the multiple data from flat file.
7
SELECT...UPTO
46. Suppose u r using FOR ALL ENTRIES. What happens when there
is no data in the itab which is using all the entries?
ANS. If the table on which the For All Entries IN clause is
based is empty, all rows are selected into the destination
table. Hence it is advisable to check before-hand that the
first table is not empty.
47. How can u transfer the data from one itab to another
without using move & write statements?
ANS. using itab1[] = itab2[].
8
ANS. There we write description, selection screen variables,
output variables, custom tables, pseudo code, error msgs,
UTP(unit test plan).
9
61. in an interactive report i want to trigger both 'at
line selection' and 'user command'....if possible
then how?
ANS. YES BOTH THE VENTS ARE TRGGERED IN THE SAME PROGRAM. AT
LINE SELECTION EVENT THE VALUE OF THE CURRENT ROW IS STORED
IN THE SYSTEM FIELD OR THE HIDE WORK AREA AND THE TIME THE
USER DOUBLE CLICK THE SCREEN THE AT USER COMMAND EXECUTES
WHICH GIVE THE DESIRED FUNCTION CODE TO PROCEED FURTHER.
10
We can also assing components of structure to field symbols.
11
ANS. subtotal:
for dis initially find which field having price values,
Then go to table inside we are having Headder,Mainarea,footer
then go for main area,select the field right click
select->Flow logic-> program lines here u have to specifyI/p
& O/p parameters.
Grand total:
for this go to table-> right click ->select Text
then write the grand total is &v_total&.
12
DATA itab LIKE zabc OCCURS 10 WITH HEADER LINE.
SELECT * FROM zbad5 INTO TABLE itab UP TO 10 ROWS.
ENDSELECT
SORT itab BY sclass smarks.
LOOP AT itab.
AT NEW sclass.
WRITE: / itab."-sno1 itab-sclass itab-smarks.
ENDAT.
ENDLOOP.
83. can any body tell what is idoc archieving and how to do that?
ANS. Archiving means collection of HISTORIAL Idocs that can be
stored out side of The Database,By using this We can reduce
load on the data base.
"WE10" is the TCODE for archive idoc info structure.
Here 2 options is availabale.
1. Database
2. Archive
-> We can select Archive idoc then it give the information
about This.
13
ANS. trigger the command new-page.
92. CAN ANY ONE TELL ME What is the use of fallowing structures
1)BDCDATA
2)BDCMSGCOLL
ANS. BDCDATA standard structure contains following parameters.
program :name of the module pool programm.
dynpro :screen number
dynbegin:it indicates for the new screen
fnam :name of the fields in database
fval :fields values are assinged with the fields
by defineing that structure bdcdata as it_bdcdata and work
area wa_bdcdata and we can pass above values.
14
through log file. again reload the records.
96. Can we use Session method & Call transaction both in one BDC
if yes please give me example and scenario where we use this ?
ANS. we can use both call transaction and session method in one BDC
Program..
If we want to use call transaction method, In Call
transaction Method there is no error log will be
generated...So we use Session Method In the Same BDC Program...
100. What are the tables using in diff modules like SD, PM, MM,
QM AND FICO? give me some example names ? Do we need to use
the existing tables in R/3 most of the time?
ANS. Tables for SD: These are somr of main tables in SD
For Sales Document ie SO :VBAK & VBAP
For Shipping: LIKP & LPIS
For Billing : VBRK & VBRP.
15
application server ?
ANS. 1) when we upload a graphic from SE78 tcode its moved to
application server
16
table?
ANS. Field String is nothing but a work area and it holds only
single record where as Internal table holds multiple records
110. Withou using SLIN transaction how would you check custom
programs?
ANS. SLIN: is the transaction code is used to check the program
extends
113. Can we have two reports running parallely and both the
reports sharing the same internal table for processing the
data?
ANS. yes, two reports are running parallely because both have
two different objects and they have their own independent
context.Due to this we can share same internal table for
data processing.
17
ANS. Flat structure:
1.IF you have a structure with list of fields on it.
2.You can have a structure with in the structure included
Deep structure:
If you have tabletype(internal table) included in the
Structure.
18
time hit. For sorted Tables system automatically uses Binary
Search to retrieve the records. For Standard Tables System
Follows Linear Search.
Secondary Window:
In a secondary window you display text and data
in a predetermined output area. There is no flow text
display with page break. If you position a secondary window
with the same name on several pages, the system displays
the contents of this secondary window on each page.
Copy window
You use the copies window to define an output area for the
print output, whose content you want to appear either only
on the copy or only on the original. This allows you to
flag copies as copies when the form is printed.
Final window:
You may want to display or query values on the first page
that are determined only during processing. For example,
you may want to name the grand total in the letter text of
an invoice. However, this amount is determined only after
listing all individual items. Or you may want to query on
the first page within a condition the total number of
pages, which the system calculates only after processing
all pages.
In such a case, you use the final window: Processing first
skips all windows of this type in the tree and works its
19
way to the end of the tree. Only after the actual
processing is finished, the final windows are processed in
the order in which they appear in the tree (from top to
bottom). Now any information is available that is known
only at the end of the form processing.
20
I_SCREEN_START_COLUMN = 10
I_SCREEN_START_LINE = 2
I_SCREEN_END_COLUMN = 100
I_SCREEN_END_LINE = 20
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2. .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
21
exisitng data types. and will hold the memory space.
22
1)parameters 2)tables 3)class 4)data
ANS. we use all the four for defing data in abap
148. why u select the session method in bdc ? how many records
wil be updated on that time?
ANS. If there is a huge amount of data is to be transferred from
non-sap to sap system we use Session menthod.But session
method also has its limitation. We can transferred max. of
999 records using the session method.If we have have
thousands of records to transfer then we will use Legacy
System Migration Workbench (lsmw) tool that can transfer
max. of 5000 records at a time.
150. write the codes for how to fetch data from a select query
written under end-of-setection event.
ANS. The code is given below.
End-of-selection.
select * from <table> into <itabl> where <condition>
then populate the fields are like this
loop at itab.
write: itab-field.
Endloop.
151. How we can Hide buttons on application toolbar?
23
ANS. You can hide specific buttons on application toolbar by
using the command SET PF-STATUS .... EXCLUDING .....
DATA: fcode TYPE STANDARD TABLE OF sy-ucomm.
APPEND 'SAVE' TO fcode.
APPEND 'PRINT' TO fcode.
->SET PF-STATUS 'PF' EXCLUDING fcode.
24
ANS. Source list is nothing but the list of vendors providing
the
rawmaterials or the goods required for the cmanufacturing
customer.
Tcodes related to Sorce list
156. when are this three events fired and tell me whuich event
is fired first ,second and third --- at selection -
screen, at selection -screen output, and at selection-
screen on value request.
ANS. 1) at seletion-screen output (when the screen is displayed
its same as PBO in module pool-- generally we use this
event for scenerio like filling the list box etc.)
2) at selection-screen (this event gets called when the
user presses enter or execute -- generally we use this
event to carry out validations)
3) at selection-screen on value request(this event will get
called only when the user presses F4 on a specific field on
the selection screen.)
158. CAN WE DEBUG A IDOC? IF YES HOW TO DEBUG IN INBOUND SIDE AND
OUTPUT SIDE.
ANS. Yes We can Debug.
Outbound IDOC is just Program to prepare IDOC. Go to that
program and put a break-point and debug.
debug the inbound idoc
1) we 19 give the idoc number execute
2) click on inbound function module select the radio button in fore ground
3) check the check box call in debug mode enter in will go through the
function nmodule debug mode.
159. What is SQL Trace, how would you carried out performance
analysis of ABAP code using SQL Trace? Give the steps?
ANS. SQT Trace is used to analize the performance of select
queries.Transaction code is ST05.
STEPS:
go to ST05. select Active mode
select Trace on .select application provide the transaction code in command
line like xk01,xd01 like that. now enter the data in application
again go for ST05. select Inacivemode .Trace off.List Trace
25
and function modules defined in it.
FMOD1 populates itab1 and when FMOD2 is called will itab1
contains those values being populated by FMOD1?
ANS. If FMOD1 is called before FMOD2 then itab1 contains values.
161. What is the system field that stores the level of the list?
ANS.SY-LSIND
164. when we are using at new?should we use this inside the loop
or outside?what will be the effect?
ANS. At New
1. When a new record comes at new triggers. Atnew only used
inside loop and endloop.
26
only for addition or subtraction operation (arithmetic
operations) ? I need more information regards this?
ANS. MACROS -- it is just the abbreviation of the piece of code
(Set of few lines). When the same piece of code is repeated
multiple times in a program, they can be replaced with a MACRO.
Unlike sub-routines, during run time the control will not
call the routine, instead it will just replace the MACRO
with the piece of code.
MACROS can not be debugged.
endperform.
27
external text file with inventory data, and write these data
in sap?
ANS. If u implement to batch input program we should follow
these guide lines.
guide lines.
28
on basic list. When I select 5 records randomly, I want to get the address of
particular customer selected in secondary list?
ANS. In the above mentioned scenrio, u need to assign the
checkbox at runtime. You need to assign a variable intially
and later in the write statement, declare the variable as
checkbox.
181. User has given the specification to display the Check boxes
on the list, how will you handle this situation.?
ANS. WRITE - Output as checkbox
Effect
Outputs the field <f> as a checkbox. The contents of the
first character of f is interpreted as the "status":
' ' = not selected
'X' = selected
The user can change this as required.
DATA: chkbox(1) TYPE C VALUE 'X'.
...
WRITE chkbox AS CHECKBOX. "checkbox selected
chkbox = SPACE.
WRITE chkbox AS CHECKBOX. "deselected
WRITE chkbox AS CHECKBOX INPUT OFF. "deselected, protected
185. What is the difference between value table and check table?
29
ANS. Value Table
1. NO Input check 2. no Validation 3. Generates automatic proposals
4. No F4 Help
Check table
1. Does Input check 2. Does Validation 3. Provides F4 Help
193. what type of error exactly you will be seeing in the log
file while using call transaction mode ‘E’?
ANS. Your Question is Wrong.
No LogFile is generated for CT Method.
For Session Method a Log file is generated.
30
ANS. Indexes are used for Fast access of records from database
tables.
There are two types of indexes.
1)Primary Index: these are created automatically while table
is activating. It comprised of all the primary key fields only.
2)Secondary Index: these are created manually on rare
situations. These contains combination of primary key fields
and Non-primary key fields or Only Non-primary key fields.
198. With out any Write statement will the Top of the Page and
End of Page trigger?
ANS. No. Without any Write statement top-of-page will not
trigger. Because top-of-page will trigger only after
executing first write statement.
199. what are Program Events and Run time Events in Reports?
ANS. Program Events are:
TOP-OF-PAGE
END-OF-PAGE
Run tine Events:
INITIALIZATION
AT SELECTION SCREEN OUTPUT
AT SELECTION SCREEN
START-OF-SELECTION
GET EVENT(IF WE USE LOGICAL DATABASE)
END-OF-SELECTION
200. How you can handle errors in BDC.IN the log file what type
of error mostly will be facing in real time?
ANS. The errors we will face during BDC real time are
1) Duplicate Records
2) Field of not CHAR type
3) Batch input data is not available for screen xxxx
31
defined standard table format for display purposes and for
doing enhnacements on the output( Eg: downloading ALV data
to excel sheets).
202. How you will doing the bypass by using select statement?
ANS.
205. I have two internal tables itab1 and itab2 and I had move
the content of the itab1 to itab2 and then itab1 had to deleted.
ANS. itab2[ ] = itab1[ ]
refresh itab1
alternatively:
append lines of itab1 into itab2.
pay attention that your internal tables must have the same
structure.
if diff structure (not in order)
loop at itab1.
move corresponding tab1 to itab2.
append itab2.
endloop.
refresh itab1.
32
ANS. It is stored in a temporary Hide area.In other words it is
stored in buffer.
209. When you are in support, who will give you a Flat file or
Excel file(Legacy Data) to upload into SAP System in day-to-
day activity?
ANS. functional people can supply data depends on project
op_option-getotf = 'X'.
33
ANS. You need to copy the GUI status to the zprogram and add the
new buttons in the new GUI status/ you can create a new GUI
status using SE41.
When calling the FM 'REUSE_ALV_GRID_DISPLAY' set the status
I_CALLBACK_PF_STATUS_SET = 'F_SET_STATUS' and write a perform
Form F_SET_STATUS using rt_extab type slis_t_extab.
set pf-status 'GUI_DEMO' excluding rt_extab.
set titlebar 'D0100'.
endform. "f01_alv_event_pf_status_set
214. what is the use of help view?how can we create search help
for a field?in how many ways we can give search help?
ANS. Help view is used to display the list of possible values
for a particular help.
Helps are of two types.
Elementary Search help.
Collective Search Help.
215. what is ment by view?how many types are there ?what are
they?and what is the difference between data base view and
projection view?
ANS. View is an imaginary table. It does not lies under
database. Actually the View data is stored in database
tables only. Views are filled during runtime only.
There are 4 types of views: Database view, projection View,
Maintenance view and Help View
Data base view implement Inner join whereas Maintenance
view and Help view implement outer join
projection views can be created only on single table
select condition cannot be specified for projection views
since the database view is implemented on a database, only
transparent table can be used to create them
it is possible to access pooled and cluster table using
projection view
34
APPL0 (master data): Data which is seldomly changed. An
example of master data is the data contained in an address
file, such as the name, address and telephone number.
222. how we insert record in to data base table ? how many ways
are there what are there?
ANS. Following are the ways which I can promptly think of:
1.Using internal table: INSERT <dbtab> from table <itab>.
where itab (internal table)contains the entries to be inserted into the
database table2. Using work area:
INSERT <wa> into <dbtab>.
3. USING BDC
4. Table maintenance view through SM30
222. why we use matchcode object?without using match codes how
35
we use search helps?
AND. match code object is a tool to get search help in selection screen
Example: select-options: s_vbeln for v_vbeln matchcode object ‘zdodo’.
Otherwise we can use at selection-screen on value request event we get this
Facility.
Example: parameters: p_ebeln type ekko-ebeln
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_return type STANDARD TABLE OF DDSHRETVAL,
wa_return like line of it_return.
at selection-screen on value-request for p_ebeln.
select *
up to 10 rows
from ekko
into CORRESPONDING FIELDS OF TABLE it_ekko.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'EBELN'
WINDOW_TITLE = 'Ekko Records'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_ekko
RETURN_TAB = it_return
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE it_return into wa_return index 1.
p_ebeln = wa_return-fieldval.
36
ANS. * Events
slis_ev_item_data_expand type slis_formname value
'ITEM_DATA_EXPAND',
slis_ev_reprep_sel_modify type slis_formname value
'REPREP_SEL_MODIFY',
slis_ev_caller_exit_at_start type slis_formname value
'CALLER_EXIT',
slis_ev_user_command type slis_formname value
'USER_COMMAND',
slis_ev_top_of_page type slis_formname value
'TOP_OF_PAGE',
slis_ev_data_changed type slis_formname value
'DATA_CHANGED',
slis_ev_top_of_coverpage type slis_formname value
'TOP_OF_COVERPAGE',
slis_ev_end_of_coverpage type slis_formname value
'END_OF_COVERPAGE',
slis_ev_foreign_top_of_page type slis_formname
value
'FOREIGN_TOP_OF_PAGE',
slis_ev_foreign_end_of_page type slis_formname
value
'FOREIGN_END_OF_PAGE',
slis_ev_pf_status_set type slis_formname value
'PF_STATUS_SET',
slis_ev_list_modify type slis_formname value
'LIST_MODIFY',
slis_ev_top_of_list type slis_formname value
'TOP_OF_LIST',
slis_ev_end_of_page type slis_formname value
'END_OF_PAGE',
slis_ev_end_of_list type slis_formname value
'END_OF_LIST',
slis_ev_after_line_output type slis_formname value
'AFTER_LINE_OUTPUT',
slis_ev_before_line_output type slis_formname value
'BEFORE_LINE_OUTPUT',
slis_ev_subtotal_text type slis_formname value
'SUBTOTAL_TEXT',
slis_ev_grouplevel_change type slis_formname value
'GROUPLEVEL_CHANGE',
slis_ev_context_menu type slis_formname value
'CONTEXT_MENU'.
37
write : /Carrid.
endat.
when ever the new carrid is reached, carrid wiil be
written.
At END :
This is used for row-wise Calculation i.e, Sub-total.
Ex : At End Carrid.
uline.
Endat.
The end of carrid is reached, a line will be drawn.
At LAST :
This is used for Calculation of Grand total
Ex: At Last.
wirte : / Grand-Total.
Endat.
When entire processing of entire internal table is
over.
Item no Name
At First 101 chris
101 Mathew
At new 102 Rachel
102 Natasha
At new 103 Chait
231. what are ALV reports? how they are different from normal
reports?
ANS. ALV: Abap list viewer are user friendly reports. in alv
reports data will be displayes in a table.we have to
maintain some operations(asending, descending,filter) with
out writing any code in alv's.
38
ANS. SLIS is a type pool defined in the ABAP dictionary.
This contains some structures and table types used for ALVs
Example:
39
Case 1: Roll Back
sno name palce
1 abc hyderabad
2 xyz bangalore.
After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.
Case 2: Commit
sno name palce
1 abc hyderabad
2 xyz bangalore.
After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.
40
and at pf-status for generating the secondary list in
report then what we will use in ALV for generating alv list.
pls tell me what r the important thing to read in alv for
interview purpose.
ANS.
245. have you used performance tunig?what major steps will you
use for those?
ANS.
246. How to join 3 tallies & looping. We have developed a program
in a client say
(200- client) and 210 has test data. No developing rights.
How to test data?
ANS. Program is client independent so you can very well logon to
210 system and test it.
41
Server?
ANS. Occurs: when you specify occurs to table it allocates
some space to that paricular table when the
program is running.
occurs 0 means minimum 8kb space is assign to the
table
250. how to fetch data form without header line internal table ?
ANS. It is not possible to fetch data from Internal Table
without header line. u have to give explicit work area I
mean header to handle the records.
Ex code :
Types : Begin of ty_marc,
matnr type matnr,
werks type werks_d,
end of ty_marc.
TYPES:TY_T_MARC TYPE STANDARD TABLE OF TY_MARC
Data : it_tab ty_T_marc,
wa_tab type ty_marc.
* select statement to read the data.
* Display the output.
write : / wa_tab-matnr,
wa_tab-werks.
endloop.
253. what is the difference bet ween the appened and insert
Statement?
ANS. append :- By using this we can add a record at the end of
the table only
Insert :- By using can we can add a record in between the
records of table where ever it is neccesary
Append can be used only with the internal tables where as
insert can be used with both.
42
update the database is asynchronously and synchronously.then
we have to use call transaction in BDC
258. Scenario 1:
I am uploading 1000 records using session method. I have an
error in 950th record. What will happen and howmany records
will upload?
Scenario 2:
I am uploading 1000 records using Call Transaction method.
I have an error in 950th record. What will happen and
howmany records will upload?
ANS. Scenario 1:
upto 949 records will upload
Scenario 2:
expect 950th record, all records will be uploaded.
43
SET PARAMETER ID 'GJR' FIELD S_ARSEG-GJAHR.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
44
266.1.How can we validate single selection screen field and
multiple selection screen field in report and also in
module pool programming.pls give answer in brief with
example.
2.What is search help ? pls tell search help type breifly
with example?
ANS.
267. what is the difference between templates and tables.
ANS. TABLE IS DYNAMIC ,TEMPLATE IS STATIC
270. How to Modify the standard invoice and sales order form to
generate purchase order for printing and upload the company
logo.
ANS. Copy the standard forms in zforms and you can upload logo
by using RSTXLDMC or SE78.
271. How to create Reports with Radio Buttons, which gives sales
information, Delivery information and Billing information.
ANS. Parameter: sales_information radiobutton group g1.
Delivery_information radiobutton group g1.
Billing_information radiobutton group g1.
45
hide is mainly used to display secondary lists. then u write
write At line-selection event for secondary lists.
in this event u write sy-lsind=1 for first secondary list
and for second secondary list sy-lsind=2. so on. up to u can
write 20 secondary lists, but only one basic list.
46
276. how many types of windows are there in SMARTFORMS?not in
scripts?
ANS. 1.main window 2.secondary window 3.copies window 4.final window
282. whai is the transaction code or table to see all print programs?
ANS. Use NACE transaction and then select the output type from
that list. we can see the print programmes
47
283. which type of problems we generally face in reports and BDC
in real time?
ANS. in BDC:
1 Incorrect session
2 incorrect transaction
48
293. what is the RANGES stmt used in ABAP?
ANS. ranges are just like select-options but you dont get the
option to enter at seletion screen .
ranges: gr_hkont for bsis-hkont.
you can use it in the select queries
49
paths with collective search help.
It combines all the search paths that are meaningful for a
field.
Both elementary search helps and other search helps can be
included in a collective search help. If other collective
search helps are contained in collective search help, they
are expanded to the level of the elementary search helps
when the input help is called.
300. what is the difference b/w linear search and binary search?
ANS. in case of linear search system will search from begining.
that means Example : z table contains single field with values
1 2 3 4 5 6 7 8 9
if u r searching for a value then system will starts from
first position. if required value is founded then execution
will comes out from z table.
in case of binary search system will starts from mid point.
if value is not founded then it will search for upper half.
in that upper half it will check mid point.like that search
will takes place.
50
structure should be last entitity in this Scenario you can
use include structure.
3) you can append exactly one append structure to a
table/structure if u need it to add more than in a table
you can do it with different name and append it.
309. What is an index? By default system will create the primary index or
User can create,if user How?
And also Secondary indexes by User or by defaultly system?
ANS. Indexes are a sorted copy of the table that exist in the
database which helps in faster retrival of data from the
51
database. Primary Index : User cannot create a primary index, the system
creates a primary index by default based on the primary keys of the table.
Secondary Index : The secondary indexes are created by the
user.we can create a maximum of upto 15 secondary indexes
for a table.
52
extract record to it. In each subsequent EXTRACT statement,
the new extract record is added to the dataset.
314. What is the use of " TABLE MANTENANCE ALLOWED " .
And itts transaction code?
ANS. The main purpose of the table maintenance generator is to
Create/Change/Delete the table entries with out writing any
code. When ever we create table maintenance generator it
will generate a standard program.
53
PARAMETERS:
SELECTION-SCREEN:END OF BLOCK B1.
SELECTION-SCREEN:BEGIN OF BLOCK B2 WITH FRAME TITLE TWXT-001
SELECT-OPTIONS:
PARAMETERS:
SELECTION-SCREEN:END OF BLOCK B2.
54
EXAMPLE.
Read table <itab> with key <fieldname> binary search .
324. What are the errors occurred in a report?
ANS. In the report the these types of errors occured .
Errors:
1. syntax errors 2. naming conventions errors 3. dump errors
4. runtime errors 5. declaration errors 6. terminating errors
7. sucessful errors 8. warning errors
328. what is ASAP methodology? How many phases are there? what is
the percentage of each phase?
ANS.
1.PROJECT..PREPARATION
2.BUSINEES..BLUEPRINT
3.REALIZATION
4.FINAL..PREPARATION
5.GO..LIVE..AND..SUPPORT
55
ANS.
Start-of-selection.
Select.....
after readig data from database....
we use FM REUSE_ALV_FIELDCATALOG_MERGE
After that We display the Output
We use FM : REUSE_ALV_GRID_DISPLAY ( for Grid Format)
OR
REUSE_ALV_LIST_DISPLAY(for list format)
*****
*&----INTERACITVE ALV*******
We take two Internal tables ...
Data : itab type standard table of ty_marc (Type structure)
itab1 type standard table of ty_mara(TYPE structure)
data : it_fcat type slis_t_fieldcat_alv,
t_Event type slis_t_event,
t_listheader type slis_t_listheader.
we use FM : REUSE_ALV_GET_EVENT
This is function Module is used to catch the EVENTs like
TOP-OF-PAGE and END-OF-PAGE, USER_COMMAND....etc
For interactive Report:
we will give form like
Form User_Command Using ucomm like Sy-ucomm
selfld type SLIS_SELFIELD,
*& we'll call this Subroutine in the FM GRID DISPLAY..
case ucomm.
56
ANS. 1.create the pushbutton in Presentation server by using the
syntax is given below.
for creating the pushbutton:
selection-screen pushbutton 10(06) 'name of pushbutton'
user-command cli1.
This is initilized into the Initialization event in the
classical report.
2.print the record by using the statement Loop at
Loop at Itab
write: itab-field.
Endloop.
3.if database has no records it will work as like this.
first up all it will check the base table if this table is
empty then it will retrive the data from the destination
table based on the condition.
333. can onyone tell me , how many data classes and size
categories are there ?
ANS. Its totally three classes are there. these are given below.
data classes:
1.APPL0 : Master data (its fixed it cannot be changed)
2.APPL1: Transactonal data (changed rarely in the business)
3.APPL2: organizational data.(dialy changes the data in the
Business)
334. how many records are updated from a flatfile to sap database
in one shot?
ANS. ALL the records present in the flat file are updated to SAP
Database in one shot, it intents that we do not have to
execute it repetedly to upload the record set. So ans is
All the records present in the flat file.
335. you have own g table & kna1 table how to attach the search
help for g table as well as kna table?if u press f4 on
selection u should display only primary key field of kna1
as well as g table fields
ANS. You can do this by creating two elementary search helps and
including these elementary search helps in the collective
search help for that field.
Let's say we have a Z-Table as ZEMPLOYEE1 with key field
EMPNUM and We have standard table KNA1 with key field
KUNNR.
We want a search help with data of EMPNUM and KUNNR. For
this we create two elementary search helps for EMPNUM and
KUNNR and include them in the collective search help and
assign this to the field in the ztable. Also we can create
a elementary search help for the ztable and display it with
the key field of the KNA1 table.
57
application server so, which interm reduces database
traffic.
Fullbuffering can only applies to tables which have less
data and rarely changed.
Ex-tcodes, company master data like T100, etc
Here Select Single cannot be used.
337. without using matchcode ,help view ,check table , domain how
to create the search help anybody know this answar plz post
imdtly
ANS. Steps for Creating Searching Help
Screen 1.
SE11. Choose Radio Button ‘Search Help’.
Enter the name of search help starting with y/z
Click Create.
Screen 2.
Write Short Description.
TAB Defination
Enter Selection Method ‘TABLE NAME’.
Enter Dialog Type ’Display values immediately’
Enter Search Help Parameters Fields to which search
help is to be attached.
Check Imp and exp Box
Lpos and spos.
Screen 1.
SE11. Choose Radio Button ‘Database table’.
Enter the name of table to which the search help is to be
attached. Click Change.
Screen 4.
Check the fields in the table to which the search help is
to be attached.(They should be
the same as defined in the
Screen 2 Search Help Parameters Fields)
Click the Search help button .
SCREEN 3.
Enter the search help name
Click Generate purposal
Click Copy.
Screen 4.
Click on Utilities on MENU BAR
Choose Table maintenance generator
Screen 5.
Enter Authorization Group ‘&NC&’
Enter Function Group
Choose maintenance type
Maintenance screen NO.
Choose create.
Save and Activate
58
Screen 4.
Save and Activate.
338. HOW MANY EDITORS ARE THERE IN SAP ABAP. WHAT ARE THEY AND
THERE USES.
ANS. In SAP ABAP, 3Editors are using
ABAP Editor-SE38,
which is used for developing ABAP programs.
Script Editor- SE71,
which is used for Script Control commands,Text elements.
Screen Editor-SE51,
Which is used to develop PAI and PBO events in Modulepool
339. Why long time required to copy the file than delete the
same file.
ANS. COPY: It copy the content of a file from one place to
another.so,it require long time.
DELETE: It won't delete the entaire content intead it
delete the address of the file.so,it require less time than
copy.
59
344. What is the MM Flow with Transaction Codes?
ANS. MM flow is given below.
1.Purchase Requstion (ME51)
2.Request for Qutataion (ME41)
3.Qutation from differnt vendors (ME47)
4.price comparsion (ME49)
5.purchase order send to vendors (ME22)
6.goods reciept (MIGO)
7.logistic invoice verification. (MIRO)
60
EXAMPLE: PERFORM <SUBROUTINE> USING “AABBCC”->CALL BY VALUE.
PERFORM <SUBROUTINE >USING VAR1,VAR2->CALL BY REFERENCE
347. how to added data in list box?
ANS. WE CAN ADD DATA IN LIST BOX BY USING FUCTION MODULE
VRM_SET_VALUE
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
349. how to identify all the BDC Programs running in Client SAP
Environment?
ANS. SM36.
61
352. CAN U TELL ME ATTRIBUTES OF BOTH DOMAIN AND DATAELEMNT
SCREEN?
ANS. first of all give the attributes of the domain
attributes of domain:
table
type
size
length.
attributes of data element
data element is nothing but technical fields of table
field.it is a field in data base.
62
ANS. deep structure.
nested structure
simple structure
357. how to write code alv with interactive?when i clicked
1field i will generated next-level report,is it possible in
alv?
ANS.
Building Interactive ALV list
using 'REUSE_ALV_LIST_DISPLAY'.
By DODO
This program displays the Purchase Order header details on
the basic
list and on double-clicking any of the record on the basic
list,
the item-level information is displayed on the secondary
list.
REPORT ZPURCHASE_ORDER.
************************************************************
***********
* TYPE-POOLS DECLARATION
************************************************************
***********
TYPE-POOLS:
SLIS.
************************************************************
***********
* DATA DECLARATIONS
************************************************************
***********
DATA:
W_EBELN TYPE EKKO-EBELN,
W_PROG TYPE SY-REPID,
T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FS_FIELDCAT LIKE LINE OF T_FIELDCAT,
T_EVENTCAT TYPE SLIS_T_EVENT,
W_EVENTCAT LIKE LINE OF T_EVENTCAT.
************************************************************
***********
* SELECT-OPTIONS DECLARATION
************************************************************
***********
SELECT-OPTIONS:
S_EBELN FOR W_EBELN.
************************************************************
***********
* INTERNAL TABLE AND FIELD-STRING DECLARATIONS
************************************************************
***********
DATA:
T_EKKO LIKE
63
STANDARD TABLE
OF EKKO,
FS_EKKO LIKE LINE OF T_EKKO.
DATA:
T_EKPO LIKE
STANDARD TABLE
OF EKPO,
FS_EKPO LIKE LINE OF T_EKPO.
************************************************************
***********
* START-OF-SELECTION
************************************************************
***********
START-OF-SELECTION.
SELECT *
FROM EKKO
INTO TABLE T_EKKO
WHERE EBELN IN S_EBELN.
W_PROG = SY-REPID.
*&----------------------------------------------------------
----------*
*& Form pick
*&----------------------------------------------------------
----------*
* -->UCOMM text
* -->SELFIELD text
*-----------------------------------------------------------
----------*
FORM PICK USING COMMAND LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
READ TABLE T_EKKO INTO FS_EKKO INDEX SELFIELD-TABINDEX.
CASE COMMAND.
WHEN '&IC1'.
SELECT *
FROM EKPO
INTO TABLE T_EKPO
64
WHERE EBELN EQ FS_EKKO-EBELN.
W_PROG = SY-REPID.
FORM T_EVENTCAT.
W_EVENTCAT-NAME = 'TOP_OF_PAGE'.
W_EVENTCAT-FORM = 'TOP'.
APPEND W_EVENTCAT TO T_EVENTCAT.
ENDFORM.
FORM TOP.
READ TABLE T_EKPO INTO FS_EKPO INDEX 1.
WRITE:/ 'Purchase Document Number'(001),30 FS_EKPO-EBELN,
/ 'Company Code'(002), 30 FS_EKPO-BUKRS,
/ 'Plant'(003), 30 FS_EKPO-WERKS,
/ 'Storage Location'(004),30 FS_EKPO-LGORT.
ENDFORM.
65
359. which of the command flushes the database buffer?
a) $free b) $tab.
ANS. $TAB resets the TABLE buffers of the application server
it_screen-active = 0
append screen.
This is how you can use the components in the itab screen.
ALE:
66
the purchase order from the outbound system the inbound
system also recieves the same purchase order . that means
there is no change. so changes not possible in ALE.
365. what is process code?
Ans. which code is used for read the data from ci(communication
idoc) and it stores the data in perticular data base table.
that code is process code.
ex : matm .
it reads CI and stores the data in mara table.
Table types
Table types describe the structure and functions of internal
tables in the ABAP program. Their rows can have any row
type. Table types with elementary row type therefore can be
defined just the same as multi-dimensional table types
(table types with a table type as row type) or table types
using structures with table-like components.
In a simple words,
Structure is just a flat structure but Table type is an
internal table.
67
clear itab.
by using append we can insert multiple records to an
internal table.
368. what is the event while entering data in screen to get
next field?
ANS. start-of-selection
68
DISPLAY MODE.
UPDATE MODE.WHILE WE WERE EXECUTING THE CALL TRANSCTION BDC PROGRAM
380. what the tcode to check the consistency of work flow for ALE
/EDI in a inbound error processing?
ANS. Ale system provides a tool to test the consistency inbound
parameter for error handling
by using this we can test all the process codes or one
process code at a time.
out put is color coded report thsi displays possible cause
of errors
for process codes use RBDMOINC or RBDMOINF.
By using this u can find the link between process code and
function module, object type for message idocs ,object type
for message idoc packet size and task for error handling
69
Technical Specs, These are generally analysed and created
by Offshore team during the Requirement gathering, this
will be generated based on the Functional specs which was
given by the client...
386. What is the reason, a BDC program is working in 'A' mode
but not in 'N' mode ?
ANS. A:ALL SCREEN MODE USEFULLL TO
DISPLAY ALL SCREENS AT RUN TIME
N : NO SCREEN MODE NO SCREEN ARE AVALIABLE
I SUGGEST TO GO MOSTLY TO ALL SCREEN MODE AS IT HELPS TO
GIVE US A INFO WHERE THE RECORD UPLOADING IS FAILED.
1) Customizing requests :
Changes to Customizing settings are recorded in
Customizing requests.
2) Workbench requests :
Workbench requests record changes made to ABAP Workbench
objects.
3) Transport of Copies :
Transports of copies allow you to transport (sub-)objects
in an object list into any other SAP System you want.
4) Relocations:
389. After sending the data(any type) from SENDER to RECEIVER can
we send the same data to SENDER by using ALE?
ANS. YES we can send the data Either from receiver to sender and
vice versa. Because already we have partner profile in both systems and we
distributed that by using CMD TX BD64.
393. Can we use same Domain for more than Data element?
ANS yes we can use same domain for different data elements,
data element gives documentation i;e f1 help for a field
and domain describes the size and type of a field ,so
there can be many fields having different f1 help , but
same size and type.
70
field1_|- data element1 ____|
field2_|_ data element 2 ____|_____domain
| |
field3_|_ data element 3 ____|
394. hat are the Joins used for internal Table?
ANS. If you want to retry the data from more then one table
connected with common key , we will go for joins (Inner
joines and outer joins).
396. while running bdc call transaction method for user defined
table, all the records are saved except the last record.
whats the problem? can anybody clarify me?
ANS.
71
Set the session as foreground Job scheduling.
and keep the Session as TRUE or 'x'.
Matnr field (material no)
Werk field(plant) and some of fields used as mandatory
401. when u create an index in Data Dictionary..how do we call it
in a program or report..?
ANS. if we want to get the records very fast by using it is
possible by using stmt called READ.....index <idxno> statement
in program or report
Suppose you have created a secondary index for a field
EMPNAM in the table ZDETAILS.
Then you can use the statement
select * from ZDETAILS where EMPNAM = 'XXX'.
72
buddy.... hope u have got it....
mainly this event is used whenever we r using lists...
one list under the other
412. How to call A report from other report widout using include
program..??
ANS. one command is using for calling other report.
1.report 'report name' mode display.
2.using submit
submit 'zsat' via selection-screen and return.
73
a)IDOC EXTENSION
b)sending TRANSACTIONAL IDOC
c)CHANGE POINTERS
414. I have a table with 400 recs. among some are duplicate records.
how can I remove the duplicate records from the table.
ANS. Sort internal table according to field which is having
repeated values. And the use the statement "DELETE ADJACENT
DUPLICATES FROM <internaltable> COMPARING <the field with
which u sorted the internal table>.
416.I HAVE REQUIREMENT LIKE THIS, I HAVE TWO INTERNAL TBALE LIKE
ITAB AND ITAB1 IN ITAB I HAVE 50 RECORDS, IN ITAB1 100
RECORDS ARE THERE. WHEN EXECUTE THIS QUESTION WHAT WILL BE
THE OUTPUT A]50 B]100 C]150? AND HOW TO JOIN TWO INTERNAL
TABLES WHAT IS THE SYNTAX FOR THAT?
ANS. U can't simply display the values of two tables itab and
itab1 without linking/merging it.
1.Linking:
If itab & itab1 requires only one loop then either itab or
itab1 should be read and append to itfinal.
2.Merging:
If itab & itab1 requires two separate loops,then u need to
merge those two internal table.
IF u want to merge it,u need to create itfinal or itab2 or
whatelse u wish,which should be declared by the fields of
both itab and itab1.
But while merging internal tables,those tables should have
atleast one linking fields.
74
B.
422. Why can we get the Function module when we activate the
Smartform ?
ANS. we get a function module b'coz function module is globally
created and we can access it through any client .Therefore ,
we can say that smartform is client independent.
426. what is the difference b/w driver program & print program?
ANS. driver program internally created.
75
print program we have to create
428. what is the print program for smartforms .pls give me one
example .
ANS. the smart form print programm is the one where the majority
of data extraction occurs. typically,one smart form print
program should be associated with one type of form. for
example the smart form purchase order has a corresponding
smart form purchase order print program tat only handles
data extraction for tat form.this one-one relation ship
improves the transparency for the user between what is
being performed in the form versus the print program
429. i want to know abt. IDOCs and ALE like what's the role of
messege type in IDOCs and how things goes on in background
i know i sound absurd but as i m not clear abt.
ANS. Message Type for an Idoc is used to indentify the contents
of the Idoc or a breif context under which the IDOC has to
be sent.
76
ANS. or read texts asociated to an standard object use
READ_TEXT. If u want read a standard text created by the
so10 (like the texts for smartfoms) transaction use
READ_STDTEXT instead.
432.transaction code for assingning the function module to the
process code?
ANS. WE41(for out bound side)
WE42( for in bound side)
433. how can I assign a foregin key relation ship for a structure?
ANS. we cannot assign forien key relations to structure.it
willnot be possible.strucure itself has many records and we
can assign forien key records to the structures.
INITIALIZATION.
CLEAR : itab,
s_matnr.
REFRESH : itab,
s_matnr.
SELECT matnr
INTO TABLE itab
FROM mara
WHERE meins EQ 'CS'.
APPEND s_matnr.
ENDLOOP.
77
ANS. 1.GOTO T-code SMARTFORM-> give the smartform name-> press F8
2.After executing function module will generate.open
function module in display mode.
3.: press source code tab of the function module. In the
source code there is a perform %GLOBAL_INIT. In this
perform all the code of initialization and program lines is
display as perform. Here you can easily find your table and
variable by find command and set session break point on it.
437. 1.BAPI
2.BADI
3.USEREXITS.
4.ALE,IDOCS,REPORT,SAPSCRIPTS,SMARTFORMS.
And their uses,what is it process in realtime.
ANS. IDOCS -DATA CARRIES B/N R/3 AND R/3 TO NON SAP
ALE- iNTERGACE B/N SYSTEMS
REPORT - RETRIVE DATA FROM DATABASE AND DISPLAY IT. IT CAN
BE USED FOR DATA ANALYSIS.
SAP SCRIPTS- USED FOR CREATING SALES ORDE, PURCHASE ORDER,
IT IS USEFUL FOR BUSINESS COMMUNICATION.
SMARTFORMS-USED FOR BUSINESS COMMUNICATION, IT is client
independebt.multiple forms can be created, web based.create
colorfull manner.
BAPI- IS USED FOR DATA MIGRATION B/N SYS.
78
its allocated the memory at the runtime.while u defining
the data table u can assign the table type ,length.
these all tables are stored into the database.
Notes
The global SAP memory remains available to the user during
the entire terminal session. This means that set values are
retained when you leave a program.
You should not use the SAP memory for temporary storage of
values because other modes use the same global memory.
If you need a new key (parameter), you can create this in
the ABAP/4 Development Workbench.
EXAMPLE:
DATA: REPID(8) VALUE 'RFSCHU01'.
SET PARAMETER ID 'RID' FIELD REPID.
Sets the program name, e.g. for transfer to another
program.
Notes
Runtime errors
SET_PARAMETER_ID_TOO_LONG : Key longer than 3 characters.
SET_PARAMETER_ID_WRONG_TYPE : Key neither type C nor type
N.
SET_PARAMETER_VALUE_TOO_LONG : Value longer than 250
Characters
79
CHANGING
IT_OUTTAB = GT_SFLIGHT.
445. what is the diff b/e function module alv and oop alv.
ANS. The function module ALV uses FM to trigger display and
sorting appending think for alv report,
where as Methods are used in the OOPs concept fo the ALV.
the other difference is the user has more flexablity fi he
uses the OOPS ALV than the FM ALV.
448. what is the print program for smartforms .pls give me one example .
ANS. the smart form print programm is the one where the majority
of data extraction occurs. typically,one smart form print
program should be associated with one type of form. for
example the smart form purchase order has a corresponding
smart form purchase order print program tat only handles
data extraction for tat form.this one-one relation ship
improves the transparency for the user between what is
being performed in the form versus the print program
always remember tat customer specific customiozation must
be performed in the smart form print form and not in the
smart form print programme.
The major benfit of smart form print solutions over sap
80
scripts tat if the layout or order of information changes
in the smart form print form,you do not need to alter the
print programme.the lay out of the data on the form is
controlled only in the smart form print form.
449. at the checking of sy-subrc after call transaction stmt,if
it is zero what is the meaning of that of syn and asynch
updates explain.
a.)update of database table is success.
b.)execution of call transaction is success.
For syn update which one is correct?
For asyn update which one is correct?
ANS. For both sy-subrc will return zero if the database update is
successful,irrespective of situations if sy-subrc returns 0
its success message.
454. can u save internal table in sap memory from abap memory?
ANS. If you want save ITAB in sap memory then you have to use
IMPORT nad EXPORT statements
The followin exapmles will explain how it will works
Here i created two report progrmas
1==> ZSHAN_EXPORT_ITAB ---> TO EXPORT THE ITAB INTO SAP
MEMORY
2==> ZSHAN_IMPORT_ITAB ---> TO IMPORT THE ITAB FROM SAP
MEMORY
---------------------------------------------
81
REPORT ZSHAN_EXPORT_ITAB
DATA TEXT1(10) VALUE 'Exporting'.
DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.
EXPORT TEXT1 TEXT2 FROM 'Literal' TO MEMORY ID 'text'.
EXPORT ITAB TO MEMORY ID 'table'.
--------------------------------------------------------
===========================================================
--------------------------------------------------------
REPORT ZSHAN_IMPORT_ITAB.
DATA: TEXT1(10),
TEXT3 LIKE TEXT1 VALUE 'Initial'.
DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
SUBMIT ZSHAN_EXPORT_ITAB AND RETURN.
IMPORT TEXT3 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT3.
IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT1.
IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
455. iam having 3 internal table how can i pass data to the 4th
internal table
ANS. you have 3 internal tables u want to populate these 3
internal tables data to 4th internal table ..right
Start-of-selection.
82
Move :
T_mara-mbrsh = itab-mbrsh.
T_mara-meins = itab-meins.
T_mara-maktl = itab-maktl.
T_makt-maktx = itab-maktx.
T_makt-spras = itab-spras.
Endloop.
Else .
Write : / ‘No data is found in the first internal
table T_marc’.
Endif.
456. what is the difference between message type and basic type?
ANS. MESSAGE TYPE IS THE MESSAGE WHICH IS TRANSFERRED IN BETEEN
THE BUSINESS PARTNERS.
BASIC TYPE IS THE CONTAINER OF THE MESSAGE.
83
462. what are the loop events and what is the difference between
Them
ANS. AT FIRST - trigered when the loop exectutes for the 1st time
AT NEW <field> - trigered when the a new value is to the
field.
AT END OF <field> -trigered when the last occurance of the
value for the <field>.
AT LAST - trigered at last of the loop.
ON CHANGE OF - some what similiar to AT NEW.
464. how to design checkbox on the o/p of the list ,not on the
selection screen.
ANS. data: begin of i_marc occurs 0,
matnr like mara-matnr,
werls like marc-werks,
pstat like marc-werks,
c1,
end of i_marc.
................
................
................
loop at i_marc.
write:/ i_marc-c1 as check box, ........
endloop.
2.in order to establish the relation with other table by the use of primary
key in parent table and foreign key in child's...without establishing the
84
relation with any other table also ,we can create a table without having any
primary key
save bdctab.
open a BDC session.
insert data.
and close session.
endif.
469. in the final display list how can i change rows to columns
and vice versa
ANS. This is possible using dynamic internal table.
Declaration
DATA : IFCAT_TAB TYPE LVC_T_FCAT,
FCAT_TAB TYPE LVC_S_FCAT.
DATA : TLINS TYPE I.
FIELD-SYMBOLS : <LIST> TYPE TABLE, <L_LINE> TYPE ANY.
FIELD-SYMBOLS : <FVAL> TYPE ANY, <FPOV> TYPE ANY,
<TFVAL> TYPE ANY.
DATA : IDATA TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA.
LOOP AT ALV_FLDCAT_T INTO ALV_FLDCAT.
MOVE-CORRESPONDING ALV_FLDCAT TO FCAT_TAB.
APPEND FCAT_TAB TO IFCAT_TAB.
ENDLOOP.
After creating normal alv field catalogue we can add rows
info as column....
DELETE ADJACENT DUPLICATES FROM IFCAT_TAB COMPARING
FIELDNAME.
SORT IFCAT_TAB BY COL_POS ASCENDING. "FIELDNAME
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFCAT_TAB
IMPORTING
EP_TABLE = IDATA.
85
ASSIGN IDATA->* TO <LIST>.
CREATE DATA NEW_LINE LIKE LINE OF <LIST>.
ASSIGN NEW_LINE->* TO <L_LINE>.
form TOP_OF_PAGE.
**********Declaration*************
data : glistheader type slis_t_listheader,
llistheader type slis_listheader.
endform.
86
worked perfectly.
ANS. This is because BD87 is a report. Try n use Submit RBDMON00
with selection-table <seltab>. fill seltab with your IDOC
ID.
473. what is meant by idoc filtering?
ANS. I Doc filtering is nothing but wipout unwnted idoc's that
ar not required to recevingpartner.
Let us suppose some message type iam sending from my
central datbase sever to 5 no's application severs let it
take as some plants in my company code .
The master idoc will contains the data pertaining to the
five plants.
in thia case for plant No1 date is not reqiured pertaining
to all the remaining plants i.e 2 3 4 5.
in this case while creting the distribution model whe have
to mention the filter key's
Then when ever the master IDOC passe through ALE service
layer it will check;s for filter key' values s for a
receiver and it will wash out's the all the idoc's
otherthan the values and cretes the communication IDOC.
alwys communication Idoc is the subset of Master Idoc.
87
call session method.
endif.
wa_fieldcat-do_sum = 'X'.
append wa_fieldcat to it_fieldcat.
wa_sort-fieldname = 'KUNNR'.
wa_sort-tabname = 'IT_FINAL'.
wa_sort-subtot = 'X'.
append wa_sort to it_sort.
478. If suppose There are 10 records in flat file then how many
times BDC_open_group, BDC_INSERT, BDC_CLOSE_group executed?
ANS. open group once,insert 10 times ,close group once
88
done internally by using Number range object or something
similar. Let us consider the function module name
as /1BCDWB/SF00000359. The function module for the next new
and activated Smart Form would be /1BCDWB/SF00000360, one
more than the previous one.
486. how can i fetch the records of 3 tables with a single select
query,without using join.
ANS. using nested select statement we can fectch the data from 3
table.
like
endselect.
endselect.
endselect.
487. could you tell me the difference between an INTERFACE AND
89
CONVERSION?
ANS. both methods belongs to BDC . Interface means transfering
data between two systems. CONVERSION one time data transfer.
490. I have one selection screen field which is meant for only
display what will you do?
ANS. field to be display but no value is inputed into that
field :.
Ex: code :
parameters : p_matnr like marc-matnr modif id S1.
At Selection-Screen Output.
loop at screen.
if screen-group1 = 'S1'.
screen-input = '0'.
modify screen.
endif.
endloop.
90
493. In data element how many domains were defined
ANS. one domain
91
command = /H
Title=DebuggeR Type=Systemcommand
save to your local PC. after execution of the t-code drage
and drop the notepad file on the screen debugging will start.
500. Can we use more than two field in SELECT-OPTION? For example
Normally we get two field which is from and to fields, but i
want to get more values....
ANS. if You want to assign values in select-options write the
code in the initlization event.
you can include more than one values in inclusive option
provided by select-options.
or use Ranges where you can specify range of values in
selec-options.
SUBMIT <rep_name>
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM <rep_name>
AND RETURN.
if you know the number of lines then you can specify that
in OCCURS statemnt that would take that much of space but
if not sure then its better to take OCCURS 0.
92
503. If we will display the data by writing write statement on
start of selection then what is the need of end-of-
selection in classical report
ANS. This event is useful if ur report is using a Logical
Database. The event End-of-selection is triggered once
Logical database has finished reading all the data.
And one more thing if u have coded a STOP statement in
ur report, if some condition inside the loop fails STOP
statement is executed & control will be transfered to the
End-of-selection......
504. What is read with binary search? I have initialization write ?a?
Top-of-page write ?b? what is the output for this? If I don?t have start of
selection event in report
will it execute?it is mandatory or not? Is it advisable to have secondary
index ? What is process code in idoc? Where warning msg will display?
Where we use watch point?what exactly watch point
means? How to transfer std text from production to quality?
ANS. BINARY SEARCH DIVIDES THE ENTIRE SELECTION PROCESS INTO
TWO PARTS SO ITS HELP FOR PERFORMANCE TUNING.
2) I GUESS ONLY 'b' WOULD BE PRINTED.
3) NO ITS NOT MANDATORY TO CALL THE START OF SELECTION
EVENT.
505. How do you do BDC field Validtaions ? can any one help
with syntax?
ANS. BDC Field Validations are Done by the system while
processing the Data through Screens by executing Screen
Flow Logic.
93
ANS. Structure is not table.
because it creates WorkArea and Body is same acts as
Header.and it is temp memory location
TABLES: KNA1.
APPEND OBJCONT.
ENDSELECT.
94
ENQUEUE_ERROR = 7
OTHERS = 8.
95
very high atleast in terms of programming and so it
significantly affects the performance.
96
report ?
ANS.
523. what are ALV reports? how they are different from normal
reports? what are the main events that are used in an ALV
report? what is the use of SLIS type pool in alv reports?
ANS. ALV means ABAP List Viewer.ALV is available in two modes:
list and grid. List mode is good old list processing with
standard functionnalities, and grid mode is using a new OCX
object displaying grids.
97
ANS. TYPE-POOLS icon.
TABLES sscrfields. " screen fields
DATA functxt TYPE smp_dyntxt.
and in selection-screen
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
endcase.
This will give you the ida how we can add a button in the
Applicationtool bar .
525. can you create a table with out a data element? can you
create a field with out a data element?
ANS. Yes, We can create using buit-in type button on fiedls tab of
table creation. and it is not recommanded cos table to table
relation is not possible using the direct data type...
526. Give few names of cluster tables in sap? Give few names of
pooled tables in sap? give few names of transparent tables?
ANS. cluster tables:
MHND Dunning Data
MMIM_PRED MM-IM Temporary Data
SFHOT SAPfind: Active Structures
BSEG Accounting Document Segment
BSED Bill of Exchange Fields Document Segment
BSEC One-Time Account Data Document Segment
BSES Document Control Data
BSET Tax Data Document Segment
BSSEG Accounting Document Segment
transparent tables:
mara-material master table
kna1 - customer master
lfa1 - vendor master
SKA1- G/L Account Master
MSEG -Document Segment- Material
pooled tables:
T040, T040A
527. what will happen if you don't give occurs clause while
creating an internal table?
ANS. occurs 0 is used for mem allocation. I believe it means
8kb.
As per new version of sap,occurs sud be avoided as its a
obsolute statement.
or
98
mkart type mara-mkart,
end of ty_mara.
Data t_mara type standard table of ty_mara.
531. when you are using 2 internal table in program, you have
decided to use for all entries statement to retrieve data
but unfortunately there are no records in the first internal
table. What will be the result? (2nd internal table contains
records).
ANS. The driver Internal table 0r First internal Table Must have
records in it , if u use For All Entries . If the First
Internal table is initial (means no records in it) then the
For All entries will fetch all the records from the DB
table , which can be real perfromance Issue.
99
so before making a 'For all entries" for a table make a
check that its not empty.
eg. code :
select matnr werks from marc
into table t_marc
where matnr = p_matnr.
532. what is the use of select for all entries in an internal table?
ANS. To avoid nested select statement we use For All entries
statements. If there r more than 1000 records select for
all entries is used.
Performance o For All Entries is better to use...when
we are using more than One table
534. In the function module for reading text from the S.O header what
needs to be specified?
ANS. Using "Read_Text" Functional Module we can read the S.O Header
Text,Before that we have find the Object name and Id,That can
be acheived by using SE75(Sap Scripts Setting).Select object
name and Id's option and Click on display,Then
From the application Toolbar click on Find type Sales
order,select the sale order header from that list.note down
the object name and id.......
Execute the Read_text From SE37.
Provide the Sales Order No,Object name and Id number.
Execute we can get the S.O header text from here.
100
answers..but no such classification is available with macro
although macro can have different types of nested form
5.generally no of instructions in macro are smaller than subroutine
6.macro is always local to the program that defines it..
subroutine may or may not be local..
101
2) internal table without header line
102
However, you should not define an index for all possible
fields in the WHERE condition.
103
<F1><F2>....]
550. Will the views get effected when updating the database?
ANS. Yes. Since views do not exist in physical memory but are
only the logical representation of the physical tables.
Queries made on these views just fetch data from the
database tables.
Changes made in these tables will definitely affect the
results the View’s generate.
DO ... ENDDO
WHILE ... ENDWHILE
LOOP ... ENDLOOP
SELECT ... ENDSELECT
CHECK with a negative outcome terminates the current loop
pass and goes back to the beginning of the loop to start
the next pass, if there is one.
In structures like
104
FORM ... ENDFORM
FUNCTION ... ENDFUNCTION
MODULE ... ENDMODULE
AT
105
dependencies form tree-like hierarchical structures. Logical
databases read data from database tables that are part of
these structures.
Append Structure :
Structure in the ABAP Dictionary that is appended to
another structure or a database table so as to add further
components. Standard structures and database tables
delivered by SAP can be enhanced by means of append
structures in customer systems.
106
Eg: 1/10/2006 and 31/10/2006
ANS. DATA : lv_last_day_of_month TYPE sy-datum,
lv_datum_low TYPE sy-datum.
INITIALIZATION.
s_data-sign = 'I'.
s_data-option = 'BT'.
s_data-low = sy-datum.
lv_datum_low = sy-datum.
558. Do you use select statement in loop end loop, how will be
the performance? To improve the performance?
ANS. inside loop use read statement.
107
ANS. move statement is more effienet than move-corresponding.
In case of dialog programming move/movecorresponding stsmt
are used to put internal table workarea data into screen fields.
data: begin of itab occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
ort01 like lfa1-ort01,
end of itab.(here lfa1 is DBtable name)
:
:
* in case of movecorresponding
Movecorresponding :
If DBtable having 1000 fields and you are using
movecorresponding, then system has to check all the field in
table to move.
563. What is the table, which contain the details of all the name
of the programs and forms?
ANS. TNAPR this table contains all print programs and forms.
564. What are the difference between Interactive and Drill Down
Reports?
ANS. ABAP/4 provides some interactive events on lists such as AT
LINE-SELECTION (double click) or AT USER-COMMAND (pressing a
button). You can use these events to move through layers of
information about individual items in a list.
108
565. How did you handle errors in Call Transaction?
ANS. We can create a internal table like 'bsgmcgcoll'. All the
messages will go to internal table. We can get errors in
this internal table.
- Message type
- Message id
- Message Number
- Variable1
- Variable2
- Variable3
566. How to transfer the objects? Have you transferred any objects?
ANS. i believe its related to transportation of object from one
server to other..
dev to testing or from testing to prod...
Tcode is s09..
store u'r changes in a transport request ...
After making changes release the task and transprt request
and create a proposal from se09.
570. what is the diffrence between Field String & normal Work
area?
ANS. Field string is nothing but structure or record.
We create them manually. we can access them in different
programs.
Work area is automatically created in memory when we
activate those field strings. they r limited to program.
109
give name of that two exceptions
ANS. in the function moudle two standard exception are
1.communication_failure
2.system_failure
572. when we use the SELECT statement along with FOR ALL
ENTRIES then what type of validations we have do before
executing this statement
ANS. check Primary table should not be blank.
If not itab1[] is initial.
...
endif.
110
577. How do you get output from IDOC?
ANS. Function moudles or processing routines are alloted
dynamically based on message type andn IDCO type. We use
these function modules to process IDOC segments to get data
and move this segment data into internal tables.
578. Explain about roll area , Dispatcher, ABAP-Processor?
ANS. Application server contains Dispather.
Dispatcher contains queue file and workprocessors.
When we execute object, the request goes to dispatcher and
dispatcher sends it to queue file. after that dispatcher
allocates the request to available work proecessor to
process the request.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN ‘1’.
SELECT KUNNR
VBELN
ERDAT
ERNAM
NETWR
FROM VBAK INTO TABLE T_VBAK WHERE KUNNR =
W_KNA1-KUNNR.
111
581. suppose you are using session method for 1000 records and
there is error in 400 and 500 records.how many records will
be updated to the database?
ANS. Remaining 998 records will be updated to DB and the 2 error
records will be placed in session log for further
correction. If you correct those 2 records and run the
session again, the 2 records will also be updated to DB.
583. What are the pre requisites for For all Entries?
ANS. FOR ALL ENTRIES is used to replace nested select loops by
operations on internal tables.
1)Make sure that the select contains atleast the primary key
fields
112
586. what data types allows length specification ?
ANS. The ABAP types C - character, N -numeric and X -hexadecimal
needs length specification.
If you do not declare a length when you define a data
object, the system assigns the default length of 1.
587. There is a file in application server. How can you upload it
and separate it as per different fields?
ANS. open dataset p_file for input in textmode encoding default.
if sy-subrc = 0.
do.
read dataset p_file into w_rec.
if sy-subrc = 0.
split w_rec at ',' into wa_final-fld1
wa_final-fld2
.
.
.
589. What are the steps need to setup before creating an IDoc?
ANS. Communication Settings:
1) Create and Assining Logical Systems -- SALE
2) Maintain RFC destination -- SM59
3) Maintain TRFC Port -- WE21
591. What is parameter id? Where you can find parameter id for a
field?
ANS. Parameter id contains unique id for SPA/GPA Parameters.
To find parameter id : Go to the field in transcation Press
F1 in technical info u will get parameter id for that field
592. What are the developments you have done with data dictionary?
113
ANS. In addition to above.
Value Table
Check Table
Primary Key
Forign Key
Append Structure
etc..
these are also part of the data dictionary which an ABAPer
do.
Procedure
Select the table fields to be included in the index using the input help for
the Field name column.
The order of the fields in the index is very important. See What to Keep in
Mind for Secondary Indexes.
If the values in the index fields already uniquely identify each record of the
table, select Unique index.
A unique index is always created in the database at activation because it also
has a functional meaning (prevents double entries of the index fields).
If it is not a unique index, leave Non-unique index selected.
In this case you can use the radio buttons to define whether the index should
be created for all database systems, for selected database systems or not at
all in the database.
Select for selected database systems if the index should only be created for
selected database systems.
Click on the arrow behind the radio buttons. A dialog box appears in which you
can define up to 4 database systems with the input help. Select Selection list
if the index should only be created on the given database systems. Select
Exclusion list if the index should not be created on the given database
systems. Choose .
Choose .
Result
114
The secondary index is automatically created in the database during activation
if the corresponding table was already created there and index creation was
not excluded for the database system.
You can find information about the activation flow in the activation log,
which you can call with Utilities ® Activation log. If errors occurred when
activating the index, the activation log is automatically displayed.
595. Which function module you will use to attach a search help
to a field in Selection screen?
ANS. REPORT z_test11 .
PARAMETERS:
p_carrid(2).
DATA: table1 LIKE
ddshretval
OCCURS 0 WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_carrid.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'scarr'
fieldname = 'carrid'
* SEARCHHELP = ' '
* SHLPPARAM = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = 'p_carrid'
* STEPL = 0
* VALUE = ' '
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* SUPPRESS_RECORDLIST = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* SELECTION_SCREEN = ' '
TABLES
return_tab = table1
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5
.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
p_carrid = table1-fieldval.
START-OF-SELECTION.
WRITE: p_carrid.
115
loop at screen.
if screen-name = 'P_MATNR'.
screen-active = '0'.
modify screen.
ENDIF.
endloop.
599. What are the things you did in ALV grid display?
ANS. goto SE38
1)create a internal table with the structure field_catalog
2)call the FM Reuse-alv-grid-display
3)specify the import and export parameters in FM
4) Execute(F8)
callback_program = sy-repid.
callback_usercommand = interactivelist.
then create a subroutine like
form interactivelist using r_ucomm like sy-ucomm
using rfield like rs_selfield
set parameter id id1 field r_field.
.........
endform.
116
status.It consists of applicationof message conditions,
message type, message language etc.
Used in database management systems as a key which has two or more fields in
the columns in the table, or in a file.
117
ANS. It is a tool used for optimising your programs. Generally
used for performance of programs. Runtime analysis shows
you how long it takes to process ABAP code, from single
statements to a complete transaction. T-code SE30.
611. what is the difference between FOR ALL ENTRIES and SELECT *
FROM ?
ANS. For all entries is used to join the one or more tables based on
condition.Select * from is used to fetch the data from db
table,but don't use select * from due to performance standards. The
code like this
select vbeln
erdat
ernam
vkorg from vbak into table it_vbak
where vbeln eq v_vbeln.
select vbeln
posnr
matnr
matkl from vbap into table it_vbap
for all entrie in it_vbak
where vbeln eq it_vbak-vbeln
The sequence of fields used in select query must be same as
the sequence of fields in internal table.
thanks,i hpoe this is corrct...........
612. when you are using 2 internal table in program, you have
decided to use for all entries statement to retrieve data
but unfortunately there are no records in the first internal
table. What will be the result? (2nd internal table contains
records).
ANS.
118
615. IS DOMAIN IS REUSABLE ? IS DOMAIN IS CLIENT DEPENDENT OR
CLIENT INDEPENDENT..
ANS. Yes, Domain is reusable. It's not client dependent
616. In smart form how can we convert the decimal to whole no.
for ex. i have date like 5.456. now i want convert to whole
no. after point value more then 5 means the no should come
6. below 5 means its come 5. any body can help me with code.
ANS.
IF AD+0(1) GE 5.
BD = BD + 1.
ELSE.
BD = BD.
ENDIF.
119
protects write access to an object. The write lock allows
other transactions neither read nor write access to
the locked area of the table.
Use: you can see in almost all transaction when you are
open an object in Change mode SAP could not allow to any
other user to open the same object in change mode.
Technicaly:
When you create a lock object System automatically creat
two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a
queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being
queued through above FM.
120
is true the processing continue with the next statement.
CONTINUE terminates the current loop pass, returns the
processing to the beginning of the loop and starts the next
loop pass,
REJECT: it terminates the current event, even from loops or
subroutines.
622. How to reprocess the failed IDOC?
How wil u know idoc is failed?What are tcodes?
ANS. by using we19 we can reprocess idocs . through we02 we
can know idoc failed .
625. we can write the select query or any code after the end of
Selection. WHAT HAPPENED?
ANS.
121
diffrence between extended syntax check and code inspector
and how do use them to test the performance of the any abap
program ?
ANS Extended syntax check,ensures the removal of mistakes we
overlook while coding.
advantages:
obsolete stmts.
autorization checks
problematic stmts.
629. Is there any other way to create data elements apart from
se11 tocde as we dont use the se11 in real time generally
ANS. ya we can create data element through se80.
se80.
select dictionary
then select data type.
here u can create data element.
In real time we cant use se11, se38 etc. So we can do
everything in se80.
122
tab. on that tab we have to check the check box 'pagebreak'.
123
production system? in idoc we are doing bd64 for
distribution model view is it mandatory for idoc? and is it
possible without creating a distribution model view we can
generate a idoc?
ANS. In SM59 Lgoical Sytems area we will have to define the
Source and Target client. Then partner profile has to be
created to transport the Development to Production System.
635. What are Views, how they were useful. Types of Views
ANS. Views are basically a join of two or more underlying
database tables. Certain tables are logically related and
make sense and more meaning when viewed linked together.
Instead os making these joins at runtime and increasing
overheads, views when existing can provide information
readily such as in Search Helps in data entry screens.
124
selected while creating it, it could write into the
underlying table also. If a database view involves more than
one table, then it can only be a READ ONLY view.
click foregin key check box for which field you to define
foregin key relatiobship.
641. What is the difference between Search help and Match code ?
Match code:
125
Search Help - use Check table concept
match code - uses the value table cocept
AT PF<nn>.
<statements>.
These event blocks are executed when the user chooses the
corresponding function key. The position of the cursor in
the list is irrelevant.
AT SELECTION_SCREEN OUTPUT
126
LOOP AT SCREEN.
if VIEW = 'X' " View radio button selects
IF SCREEN-NAME = 'PR1'.
screen-INPUT = 0.
modify screen.
ENDIF.
IF SCREEN-NAME = 'PR2'.
screen-INPUT = 0.
modify screen.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
648. what is the use of system field 'SY-LOOC'? when will we use
it? Plz answer me its urgent!!!
ANS. It might be sy-loopc, as you might be ware that all the
system fields are found in structure call SYST.
127
649. How to put page-breaks in smartforms?
651. Is der any other criteria for using For All Entries except
if not itab is initial?
ANS. In case of FOR ALL entries,
2. Sort the local internal table with the key you are going
to use.
3. Delete adjacent duplicates in the local internal table
with the same key you have used for sorting.
4. Finally, before the select query check if the local
internal table is not initial.
ANS.
128
658. How to write file to application server?
what is file handling?
ANS. ABAP contains three statements for working with files:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP_NAME = 'ABA'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
case 'FNCODE'.
when CLICK
CHECK LSIND = 10.
LSIND = 4.
endcse.
129
ENDIF.
ENDLOOP
663. What are the different OK Codes that can be used in batch
input processing?
ANS. /n – terminates current batch input transaction and marks as
incorrect.
/bdel – delete current batch input transaction from session
/bend – terminate batch input processing and mark session
as incorrect
/bda – change display mode to process the session on screen
instead of displaying only errors
/bde – change display mode to display only errors instead of
processing the session on the screen
-window
-Graphic
-Address
-Text
-Table
-Template
-FlowLogic
-Folder, etc..
666. What are the exact sequences in which the reporting events
trigger.I mean starting from 1st to last.And how many times
we can use At-Selection screen or Start-of-selection in a
report??
ANS. Initialization : triggered when the report is loaded in
memory, which is generally used for declerations.
At selection-screen output : triggered when the selection
130
screen is loaded in memory before being displayed which is
used for scresn level validations
At selection-screen / <field> : before leaving the
selection screen, which is used for field level validations.
start-of-selection : the first event for displaying the
report.
end-of-selection : after the start-of-selection is
completed.
top-of-page : every time a new page is started in the list.
end-of-page : every time the list data reaches the footer
region of the page.
top of page during line selection : top of page event for
secondary list.
at line-selection : evey time user dbl-clicks(F2) on the
list data.
667. i have 4 primary keys and i want to use only one primary key
for select single.What changes will occur in the system?can
i use it?
ANS. In select single, you have to mention all the key fields in
where condition. Only in Select upto n rows there is no
need to specify all the key fields
Eg :
PERFORM bdc_field USING 'BDC_CURSOR'
'CSKSZ-KOSTL'.
131
671. What is the use of AT Selection Screen output when we have
At selection screen?Can u explain?
ANS. AT SELECTION-SCREEN.
AT SELECTION-SCREEN OUTPUT
Native SQL
Native SQL allows you to use database-specific SQL
statements in an ABAP program. This means that you can use
database tables that are not administered by the ABAP
Dictionary, and therefore integrate data that is not part
of the R/3 System.
WATCH POINT
132
Indicator in a program that tells the ABAP runtime
processor to interrupt the program at a particular point.
676. With the use of secondary index we can make a program run
faster but we are advised not to use secondary index why is
that so??
ANS. B'coz secondary index is just like a copy of data base
table reduced to specific fields.So,insertion and updation
in database become slow after creation of secondary index
where as read from table become fast.
This is b'coz additional indexes can also place a load on
the system since they must be adjusted each time the table
contents change. Each additional index therefore slows down
the insertion of records in the table
133
REPORT ZEX_LOCKUNLOCKED .
************************************************************
**
*
*
* Editor
Lock *
*
*
************************************************************
**
* Table Declaration
TABLES: TRDIR. "System table TRDIR
*Parameters-------------------------------------------------
-*
Parameter: P_PROG LIKE TRDIR-NAME,
P_EDITOR LIKE TRDIR-EDTX.
678. By using which single table i can get all the detail from
sale order to billing not used vbak, vbap, vbrk & vbrp.
ANS. vbfa
134
may subroutines if you pass the value by reference and the
form gets executed till the end , you may modify the values.
wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.
<wa> = 'DEF'.
ENDLOOP.
Outer Join:
681. in interactive reports i can use hide field for secondary list
out put in ALVs for secondary list as a out put which field r
u using?in interictive list ican use HIDE in ALVs which field
r u using?
ANS. IN ALVs we have to add the record user_command and form
name(EX:SUB1)in IT_EVENTS of REUSE_ALV_GRID_DISPLAY. As we
are passing the user_command event,F.M automatically calls
135
the subroutine with the two parameters:SY-UCOMM AND
SLIS_SELFIELD.
682. ANY one can tell me what is basic diff b/w keywords
STOP,CONTINUE,CHECK,EXIT, AT-EXITCOMMAND?
ANS. stop : The statement STOP is only to be used in executable
programs and in the following event blocks:
START-OF-SELECTION
GET
You leave these event blocks via STOP, and the runtime
environment triggers the event END-OF-SELECTION.
Note
Outside a loop, the statement CHECK exits the current
processing block
Note
Outside of a loop, the EXIT statement leaves the current
processing block.
136
ANS. for Sales Order : Vbak and vbap
for Material: mkpf, mseg
685. please any one can tell me modifytable keyword used in DDIC?
what is a basic diffrence between modify table and update key
word?
ANS. Both modifies DDIC table but the Difference btwn modify
table and update table is :
whereas,
update statement will insert a new row at last in DDIC Table.
We have to write as :
Select-options : vbeln for vbrk-vbeln.
Now vbeln field is not mandatory.
Now we have to explicitly write code for making high value
mandatory in AT SELECTION-SCREEN event.
At selection-screen.
loop at vbeln where high is initial.
endloop.
IF SY-SUBRC ne 0.
MESSAGE 'HIGH VALUE CAN NOT BE BLANK' TYPE 'E'.
ENDIF.
137
687. How to write message without using message class in report?
How to go to edit mode in classical display report, means
that how to edit one of the column after displaying
classical report, not in ALV.
ANS. We can display the fields on the report in edit mode using
INPUT keyword...
write:/ 'Buddula' INPUT.
INITILIZATION:
===============
This triggers when the program is loaded into memory to
initilize the values.
691. Control Break St........i have written At new for customer and
in the loop customer came in the 3rd record....weather it'll
trigger in the 1st record of the loop or 3rd record ?
ANS. the first and second records are empty and the third records
138
onwards the customer there, if so means initially it'll trigger for
the null value.. so we have to consider there is no null record, and
we have to sort the internal table before the loop. its an manditory
things while we using the break statement we have to sort them.
There are three different types of table buffering that can be used in
SAP:
Full Buffering : All Records of the table are loaded into the buffer
when a record in the table is accessed.
Generic Buffering: All Records with the same key fields are loaded
into the buffer when a record in the table is accessed.
Single Record Buffering: The specific record that was accessed is
loaded into the buffer.
Even if you read the table with INDEX you can sort the table
depending on what result you are expecting from that read,
means, the order and the priority of the value of the
particular fields expected from that READ statement.
694. What is the difference between data base objects and runtime
objects?
ANS. Database objects are permanently stored in the database and
exist even after the execution of program. Whereas, run time
data objects are the variables, tables, constants that exist
only during the execution of the program. They allocate
memory only for the run time. The memory is released after that.
139
message type, message language etc.
140
using Structure BDCMSGCOLL.
and FUNCITNO MODULE 'WRITE_FORMAT'.
Ex:
Data : bdc_msg type table of bdcmsgcoll with header line,
bdc_tab type table of bdcdata with header line.
if sy-subrc = 0.
call function 'FORMAT_MESSAGE'.
...
141
based SAP Systems may run on one computer.
ANS. ADVANTAGE. IF THERE ARE MORE THAN ONE TABLE AND THERE EXIST A
DISADVATAGES.
IF ONE OF THE TABLE IS EMPTY AND WE ARE APPENDING ONE TABLE
WITH OTHER BY USING FOR ALL ENTRIES THEN THE RECORDS TO NOT
VERIFY ITSELF.
INNER IS USED TO GET THE DATA WHERE THE TABLES ARE IN SAME
DATABASE AND OUTER JOIN IF THEY ARE IN OTHER.
ANS.MM flow:
142
Request for Quatation (ME41)
Quatation from different vendors (ME47)
price comparision (ME49)
purchase order send to vendors (ME22)
goods reciepts (MIGO)
logistic invoice verification (MIRO)
709. Parameters used in Functions?
ANS. import, export, changing, tables, exception
143
FROM <db table> INTO table <internal table>
WHERE <condition(s)>
2. INSERT <workarea> INTO <internal table> INDEX <position-
to-insert>
OR you can use append to insert ... APPEND <workarea> TO <internal table>
outer join:
select P~<fieldname> d~<fieldname> into corresponding
fields of table <internaltable> from ( <table> as p left
outer join <table> as d on <join condition> and <cond>.
719. What are the things you did in ALV grid display?
ANS. goto SE38
1)create a internal table with the structure field_catalog
2)call the FM Reuse-alv-grid-display
3)specify the import and export parameters in FM
4) Execute(F8)
callback_program = sy-repid.
callback_usercommand = interactivelist.
144
using rfield like rs_selfield
set parameter id id1 field r_field.
.........
endform.
721. What is field catalog?
ANS. Field catalog comes in ALV. Through Field catalog, u can
tell ALV as to which fields have to be displayed in the
list and at what position they have to be....
722. What are the FM you used in Session method?
ANS. bdc_open_group:
this function module is used to open the session.
parameters related to this function module are
client:sy-mandt
uname:sy-uname
holddate:sy-datum
group: <groupname>
bdcdata.
3)bdc_close_group:
145
All entries in the table must have a unique key.Hashed table
is useful when your have to work with very big internal
table and to read it with "READ TABLE WITH KEY ..." .
data:
ls_pernr type typ_pernr,
lt_pernr type hashed table of typ_pernr with unique key
pernr.
...
select pernr ename into table lt_pernr from pa0001.
...
loop at itab.
read table lt_pernr with table key pernr = itab-pernr
into ls_pernr.
write: ls_pernr-ename, itab-data.
endloop.
725. What is the difference between data base objects and runtime
objects?
ANS. Database objects are permanently stored in the database and
exist even after the execution of program. Whereas, run time
data objects are the variables, tables, constants that exist
only during the execution of the program. They allocate
memory only for the run time. The memory is released after that.
726. Is der any other way or tcode to process the session except
SM35?
ANS. call 'BDC_START_GROUP' id 'GROUP' field mtab-groupid
id 'QUID' field mtab-qid
id 'DISPLAY' field amodus
id 'LOG' field lmodus
id 'EXPERT' field d0300-expert
id 'DYSIZE' field ldefsize
id 'ERRORFORCEEND' field d0300-errfend
id 'SIMUBATCH' field opt_simubatch.
146
fname2 is the field defined in the table corresponding to
which the read statement is used.
(or)
There are three different types of table buffering that can be used in
SAP:
Full Buffering : All Records of the table are loaded into the buffer
when a record in the table is accessed.
Generic Buffering: All Records with the same key fields are loaded
into the buffer when a record in the table is accessed.
Single Record Buffering: The specific record that was accessed is
loaded into the buffer.
To make it clear...
Consider an example in which an IDoc type represents all
possible(all segments) information about employee. One
message type is employee salary(some segements) and other
message type Employee leaves information (some segements).
The difference between the message types is segments used..
730. Can search help be assigned to more than one table? Can
matchcodes be assigned to more than one table?
ANS. Search help can't be assigned to Table, it's to the field
of table of sel-screen.
Types of search help -
Elementary
Collective (Multiple Elemetary)
147
THANK YOU * PLS READ IT TO CLEAR
ABAP INTERVIEW
148