Professional Documents
Culture Documents
SAP AbAp
SAP AbAp
Ans. Yes it is possible to write call transaction and session in one program.
2. Which BDC you prefer?
Ans. If we want to transfer large amount of data and when we need to use more than one
transaction code we prefer session method. For small or less amount of data and for single
transaction use call transaction.
(This is more genric answer but you can add more on to this if you have worked on BDC)
3. When u prefer LSMW?
Ans. When we need to update medium amount of data we use LSMW. LSMW is also used
when the person like functional consultant has less programming language.
5. Difference between .include and .append?
Ans.
Include structure allows to add one or more structure into structure or table.Also placed
positioning anywhere. Upto 6 include structure can be used in a table.
Append structure can be placed only at the end of a structure or table which also stops
further insertion of fields.Only one append structure can be used
6. Preformance techniques
Ans.
1. The sequence of fields must be same as per database table
2. During writing select query write all fields in sequence as per database table.
3. Never write select statements inside loop.endloop.
4. Use st05 SQL trace, se30 run time analysis, code inspector, slin,etc.
5. Use select single * statement instead of select *
6. Always use primary key
7. Use binary search but before using binary search sort that table.
7. How to debug sapscripts ?
Ans.
Two ways to debug sapscript . first way is goto SE 71 and from menu bar select Utilities>activate debugger .then goto SE38 execute the print program ,it automatically goes to
debugging mode ..the other way is , run the program RSTXDBUG in se 38 . execute it . a
message will show that debugger is activated .now open the print program in se 38 u vll
notice that the print prgm is automatically diverted to debugging mode.
8. What is partner selection?
Ans. This concept is mainly used in IDOC where u select the partner profile using Tcode
We20 .with Tcode SM59 you create RFC(remote function call) to create communication link
to a remote system.
10. What is occurs in internal table?
Ans. Occurs addition to the Declaration will give initial size to that table.occur statement
allocates 8kb of memory to the internal table.
11. What is page window?
Ans : page window is nothing but a container of a page ,which uniquely identifies a set of
data for example while creating invoice we create logo window , billing document
header window , customer window , terms and condition window etc
12. What is the difference between scrolling a table horizontally and vertically..??
Ans: In table control when you scroll a table vertically presentation server needs to call
application server to fetch the next record and display in the table while in case of horizontal
scroll there is no need to call application server.
13. What are Field Groups?
Ans: A group that combines several fields fewer than one name, at runtime, the INSERT
command is used to define which data fields are assigned to which field group are called
Field Groups. It should always be a HEADER field group that defines how the extracted data
will be sorted; the fields grouped under the HEADER field group sort the data.
14. List the events in ABAP/4 Language?
Ans: The events in ABAP/4 are load of program ,Initialization, Selection Screen, Start of
Selection, End of Selection, Top of page, Line selection, User command, End, First.
15.How the values will be passed to RFC Function module PassbyValue or
Passbyreference?
Ans: always Pass by Value.
RFC is Remote Function call so it cant access the values with Pass by reference.
16. Buffering concept usage?
LOAD-OF-PROGRAM.
WRITE:/HELLO.
Ans: HELLO
(Explain the importance of LOAD-OF-PROGRAM Event.If you dont know Tell the
interviewer as this event is used in such cases when you want to clear sum buffers or
something Before calling that Program)
27. What is TMG?
Ans. TMG stands for Table Maintenance generator. It is a tool available in abap by which we
can add or delete multiple records at a time and it is executed or triggered by the transaction
code SM30.
28. Difference between select option and ranges ?
Ans. The main difference between select option and ranges is that ranges implicitly or
automatically creates internal table with fields like OPTION,LOW,HIGH,SIGN,etc . Where
as in case of select option we have to explicitly create internal table.
When u declares a select options it will implicitly declare an internal table (ranges) for you.
While using RANGES syntax u can declare internal table explicitly.
The only need of declaring ranges is when you r not taking input from the user but you want
make limit based selection at that time it will be use full e.g. SELECT ** from ** where
MATNR in val_range.
here u can use select-option or ranges : val_range.
29. is it possible to bring select option in module pool screens?
Ans.Create a SELECT-OPTIONS in module pool screen using two methods as shown.
Method 1:a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen
e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a
call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values between screen and
program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should
be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These
selection screen validations etc should be done in the top include only.
Method 2:a) Create 2 separate fields in your screen layout one for the low value and one for the high
value. Insert an icon beside the high value which will call the multiple selections popup
screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to
achieve this.
continued
struc_tab_and_field-fieldname = con_cust. KUNNR
struc_tab_and_field-tablename = con_kna1. KNA1.
CALL FUNCTION COMPLEX_SELECTIONS_DIALOG EXPORTING*
TITLE =
text = g_titl1 Customers
tab_and_field = struc_tab_and_field
TABLES RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
* Read the very first entry of the range table and pass it to
* dynpro screen field
*READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the
values entered by the user. Basically here you are just simulating the work of a select-options
parameter by module pool screen elements.
30.how we can retrive data using secondary index.explain with simple example
Ans: First create secondary indexes on required fields of a particular database table.
We can create one primary index and 15 secondary indexes.Once the respective secondary
indexes are created write select queries and within select queries specify secondary indexes
field name with where clause.