You are on page 1of 148

SAP ABAP IMPORTANT INTERVIEW

1) How to maintain lists in dialog programming?


2)How to send greeting with different languages to
different regions in smartforms?
3)Can we transfer 100 screen data to pass 200 screen?
4)In reports 1st list o/p can be consider as i/p of 2nd list
how it maintains?
5) In lsmw data length 20 chars only but there is 24 chars
field how can u manage?
6)What is the diff b/w OK_CODE n SY_UCOMM?

Ans: 1)by using table control


2)by using tcode se63
3)yes we can transfer 100 screen data to pass 200screen.
4)by using at line-selection

6)1. It is not possible to clear the content of sy-ucomm since


it is a system variable but we can clear the content of
ok_code.
2. The length of sy-ucomm is fixed but the length of ok_code
is not fixed. we can take any length

2.how to change col colors in alv reporting?


Ans. HERE we have 2 ways t display the colors.
1.slis_specialcol_alv.
2.lvc_s_scol & Emphasize

3. How to maintain subtotals n grand totals in smart forms?


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

4. In smart forms page no will be displayed as 2 of 15, 9 of 15


but while printing 10 of 15 it does not print correctly tell
me how to handle this scenario.

Ans. For this create a window name is "PAGENO",Right click on it


create text- from there u Have to specify
"&page&/&smartforms-formpage(C)&
Then it will declare in the form 1/10, 2/10......like this.

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

6. Modes in Call Tr?


Ans. A/E/N/P
Display ALL SCREEN(A)
DISPLAY ERROR ONLY(E)
DISPLAY NO SCREEN(N)
DO NOT DISPLAY DEBUGING POSSIBLE(P).

7. How you prepare documentation?


There is an option in se38..Go to Utilities and there u can
find option called documentation. Click that and u can write
ur documentaion.

8. Differentiate select and select single?

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.

9. Suppose in the Report Program I want to pass data to


another Report Program ..how will you do that one?

ANS. U can do this by EXPORT IMPORT concept...


u export all the data which you want may it be an internal
table or just a structure or some data object using the
command...
EXPORT <f1> <f 2> ... TO MEMORY ID <key>. for individual
variables and for exporting internal table the command is
EXPORT <Table name> to MEMORY ID <Key>.
Then, u can import them in some other program by using the
command ...
IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID
<key>.

10. What are steps involved in creating ALE?

the following steps will be done when creating ALE:


1.DEFINE LOGICAL SYSTEMS BOTH SENDER & RECEIVER USING SALE
TRANSACTION.
2.ASSIGN CLIENTS TO LOGICAL SYSTEMS USING SCC4 TRANSACTION.
3.CREATE PORT USING WE21 TRANSACTION.
4.CREATE MODEL VIEW USING BD64 TRANSACTION.
5.GOTO ENVIRONMENT & CLICK ON GENERATE PARTNER PROFILES
GIVE PARTNER SYSTEM NAME & F8.
6.YOU GOT THE RESULT MODEL VIEW HAS BEEN CREATED.
F3 ,F3 GOTO EDIT->MODEL VIEW->DISTRIBUTE

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.

11. what is Tcode for Basic ALE configuration?


ANS. SALE is correct - through this we can define all the basic's of IDoc

12. how you identify errors in call tr?


ANS. With Call Transaction statement we can give the addition as
MESSAGES INTO <internal table> which is of type BDCMSGCOLL
which will contain all the messages.then loop through this
table to analyse the messages.

13. what are the fields in BDC Data?


ANS. BDC Data is a structure with 5 fields.
1.program char holds program name responsible for the scrn
2.Dynpro numc screen number
3.DYnBegin char 'x' indicates start of the screen.
4.Fnam char Field name
5.Fval char(80) Field value

13. tell me about status codes?


ANS. these r the mile stones in transfer of IDOC by which the
IDOC sending system knows the status of IDOC . there are 75 status record
0 to 49 are recorded for outbound and 50 to 74 are for
inbound.

14. What is the Difference Between basic list and interactive


list?
ANS.A> THERE IS ONLY A SINGLE BASIC LIST WHERE AS WE CAN HAVE ANY
INTERACTIVE LISTS IN WHICH THESE SHOULD BE BETWEEN 1 AND 20.
BY USING LSIND WE CAN GET THE LIST NUMBER.
B> Basic list is nothing but classical list it will display
only one single list.we can not possible to have trigger
secondary lists. so we will use interactive reports to
triggering the secondary lists using At line-selection,At
user-command,At pf-n.

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

CALL FUNTION ‘BDC_INSERT’.

3
EXPORTING.
TCODE = <>”TRANSACTION CODE
DYNPROTAB = <> “ BDC INTERNAL TABLE NAME

16. what is the status code when IDOC is created?


ANS. 01 for Outbound side
51 for Inbound Side.

17. What is the Procedure for BDC?


ANS. A>DECLARE BDC TABLE
B>FILL BDCTABLE
C>COLLECT TRANSCTION INFORMATION
D>CREATE AND RECORD PROGRAM
E>PROCESS BATCH INPUT
F>SESSION/CALL TRANSACTION

18. Recording -- Transaction code?


ANS. SHDB/ SM35 for Bach input session over view

19.STEP BY STEP DETAIL PROCEES OF BDC.


ANS. General flow of a BDC program is like this....
1) First create recording for the T code which you want to
make BDC for... Use T code SHDB for recording.
2 ) Now save that recording and create pogram from that
recording using Create Program button. give the BDC driver
program name and create.
3 ) Now the general logic of BDC program goes like this....
- Upload Flat file into and internal table using function
module "UPLOAD"
- OPEN BDC GROUP.
- Now loop at that internal table which contains the data
from flat file.
- move data from internal table to fields of BDCDATA using
automatically gebnerated code from BDC.
- CALL TRANSACTION <T CODE> using BDCDATA...
- CLOSE BDC GROUP

20. Run Time Analysis - Transaction code?


ANS. SE30 : FOR RUN TIME ANALYSIS.
ST05 : FOR SQL TRACE
SCI : FOR CODE INSPECTOR
SLIN : FOR EXTENDED CHECK
ST22 : FOR SHORT DUMP ANALYSIS

21. what is the difference between session ,call Transaction?


ANS. session method:
1.Asynchronous processing i.e we can process multiple
transaction codes in a single program.
2.Synchronous data base updation
3.Error log created.
4.No significance for sy-subrc.
5.It is slower than call transaction method.
6.We cannot execute this method directly.

call transaction method:

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.

23. How to find Buffered or not?


ANS. We can find buffured or not by going to the technical
settings of a table .There is an option called 'Buffering
allowed'.If that option is checked ,that means the table is
buffured.

24. what is table maintenance?


ANS. Table maintainance is nothing but adding / modifying /
deleting records from table. You can use transactions
SM30 / SM31 for the same.Also SM13/SM14 can be used.

25. what is search helps..How many types are there?


ANS. 1.elementary search help i.e to give help for a single table
2.collective search help i.e to give help for multiple
Tables.

26. what is exact difference between uline and sy-uline?


ANS. WRITE: uline. --- does not work.
WRITE: sy-line. --- Correct

27. In Background Report, how to handle errors?


ANS.USING ERROR LOGS.

28. How to process the session dynamically?


ANS. Here two ways for processing sessions.
1.Go to SM35 process the session.
2.By executing RSBDCSUB.

29. what are Conversion Routings?


ANS. IT CONVERT SAP STANDARD TABLE DATA TO NORMAL DATA
EXAMPLE: 00000038 -> 38 USING TWO FUNTION MODULE
CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
The INPUT module performs the conversion from display
format to internal format. The OUTPUT module performs
the conversion from internal format to display format.

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.

32. WHAT IS READ STATEMENT?


ANS. READ STATEMENT IS USED FOR READING THE RECORD FROM INTERNAL
TABLE NOT FOR DATABASE TABLE.
EXAMPLE: READ TABLE IT_TAB INTO WA_IT_TAB WITH KEY MATNR =WA_IT_TAB1-MATNR.

33. what is check table?..what is domain?


ANS. WHEN WE DEFINE A FOREGIN KEY IN A TABLE (A). IF THIS KEY REFERS TO
PRIMARY KEY OF ANOTHER TABLE (B) THEN TABLE (B) IS CHECK TABLE.
DOMAIN: TECHNICAL CHARATERESTIC OF THE TABLE IS CALLED DOMAIN.

34. WHAT IS Select option?


ANS. Select option is a type if internal table
it has four options . They are
1. Sign
2. Option
3. Low
4. High
it is used for multiple selection

35. At selection-screen on Fields output?


ANS. we can change field before going to display like hide. this
will process before at-selection screen and after
initialization events.

36. can anyone give me notes on bdc direct input method?


ANS. WE HAVE SOME STANDARD PROGRAM FOR DIRECT INPUT.
RMDATIND-MATERIAL MASTER INPUT

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.

38. what is Initialization Purpose?


ANS. THE USE OF INITIALIZATION EVENTS IS WE HAVE TO CALCUTATE
THE LOW AND HIGH VALUES IN THE INITIALIZATION EVENT THEN IT
WILL DISPLAY ON THE SELECTION SCREEN.
FOR EX: LOW = SY-DATUM.
HIGH = 10 + SY-DATUM.
SELECT-OPTIONS: EVBELN FOR VBAK. APPEND EVELN
INITIALIZATION.
EVBELN-LOW = '7580'.
EVBELN-HIGH = '7590'.
EVBELN-SIGN = 'I'. I MEANS INCLUDED
EVBELN-OPTIONS = 'BT'.
39. WHAT IS THE RECORDING PURPOSE?

6
ANS. to upload the multiple data from flat file.

40. What is Internal Table?


ANS. Internal tables provide a means of taking data from a fixed
structure and storing it in working memory in ABAP. The
data is stored line by line in memory, and each line has
the same structure. A particularly important use
for internal tables is for storing and formatting data from
a database table within a program.

41. Types of BDC?


ANS. there r 3 types (or) methods of BDC.
1. call transaction
2. session method
3. direct input method

41. What are Call Transaction Modes?


ANS. The call transaction mode can take the following values:
'A' Display screen
'E' Display only if an error occurs
'N' Do not display
'P' Do not display; debugging possible
If the MODE addition is omitted, then the processing mode
is 'A'.

42. what are system Variables?


ANS. system variable r sap defined we can use anywhere of a
program and also these r global.

43. WHAT ACTUALLY IS REAL TIME IMPLEMENTATION HOW MANY PHASES


ARE THERE IN THAT.
ANS. Best implement of ERP can be done using its 11 stages and
these are as follows

-Pre-evaluation and screening


-Package evaluation
-Project planning phase
-Gap analysis
-Reengineering
-Configuration
-Implementation team training
-Testing
-Going live
-End-user training
-Post-implementation

44. Select .. Up to one row will have better performance than


the Select single *?
ANS. 1)SELECT single retrives only one record which ever come
across first in data base query
SELECT ..upto 1 row , all records are fetched into a buffer
which are satisfied from Where condition in Data base
query , and from buffer first record is fetched .
>>same as Answer 2
2) If you know all the primary keys in WHERE condition ,
use SELECT single.
If you dont know all primary kyes in WHERE condition , use

7
SELECT...UPTO

45. In an Internal table how do you suppress or add the leading


Zeroes for a particular field in your itab?
ANS. Unpacks the packed field A and places it in the field B
with leading zeros. If B is too
short, it is truncated on the left.
Exampl: DATA: p_field (2) TYPE p VALUE 103,
c_field (8) TYPE c.
UNPACK p_field TO c_field.
WRITE: p_field, c_field.
Output: 103,
00000103.
OTHERWISW We can use a function module 'CONVERSION_EXIT_ALPHA_INPUT'
to add the leading zeros.
example:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_KUNNR
IMPORTING
OUTPUT = P_KUNNR.

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[].

48. After the SESSION is created where is it stored?


ANS.HEDER SECTION SESSION INFORMATION ARE STORED IN APQI TABLE
DATA SECTION ARE STORED IN APQD TABLE.

**49. In SE11 we created two database tables say some 1000


fields each.Now f we want both the tables combined into one
table, how do we do that?
ANS.

50. How many fields(max) can be there in a transparent table?


ANS. A table may not have more than 249 fields.

51. how to create a button in selection screen?


ANS. we can create the buttons like this
selection-screen pushbutton 10(4)'button name' user-command but1.

52. what is the difference betn end-of-page and end-of-


selection?
ANS. End-of-page : is footer of the page.
End-of-selection: is triggered At the end of the
processing block.
53. How do you write technical specs?

8
ANS. There we write description, selection screen variables,
output variables, custom tables, pseudo code, error msgs,
UTP(unit test plan).

54. what are the differences between scripts & smart


forms?
ANS. 1.Sapscript is Client dependent
Smartform is Client independent.
2.Sapscript can uploaded/Downloaded whereas
smartforms cannot.
3.protect/endprotect command in sapscript will
not work in smartforms
4.Transaction for sapscript is SE71
For smartform – SMARTFORMS

55. You are running a report. It is taking long time for


execution. What steps will you do to reduce the
execution time.
ANS. just go through st05 and se30.
inner select statements r not acceptable.
select ...endselect is not suitable
more inner joins r not recommanded

56. what is a value table?


ANS. a value table is nothing but a domain level checking

57. how many indexes can be created for a table?


ANS. we can create 16 indexes
1 primary index
15 secondary indexes

58. How can i develop more than 30 interactive lists in


reports.
ANS. We can develop maximum 20 interactive lista using
At line-selection.
If we need more than 20 interactive list use user-command.
set pf-status<xxx>.

59. what are SPA and GPA parameters?What the Purpose?Examples?


under ABAP Memory.
ANS. Within a main session, when ever you start an application
program, it opens up an internal sessions with in the main
session. The internal session has a memory area that
contains the ABAP program and its associated data. So when
ever you want to pass data between two internal sessions,
then you can use ABAP Memory (i.e import, export).

When comes to SAP memory (also known as global memory), if


the data has to be passed b/w two main sessions, we can use
SAP Memory(SPA/GPA Parameters). SAP Memory can also be used
to pass data b/w internal sessions.

60. what is Import and Export Memory?

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.

62. SUPPOSE WE ARE RUNNING A BDC PROGRAM IN BACK GROUND AND AT


THE END WE FOUND THAT SOME RECORDS ARE NOT UPDATED?WHAT IS
THE SOLUTIONS
ANS. according to your question , error records will move to log
file,go to log file and rectify the errors what ever you
have,again start the process from begining onwards, so in
seesion method because of synchronous updating the process
will be stoped,so you have process from begining onwards.

63. give examples of pool,cluster tables?


ANS. Pool tables are: A005,A001
Cluster table:BSEG

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

65. 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.
The work processor contains screen processor, abap
processor and flow logic.
ABAP processor process the abap code.
For each request in workprocessor contains user context and
roll area.
Roll area contains program name, variables, memory area,
dyanmic variables, etc.

66. What is the main point while using control break in


internal table ?
ANS. The main point is that we have to first sort out the Table
in Asce/Dese order and we can use control beark with in
loop and endloop.

67. What is Field symbol?


ANS. Field symbol is a place holder for existing fileds. Does
not reserve place physically but point to the field which
is not known until runtime.
We can assign sections of fileds(offset, lenght can be
specified dynamically in prg.) and may extend beyond field
boundaries.
syntax: FIELD-SYMBOLS <fs>[type/structure <s> defualt <wa>].

10
We can also assing components of structure to field symbols.

68. How to transfer legacy data into base tables by scheduling


a time frame using bdc?
ANS. First we need to create a session for this process.
After creating session, we can schedule this job using tcode
SM36 or we can schedule in SM35 itself by giving schedule time.

69. how to handle the errors (duplicate records) in CALL


TRANSACTION METHOD
and HOW CAN WE SHOW THE ENDUSER ABOUT THE ERROR RECORD
ANS. Declare one structure of type BDCMSGCOLL and then create
the internal table for the same.
Then use the Call transaction using statement with the
Messages addition then call the function module
Format_message to convert the systems error messages into
the desired format so that user can understand.

70. How to debug a smartform?


ANS. STEP1-> AFTER ACTIVATE SMARTFORM YOU GET A NAME OF FUNTIONMODULE.
STEP2-> GO TO TCODE SE37.GIVE NAME OF FUNTION MODULE. AND GET FUNTION
DETAIL AND PROGRAM NAME.
STEP3-> GO TO TCODE SE38 RUN THAT PROGRAM.
STEP4-> GIVE BREAKPOINT AND DEBUG.

71. What is mean SY-SUBRC=8 in BDC(while uploading data).


ANS. the meaning of sy-subrc = 8 Means the Record is not FOUND.

72. what is template in smartform?


ANS. Template having fixed size but a table will be expandable.

73. what is ALE, Debugging, Smart Forms ,IDOC'S & BDC'S?


ANS. ALE(Application Link Enabling) is a Network.it used to communicate two or
more servers which are geographically existed.
Debugging : Detailed error analysis source code level.it is executed the
program in line by line .
Smartforms : Smartforms is a TOOL .which is used to generate Business Legal
Processing Documents .The Tcode of Smartforms is SMARTFORMS.it is advanced
version of Scripts.
IDOC's(Intermediate Document) : it is a collection of segments .segment is a
collection of fields.IDOC is used to transfer the data between two
servers.Tcode for IDOC is WE30.

73.What is the diff b/w OK_CODE n SY_UCOMM?


ANS. 1. It is not possible to clear the content of sy-ucomm since
it is a system variable but we can clear the content of
ok_code.
2. The length of sy-ucomm is fixed but the length of ok_code
is not fixed. we can take any length

74. how to change col colors in alv reporting?


ANS. Use the LVC_S_SCOL structure gives the column name in
FNAME and give the color in COLOR.

75. How to maintain subtotals n grand totals in smart forms?

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

76. In smart forms page no will be displayed as 2 of 15, 9 of 15


but while printing 10 of 15 it does not print correctly tell
me how to handle this scenario.
ANS. For this create a window name is "PAGENO",Right click on it
create text- from there u Have to specify
"&page&/&smartforms-formpage(C)&
Then it will declare in the form 1/10, 2/10......like this.

77. I am transferring 10 data records from outbound though idocs but


8 records are transferred , what about reaming records but
it did not show any error?
ANS. Just Check the Filter settings.Remove the filter for the
fields and then transfer the datarecords again.If the filter
is set it will not show any error.

78. what is the meaning of SCREEN-INPUT = '0/1', SCREEN-ACTIVE =


'0/1'. in event AT SELECTION-SCREEN OUTPUT
ANS. when screen-active component is zero then input = 0,output =
0 statically.screen field is invisible they are not ready
for input.
when active component is 1 then field is ready to accept the
input from user.

79. How will you add color in a row using ALV ?


ANS. use the follwing in SLIS
slis_t_specialcol_alv

80. why SAP script is clint dependent and smartform is clint


indepedent ?
ANS. sapscript is Clint dependent and smart form is Clint
independent bcz of smart form creates a function module
which sap script doesn't create

81. Report zabc.


Top-of-page.
Write : 'Hello'.
End-of-page.
What is the output of the program?
ANS. There is no output.Because,Top-of-page triggered when first write
statement encountered.

82. A database table contains 3


fields(Student_no,Section,Total_marks).I want retrieve top 10
students from each section.Note:(Section contains data like
A,B,C.Each section contains more than 10 students).
ANS.
REPORT zscenario.

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.

84. What is partner profile?


ANS. The tcode for creating the partner profile is WE20 . These partner
profiles are used when generating idocs i.e sending and receiving idocs.
(partner profiles are nothing but sender and receiver information ) In this
the mandatory things to remember is port number , logical system , inbound
parameters , out bound parameters.

85. how to create form without mainwindow?


ANS. We can create a smartform without a main window. In smartform we can
directly loop by right clicking on table, which gives a loop window and also
we can create a window and a table line outside the main window. In table line
we can give data in main area.

86. what is sap package ?


ANS. A Package is Type of Development object which act as a
container to store a development objects such as screens ,
menus, function , transactions

87. you have to select fourth vendor no in basic list go to open


new list ( secondary list) . what is the coding in
interactive report ?.. tell me the coding clearly plz?..
ANS. data : vvbeln type vbeln.
form usercomm using rucomm type syucomm
rselfield type slis_selfied.
case rucomm.
when '&IC1'.
if rselfield-fieldname = vbeln
vvbeln = rselfied-value.
select vbeln *** from vbap into table it_vbap where
vbeln = vvbeln.
endif.
endcase.
endform.

88. what are various ways of triggering a new page in reports ?

13
ANS. trigger the command new-page.

89. How do you set background job automatically ?


ANS. program RSBDCSUB.

90. How do you call a report from a transaction ?


ANS. Create a new z-transaction form se93 & specify the report
name. when this newly created tcode will be executed the
specified report will be triggered.

91. How do you call a transaction from a report ?


ANS. By using CALL TRANSACTION <transaction name> function module.
syntax:
Write:/ 'Click Here' Hotspot.
AT Line-Selection.
call transaction 'se11.
Press F8 And Transaction Se11 will open.

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.

ex: wa_bdcdata-program = name of the module pool program.


And BDCMSGCOLL this is the structure to keep the errors while we
are using call transaction method in bdc.
ex syntax:
call transaction 'va01' using it_bdcdata mode a/n/e update
s/a messages into it_bdcmsgcoll.

93. what are medruck, rvorder01?


ANS. These r standard script forms
MEDRUCK - Purchase orders
RVORDER01 - Order conformation

94. What is direct input method ?


ANS. In bdc, direct input method can handle exclusively large
amount of data only.It is also can process foreground and
background. It also having log file default.
difference with session method is validations can be done by
sap predefine function modules. It is faster than session
method. In case of errors direct input mechanism provides
restart mechanism for this we have to execute in the
background only this rbmvshow or tcode bmv0.

95. After running a BDC program in background, next


day morning when you see the results, few records
are not updated(error records). What will you do
then ?
ANS. In case of session method we have to download the records

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

97. Is it possible to include two transactions with one group


name in one program in session method ?
ANS. Yes, it is possible, for every new transaction we need to
use bdc_insert function module.

98. what is the Currency and Quantity field in BDC?


ANS. In BDC, for currency, quantity, date and time fields you
need to take the data into a char variable of enough length
and use WRITE TO statement to take care of user settings.

EG: WRITE l_curr TO l_char CURRENCY 'Currency code'.


CONDENSE l_char.
Pass l_char to BDC.

99. what is difference between REUSE_ALV_GRID_display and


reuse_alv_list_display?
ANS.A> In Grid display TOP-OF-PAGE event will be used and we can
display logos in REPORT. But where as in case of LIST
display it is not possible. Even edit is not possible in
LIST display but in grid display it is possible
B> By using REUSE_ALV_LIST_DISPLAY we can display only a
normal list it it not a user friendly .
but where as using REUSE_ALV_GRID_DISPLAY
we can calculate grand total ,sub totals,
and filter the fields with out using any functions.
C> moving of colum position one place to other place in
griddisplay, but not posible in listdisplay.

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.

Tables for MM: These are some of main tables in MM


For Material info: MARA, MAKT, MARC, MBEW.
For PR : EBAN , EBKN.
For PO : EKKO , EKPO.
For GRN : MKPF , MSEG.

Tables for FICO: These are some of main tables in FICO


For Financial Acc: BKPF , BSEG
For Vendor : LFA1 , LFB1 , LFBK
For Customer : KNA1 , KNB1.
101. how can u move a logo from presentation server to

15
application server ?
ANS. 1) when we upload a graphic from SE78 tcode its moved to
application server

102. The logo uploaded using rstxldmc prog . where it is


going to store ?
ANS. The report RSTXLDMC allows a TIFF graphics file to be
uploaded from the file system of the R/3 GUI to a standard
text in the R/3 word processor SAPscript

103. what r clients ? what r the client no available in a


company ? 800 client for which application ?
ANS.
Client is a there didgit number which we enter while
logging which helps in data security by preventing the data
from being visible to users in other client
1) A commercially, organizationally, and technically self-
contained unit within an SAP
system
2) Clients have own master records and set of tables
3) Client is the highest level in the SAP system hierarchy
I think 800 client is IDES server for traing purpose

***104. if i will display data by writing statement on start-of-


selection then what is need of end-of-selection in
classical reporting ?
ANS.

105. can u use at-line-selection & user-comand at atime in


same program ?
ANS. yes we can use.
In the PF STATUS we must give the tcode PICK beside
the function key F2 in freely assigned keys

106. what is the diff between parameter & range ?


ANS. Difference between Parameter & Ranges :
Ranges :it gives 2 values ie) fromvalue and tovalue.we can
use select-options also ranges.It creates 4 selection table
(sign,option,low,high).
parameters do not create selection table and it shows only
1 value.with paramters we can define checkboxes and
radiobuttons.

106. HOW DO YOU CONFIGURE ALE BETWEEN TWO DIFFERENT VERSIONS OF


SAP ?
ANS. ALE is configured like this:

First setup logical system (BD54)


Assign the logical system to respective clients (SCC4)
Define the RFC destination (SM59)
Distribute the customer model(BD64)
Create the port(WE21)
Create the Partner profile (WE20)
To check the the Idocs (WE02/05)
107. What is the difference between field string and internal

16
table?
ANS. Field String is nothing but a work area and it holds only
single record where as Internal table holds multiple records

108. What is the purpose of Edit Masking?


ANS. Edit Mask is Used for Editing Output in ABAP Editor.
for example :
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'.
Output: 15:46:33

109. How many types of organization data?


ANS. the organization data is can be categeroised by three types.
These are given below.
Master data
transaction data
organization data
master data: it can be fixed it cannot be changed during the
execution of the program.
Transaction data: rarely changed.
Organization data: daily changes the data .

110. Withou using SLIN transaction how would you check custom
programs?
ANS. SLIN: is the transaction code is used to check the program
extends

111. What are different types of windows in Smartform?


ANS. 1.main window 2.secondary window 3.copies window 4.final window

112. You have 5lakh records to transfer to sap from flat


file.which method of bdc you wiil choose and why?
ANS. 5 laksh records is not a small amount of data it is large
amount. for largee amount we use the session method

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.

114. What is the difference between field string and internal


table?
ANS. Field String is nothing but a work area and it holds only
single record where as Internal table holds multiple records

115. How would you debug custom programs at runtime?


ANS. Give /h to go to debug when executing.
This is also applicable for standard code. But system
debugging has to be switched on.

116. What is Deep structure and Flat structure?

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.

117. How to disable the function in alv tool bar?


ANS. for example .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_background_id = 'TRVPICTURE32'
i_grid_title = text1
is_layout = S_layout
it_fieldcat = T_FIELDCAT
it_events = event[]
"comment
i_save = 'A'
" this line will not all u to save the layout.
TABLES
t_outtab = I_FINAL.
IF sy-subrc <> 0.

118. My internal table exceed the limit. then it goes to dump.


how will u handle this issue?
ANS. using 'occurs 10' for u r internal table
then internal table occupy maximum length(2gb).
if the problem will happend same,u can contact u r basis
consultant.

119. What are the components in technical setting while creating


a table?
ANS. Technical setting are mandatory to maintain when you create
a table. Data class, size category and buffering things are must be
maintained in the technical settings of table.

***120. how to debug the program based on the user?


ANS.

121. how to create the new page in alv.(ex: after 50 records it


will trigger new page or based on some condition).
ANS. if the curent page line count has got finished it will
automatically move to next page.
i think u know about line-size as well as line-count.

122. what is standard , sorted and hash in abap ?


ANS. In ABAP we have two kinds of internal Tables.
1)Index Internal Tables
2)Hash Internal Tables
Again Indexed Internal tables further divided into two types
i) Standard Internal Tables
ii)Sorted Internal Tables
So Both Standard and Sorted Internal Tables Can be accessed
by Indexes. Whereas Hashed Internal Tables Can be accessed
By Only Key Fields. For Hashed Tables System automatically
maintain a Hash Algorithm to retrieve the records with one

18
time hit. For sorted Tables system automatically uses Binary
Search to retrieve the records. For Standard Tables System
Follows Linear Search.

123. what is 'at line-selection' and user command?


ANS. at line-selection validates the entire line and displays
the secondary list based on 1st list condition means where
ever u double-click on line it validates.
sy-lisel+0(field_length) = <conditin>.
at user-command validates the function keys to displys the
secondary list based on primary list conditions.
for this we are using sy-ucomm = <fcode>.

124. What is a text table?


ANS. text table is the contan of description of code contain in
multiple language

125. Difference between check table and value table?


ANS. we create value table for domain level validation and check
table for field level validatin.check table will come in the
concept of foreign key table.

***126. What is the significance of Data element and Domain?


ANS.

127. Explain the Importance of each type of window in Smart


forms?
ANS. Main window:
In a main window you display text and data,
which can cover several pages (flow text). As soon as a
main window is completely filled with text and data, the
system continues displaying the text in the main window of
the next page. It automatically triggers the page break.

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.

128. Can we create more than one main window in smartforms?


ANS. No, we cannot maintain more than one main window in
Smartforms.

129. What is the difference bewtween client dependent tables


and client independent tables?
ANS. client dependent tables : the tables which has the fields
mandt is a client dependant. these tables details cannot be
viewed in other client.
client independant: these tables will not have the mandt
field , the details of the table can be viewed by in any
client.

130. How will you validate selection screen elements?


EXAMPLE:
DATA:L_TEMP_MATNR TYPE MATNR.
SELECT MATNR FROM MARA INTO
(L_TEMP_MATNR)UP TO 1 ROW
WHERE MATNR IN S_MATNR.
ENDSELECT.

131. Is BSEG and BKPF transaparent tables?


ANS.BKPF TRANSPARENT TABLES BUT BSEG CLUSTER TABLE.

132. Purpose of the statemement TABLE in a report?


ANS. Declaration of TABLE statement in Report Program Creates a
WORKAREA for that table(s) in thr Report program.
TABLES: MSEG, MKPF.
This comes handy when you write SELECT QUERY as
select single * from mseg client specified
where mandt = sy-mandt
and mblnr = pmblnr
and mjahr = pmjahr.
So your Data against the parameters will be colected in the
workarea(MSEG).

133. How to get POPUP SCREEN in a program?


ANS. 1.If you want to get a popup in normal report program, call
function module POPUP_TO_CONFIRM.
2.If you want to get a popup in ALV program, then call
function 'REUSE_ALV_POPUP_TO_SELECT'.
If you want to display alv in POP UP window then use
parameters I_SCREEN_START_COLUMN , I_SCREEN_START_LINE ,
I_SCREEN_END_COLUMN , I_SCREEN_END_LINE .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'


EXPORTING
I_CALLBACK_PROGRAM = V_REPID
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = T_FCAT
* IT_EVENTS = T_EVENT

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.

134. How to add Text Modules in SMARTFORMS?


ANS. Tcode : smartforms > select 3rd radio button i.e.
Text Module > create < write there what ever want.>
How to call:
smartforms > create text > general attribute > Type : Text
module , give name and language.

135. We give KEEP in BDC structure...what is its purpose?


ANS. It is Indicator to keep processed sessions. i.e. If this
flag is set, then session is kept after processing also.
Otherwise, session will be deleted after processing.

136. What are the compulsary values in RESUSE_LIST_DISPLAY


and RESUSE_LIST_GRID?
ANS. Compulsory values in ALV_LIST_DISPLAY are:-

(a) I_callback_program : report_id.


(b) I_callback_pf_status_set :
(c) I_callback_user_command:
(d) It_fieldcat.
Compulsory values in ALV_Grid_DISPLAY are:-
(a) I_callback_program : report_id.
(b) I_callback_pf_status_set : routine for pf status
(c) I_callback_user_command: routine for user command
(d) it_fieldcat
(e) Is_layout

137. Want to stop the BDC session in progress.How?


ANS.A>DELETE TRANSACTION(/BDEL)
B>NEXT TRANSACTION(/N)
C>PROCESS /FOREGROUND(/BDA)
D>DISPLAY ERRORS ONLY(/BDE)
E>CANCEL(/BEND).

138. What happens if there is no CLOSE_GROUP in a BDC.


ANS.THE SESSION WILL NOT EXECUTE BY DOESNOT GIVE ANY
SYNTACTICAL ERROR.

139. What is the difference between TYPE and DATA?


ANS. TYPE: is used to define new data types and will not occupy
any memory space.

DATA: is used to define the variables representing the

21
exisitng data types. and will hold the memory space.

140. What is the difference between TYPE and LIKE ?


ANS. TYPE: represents the data types.
LIKE: represents the data objects
type wont take any memory
like -allocate memory

141. how to code in SMARTFORMS for MULTIPLE RECORDS?


ANS. But u know nobody can give answer to it and everybody will
say "WE CAN USE LOOP FOR FUNCTION MODULE GENERATED BY
SMARTFORM".... I think nobody cannot send code for this...

142. what is the diff b/w error and exceptions?


ANS. "Syntax Errors":

The mistakes done while writing statements. For


example, instead of "WRITE", if you type "WIRTE" it is a
syntax error.Compiler can detect these types of errors. You
will not able to be run the program till these errors are
rectified.

"Runtime Errors (Exceptions)":


Runtime Errors are thrown when the situation occurs
during execution of program where the system will not
know how to deal with such situation. For example, you have
written a program that takes an excel file and reads the
data and stores in the database. You have done the program
perfectly. No syntax errors.But while executing the
program, if the user enters a filename that does not exist,
the program will not know what to do next, at that time
runtime error occurs.

143. I have 10 records in flat file. In that 7th record is


error record. I want to update to data base. If i used Call
transaction method what about 7 record and what about
8,9,10 records. If i used Session method what happen. Is it
updated or stop at 7th record?
ANS. In call Transaction method it depends upon the synchronous
and asynchrounous update in synchrounous it will stop at 7
th record and 7,8,9 record is not updated and BDCMSGCOLL
gives error msg the 7th record. in asynchronous all the
records are updated except 7 record In sesion method
database table is not updated and it will go to sesion log
file . and can analise or correct the error foud in the
data file or program.
if find the error in data file u can correct them
interactevely . other wise u modified the batch input
program.

144. in which table idocs are stored?


ANS. EDIDC ---Control record IDoc
EDIDS ---Status Record IDoc
EDIDD ---Data records

145. which of the following are used to define data in abap

22
1)parameters 2)tables 3)class 4)data
ANS. we use all the four for defing data in abap

146. what is pf status interactive report?


ANS. SET PF-STATUS :
This statement is used to set your own GUI status to the
report or the program that you develop and PF status is
developed in the transaction code SE41

147. .wat is difference b/w dilldown and interactive report?


ANS. When a basic condensed list is processed further into a
secondary list and then succesive secondary lists, it is a
drill down report. When the basic list or one of the
secondary list is processed further to a transaction code,
it is an interactive report.

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.

149. what is Catch Command?


ANS. Syntax
CATCH cx_class1 cx_class2 ... [INTO oref].
Effect
Introduction of a statement block of a TRY control
structure in which exceptions can be handled.
Syntax
TRY. [try_block]
[CATCH cx_class1 cx_class2 ... [INTO oref].
[catch_block]]
...
[CLEANUP [INTO oref].
[cleanup_block]]
ENDTRY.
Effect
The statement TRY introduces a control structure with
several statement blocks. The first statement block
try_block is always run, whereas a branching off to exactly
one of the remaining statement blocks only occurs if a
class-based exception occurs in the try_block.

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.

152. explain the scenario of ALE/IDOC.


ANS. ALE: is nothing but application link enabling is used to
connect with the non sap systems to the sap systems. and
also the used to connect with the legacy systems with the
sap systems. just its a link between the two process.
IDOC; is nothing but intermediate document. IT is the
container of the message. idoc can be transferred between
the two process to send the data or container of the
message. Every idoc have three types of records.
these three types are records are given below.

----> data record


----> control record
----> status record
data record: is contains administration data header data
and item data.
control record: is contains of sender information reciever
information , message type, idoc type , idoc number.
status record: is contains of all the status of idocs.
process steps:

-->define the logical systems


-->assign the logical systems to the respective clients
-->define the RFC destination
-->create the customer distribution model
-->create the patner profile
-->creat the port
-->create the message type
-->assign the message type into the idoc type
--> to check the status of idocs.

153. if i want to insert 10 laks MM records and for inserting one


record it takes 1 min by using call transaction or session
method . so here is there any alternative
ANS. Break the records into 100/1000 sessions and process ur
session it ll take same time as it takes for single
sessions.

154. how to see the last updated record in a table?


ANS. Generaly in SAP we have the update date , update time and
updated by user field , we can find by using these field.
if you dont have the above stated fields then you need to
use native sql using row id to select the last row id.
OTHER WISE WE HAVE TWO TABLE WHERE WE CAN SEE THE UPDATION OF TABLE.
1. CDHDR 2. CDPOS

155. wat is a source list?

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

ME01 Maintain Source List


ME03 Display Source List
ME04 Changes to Source List
ME05 Generate Source List
ME06 Analyze Source List
ME07 Reorganize Source List
ME08 Send Source List
ME0M Source List for Material

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

157. without debugging key how can i debug function module?


ANS. /h can be used to debugg. AND You can use break or break-point statements
in your function module.

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

160. A function group contains globally defined internal tables

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

162. Internal table itab contains some records.


If the code is like this : LOOP AT ITAB.
APPEND ITAB.
ENDLOOP.
What ill be the result??
ANS. It will go to infinite loop

163. what is difference between include structure and append


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

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.

2. At new is controlbreak statment on at new the left side


field change, the event
trigers and the values become 0 and *

165. when we are entering a purchase order it goes to which


table?
ANS. all header details go to EKKO
and all line item details go to EKPO
others are EKBE ,EKET

166. what is use of material master c segment(marc) table?


ANS. MARC - it contains material plant data

168. whats the difference between range & select-option?


ANS. mainly Select-options is used for selection screen..
where as ranges is used inside the program..
Ranges cannot visible in selection screen
Functionality wise there is no difference except SELECT-
OPTIONS are visible in the selection screen while Ranges
are not visible.
Both have same structure.
One restriction in Ranges is u can't use Range in Select
query if it has more than 2000 entries.
Ranges are used just like we use temporary internal tables.

169. what is the importance of macros? is it that it is useful

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.

170. what is itcsy structure? what is the importance of it? give


me the detailed information of it ?
ANS. ITCSY is a sturcture. It is used to pass data from the form
to subroutine without modifying the print program.
perform <formname) using itcsy
changing itcsy.

endperform.

171. In interactive reporting, suppose i go to N'th list from


basic list(primary data) & i wanna come back directly to
basic list. So how can i achieve this without using ESC or
back button?? Is it possible using set screen 0??
ANS. using sy-lsind we can move from one list another list as
sequence only not posibble come back from nth list to basic
list.
using at-user command event only possible.

172. In report, we should have to write events in sequential


order or not, if we write events insequential then what will
be the drawback and if we will sequential what will be the
advantage.
2.what is the function of end-of-selection event? if we
would not write this event in report what will happen?
3.top-of-page event will trigger before the
initialization, and at selection-screen event or after these
two event.
ANS. Not Necessary for the events to be in a sequential order.
During run time, the events will be triggered automatically
in the sequence.
But it is suggested to write the events in a sequence for
the user to easily understand the flow of program and for
the efficiency purpose.
END-OF-SELECTION: Will be normally used to free the memory
and display the write statements once all the fetching is
done. But it is not mandatory or necessary to write
END-OF-SELECTION. If any event is missing in the sequence,
the next event will be triggered automatically.
INITIALIZATION initializes the filed values in the
selection screen. This is done before at-selection screen,
before PBO.
TOP-OF-PAGE: This is used to display the required text on
the top of the page as header. This event will come AFTER
INITIALIZATION event only !!

173. How to implement a program (batch input) which reads a

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.

1. Analying the data from the local file or flat file.


2. Analying the transaction.
3. Declaring the internal table (BDCDATA)

program: Name of the module pool program name


dynpro: it indicate for screen no
dynbegin: it indicates for new screen no
fname: Name of the fields in the database table
fval: values area assinged with the fields
4.Transfeering the data from local file to internal table.
5. Populating the internal table . (BDCDATA)
Then call either Transaction or session method to pass the
data into the SAP Database table.

174. Between select .........endselect write one statement


executes the cursor goes to dump analysis?what is the
statement ?
ANS. Statements like CALL SCREEN , CALL DIALOG , CALL
TRANSACTION or MESSAGE are not allowed within a SELECT ...
ENDSELECT loop.

175. What will happen if we write “WRITE” statement in the


TOP_OF_PAGE? Can we write?
ANS. THIS EVENT WILL TRIGGERED ONLY WHEN GENERATING THE BASIC
LIST. THIS IS ONLY EXECUTED BEFORE OUTPUTTING THE FIRST LINE
USING ANY OUTPUT STATEMETN LIKE WRITE , ULINE, SKIP ON A
NEWPAGE.

176. Would WS_UPLOAD function module work if the BDC is run in


Background? If yes explain, If no explain
ANS. WS_UPLOAD will not work in case of background
As background jobs run in application server and WS_UPLOAD
is the FM which require input from the Prsentation server,
so it will not get the file at run time and will give error.

177. What is a view?


ANS. It is a logical collection of fields from different tables.

178. How do u know that updation is successful in BDC?


ANS. using bdcmsgcol we can find out it is success or not
After run the BDC PROGRAM (CREATING BATCH SEESION).
USING SM35 YOU CAN PROCEED BATCH SESSION, IF UPDATION IS
SUCCESSFULLY DONE THEN STATUS SHOWING GREEN TICK. IF ANY
ERROR OVER THERE THEN ITS SHOWING RED TICK

***179. How do u handle a button in ALV report. Like in which event?

180.I have 2 fields like customer and name having 20 records

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.

Then using At User Command, u can randomly select the


records and display in the secondary list.
AT A TIME U CANT SELECT FIVE RECORDS.

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

182. What are reference fields in data dictionary ? how do u


assign them to a table field?
ANS. For Currency And Quantity fields Reference Table is required.
In the Currency/Quantity fields You need to specify the
reference table name.
For CURR field.. there must be a corresponding CUKY field
For QUAN field there must be a corresponding UNIT field.
Can be in the same table or we can give reference of any
other table.
183. What is an index ? Types of index and there uses ?
ANS. There are two types of indexes:
1.Primary Index
2.Secondary Index.
While creating a table or in an existing standard table the
key fields are the default primary indexes.
If we require to fetch records from non key fields we need
to provide Secondary Indexes.i.e., we need to explicitly
make non key fields as indexes.
This can be done by clicking on Index and adding the fields
for secondary index.

184. What is the difference between view and table ?


ANS. View is a virtual table. Like table it contains fields but
it does not contain any data.In run time it contains the
data and after that it gets free.But table stores the datas
in database occupy some space.

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

186. In data element how many domains were defined?


ANS. For one data element you have to have atmost one Domain.

187. Types of internal table? how do u decide which type u have


to use?
ANS. there are 3 types of internal tables
1.standard- index,keys type.
2.sorted -keys,index type.
3.hashed -key type.
to decide the usage of internal table u need the
modifications requirements of the table.

188. what is selection text in ABAP?


ANS. At the selection screen we would assign a text to the
selection screen parameter for display. This is actually
called as selection text in abap.

189. what is backend and frontend in case of sap abap?


whom we are supposed to call as backenduser and frontend user.
ANS. Frontend in SAP ABAP is nothing but the presentation layer.
Backend is nothing but the Database layer.

190. can any post me all steps in MM ,SD?


ANS. SD FLOW
1) INQUIRY 2) QUOTATION 3) SALES ORDER 4) DELIVERY 5) BILLING 6) INVOICE
MM FLOW
1) purchase requisition 2) request for quotation 3) purchase order
4) goods issue 5) goods receipt 6) invoice verification

191. Which client is called as golden cient? IS it 100, if yes why?


ANS. Golden client contains all the configuration data and master
data so some extent. All the configuration settings are done
in golden clients and then moved to other clients. Hence
this client acts as a master record for all transaction
settings, hence the name "Golden Client". It's client is 000.

192. How to create the ur own barcodes?


ANS Using 'SMARTSTYLE' CREATE character format with ur barcode
font,In smartform create window Assign the style into the chracter format
where u want to display the barcode for that window.

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.

194. how do put the data in the application server in BDC?


ANS. To transfer the data from database server to application
server using TRANSFER <WA> TO <OPENDATASET>
195. how many type of index are there?

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.

196. WHAT IS DOCUMENTATION?WHY IT IS USED?


ANS. check it out SE39
IT SHOWS CLEARCUT IDEA HOW U DEVELOPED AN OBJECT SO THAT
ANY ONE CAN EASILY UNDERSTAND , IN FUTURE IT WILL BE USEFUL
FOR OTHER CONSULTANT WHO TAKE UR PROJECT,ANALYSES EASILY
AND HELPFUL DURING UPGRADATION OR DURING MAKING ANY
ENHANCEMENT.

***197.when does the secondary index should be used what role it


play when we use secondary index in tables?
ANS

197. what are the Events in Application Server?


ANS. events are 1 - OPEN DATA SET
2 - READ DATA SET
3 - CLOSE DATA SET..

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

201. Difference between interactive and ALV Reports?


ANS. Interactive or drill-down reports are for navigation
purposes to get the most information to a deeper level on a
particular field or for a record from the basic list to the
secondary lists or vice-versa . Whereas ALV is a sap

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.

203. what will be the size of transparant table?


ANS. It is depends upon the data class and size category. It can
be maximum of the size of tablespace(data class) assigned
to a table.
Tablespace is a container of tables in database.
Tablespace can be a auto extend ON or OFF depends upon
configuration.

**204. i had to write the code in such a way that duplicate


entries should not entered in sap data base.
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.

**206. what is the differnce between normal funcational and ALV


funcational module?
ANS.

207.what is naming conventions given for lock object and how


you create the lock object?
ANS. Go to SE11
2. Give the lock object name EZDUSH(lock object name start
with EZ) and click 'Create' Button.
3. Enter the short description,Table name<XXXX>, lock mode
and key fields which is used to lock the entry.
4. Save and activate, it will generate 2 FM.
Ex: DEQUEUE_EZDUSH Release lock on object EZDUSH
ENQUEUE_EZDUSH Request lock for object EZDUSH
In your program,
1. First loop the table. 2. call the FM 'ENQUEUE_EZDUSH' to lock.
3. Update the dB.4. Release the lock using DEQUEUE_EZDUSH.
endloop.

DEQUEUE_ALL this FM will release all the lock.

208. Where does the Hide data stored?

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

210. how we output smartform in pdf format???


anyone give me steps on that.
ANS. data: i_otf LIKE itcoo OCCURS 100 WITH HEADER LINE,
i_pdf LIKE tline OCCURS 100 WITH HEADER LINE.

data: op_option type SSFCTRLOP,


job_output type SSFCRESCL.

op_option-getotf = 'X'.

CALL FUNCTION '/1BCDWB/SF00000005'


EXPORTING
JOB_OUTPUT_INFO = job_output
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

CALL FUNCTION 'CONVERT_OTF'


EXPORTING
FORMAT = 'PDF'
TABLES
otf = job_output-otfdata
lines = i_pdf
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF

CALL FUNCTION 'GUI_DOWNLOAD'


EXPORTING
BIN_FILESIZE =
filename = 'c:\test_pdf_sf.pdf'
FILETYPE = 'BIN'
tables
data_tab = i_pdf.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

211. why we call smartform as a client independent?


(as we are able to retrive data from any client dependent
d/b table in smartforms. )
ANS. when we execute a smartform a function module is being
created.we call this fm in our program using another function
module SSF_FUNCTION_MODULE_NAME.As fmodules are client
independent smartforms are also client independent..
212. how to keep pushbuttons in application toolbar in alv?

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

213. if there is no top-of-page event in reports then what


happens?
ANS. Top-of-page event is not triggered,heading is not printed.
Genarally if Top-of-page is used,Heading of the report is
printed in every page. If Top-of-page is not used heading
of the report is not printed.

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

216. what is ment by buffering?


ANS. Buffering is temporary storage of data in application
server. If ur using buffering, the data retriveing is very
fast. Buffering is selected during the creation of table
only. full Buffering, Buffering but switched off, no buffering.
these r the types.

217. what is the functionality of data class?


ANS. Data class tells how the table is automatically going to be
assigned to the correct area of table space or Data base
space of the database when it is created.
Each data class corresponds to a physical area in which all
the tables assigned to this data class are stored.

Following are the data classes:

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.

APPL1 (transaction data): Data that is frequently changed.


An example of transaction data is the goods in a warehouse,
which change after each purchase order.

APPL2 (organizational data): Customizing data that is


defined when the system is installed and seldomly changed.
An example is the table with country codes.

218. how to use binary search in internal table?what is the use


of indexes and secondary indexes?
ANS. In binary search, the total records are divided in to two
parts. It will search the particular record in first half
and then in second half. Binary means, dividing in two
parts.
Indexs are used to get the data very fast.
Indexs are 2 types, primary and secondary.
Primary indexes are crated during the creation of table. By
defaultly primary indexes are created. But secondary
indexes are created by used according to user need.

219. functional spec given by whom?


ANS. Functional people will create the functional spec according
to client requirement. Then they will pass the functional
spec to Technical people.Technical people will create the
Tech. spec and forward to developer.Developer will dev the
object

220. in report gui we are giving customer number if it is wrong


entry then how to write the code to restrict wrong entry?
ANS. parameter : pa_kunnr type kunnr. (This is input field)

select single kunnr into pa_kunnr


from kna1
where kunnr eq pa_kunr.
if sy-subrc ne o.
message i000(zexp). ( zexp is message class,
i message type
000 message number)
endif.

221. what are selection screens which one triggers first?


ANS. AT SELECTION-SCREEN OUTPUT

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.

223. what is the difference between at selection-screen output


and at selection screen?
ANS. at selection screen is used for validating fields,
At selection screen out put is used for setting field
property like enable , disable, input etc

224. what is use of STOP stsment?


ANS. When the stop statement is executed , the runtime
environment triggers the event END-OF-SELECTION.

225. HOW TO CREATE INDEXES IN TABLES?


ANS. Go to transaction SE11, open your database table. Choose
the menu, Goto->Indexes to create index. Give your index
name and choose the fields of the table. Be careful, an
additional index may vanish with the next upgrade or
hotpackage.

226. In real time how we get the tickets?


whether it is through email or any thing else.
ANS. In Real Time tickets will issued through a Ticketing
Tool ...It depends upon the company which tool they
use .....The Client will send the ticket through that tool and
Attachment documents for clearity of the ticket and provide
Priority whehter it is high, Medium , low...
This is how tickets will be handled and received..
227.what are the main events that are used in an ALV report?

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

228.what is the role of extended syntax check in


performance tuning?
ANS. Extended syntax check identifies unused variables, obsolete
statments etc. which is important for performance tuning.

229. in a loop of an internal table, what is the use of at first &


at last statements?
ANS. These come under Control Break Statements :
At FIRST :
This is used for system Field Heading in ABAP program
At NEW : This is used to display the fields.
Ex At New Carrid.

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.

230. what is the difference between at first & at new


Statements?
ANS. At First - Get triggered for the first loop iteration. Can
be used for printing report headers.
At new - This event gets triggered when a new value is
assigned to the field loop. This event is normally used for
Group headers.
Example:

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.

232. what is the use of start-of-selection event?


what is the difference betn end-of-page and end-of-selection?
ANS. Start-of-Selection-This event gets triggered when the user
clicks on execute button on Selection screen. All the Data
retrieval and data processing logic will be written in this
event.

End-of-page- This event is used to print page footers for a


report

End-of-selection- Any processing required before exiting the


report is done in End-of-Selection.

232. what is the use of SLIS type pool in alv reports?

38
ANS. SLIS is a type pool defined in the ABAP dictionary.
This contains some structures and table types used for ALVs

233. Difference bet'n simple and interactive reports?


ANS. in simple reports we directly interact with report in which
all data is present.in case of interactive reports we interact with specific
data.this is the main difference.

234. what is the role of ST05 in performance tuning?


ANS. To calculate the performance of programm.
We can see in which particular area the programm is taking
the time that is database level are internal processing
(programm ).

235. What is performance tuning?


ANS. performance tuning.......

Avoid the following things in ur abap code

1. Avoid using nested select statemtns


2. Avoid using global varaibales
3. Avoid using move-corresponding
4. Avoid using '*' in ur select query
5. use key fields in where calues
6. Avoid using query llooop

ST05 is Tcode for performance tuning.

236. You are given functional specs for a BDC program


and you need to decide whether to write a method
call transaction or a session. How u will decide?
ANS. That is decided to depend on the client requirement.
if it is a large data then u will use to session method
if it is small data the u will used to call transaction

237. You are running a report. It is taking long time for


execution. What steps will you do to reduce the execution time.
ANS. check programs performance by using tcode se30

238. what is difference between MOVE and MOVE-CORRESPONDING?


ANS. move-corresponding is the one used to move internal body
work area to screen fields.
move-corresponding itab to lfa1.
where as move statement is used to move field by field from
internal body to screen fields.
move : itab-lifnr = lfa1-lifnr.

239. what is difference between commit and rollback.?


ANS. suppose u have one table which is in database. The table
contains some records. U want to modify one record of table.
after modification, u don't want that new values for
the record. just u use rollback command. previous values are
placed in database.

Example:

39
Case 1: Roll Back
sno name palce
1 abc hyderabad
2 xyz bangalore.

This is the table and it contains some records.


Suppose if u want change the 2nd record, means palce
is changed to chennai.

After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.

Suppose if u want old values, means u don't want new


values. At that time u use roll back command

After useing rollback:


sno name palce
1 abc hyderabad
2 xyz bangalore.
after using roll back, the records are comes like
above(original records)

Case 2: Commit
sno name palce
1 abc hyderabad
2 xyz bangalore.

This is the table and it contains some records.


Suppose if u want change the 2nd record, means palce
is changed to chennai.

After modification:
sno name palce
1 abc hyderabad
2 xyz Chennai.

After useing commit:


sno name palce
1 abc hyderabad
2 xyz Chennai.
after using commit, the table is finilased.u can't get
old values by uisng roll back.

Once if u use commit,u can't get old values for using of


rollback. Before commit, u can get old values for rollback.

240. Why we need IDocs...?


What is the purpose of IDocs...?
ANS. IDoc's are ment for transfering data from one SAP/Non SAP
system to SAP/Non SAP System. IDoc stands for Intermidate
Documents. Eg. Receiving orders from Vendor and passing
them the invoice can be done using IDoc.Even using web services we can send or
recived data to and from SAP using IDoc.
Hope i answered your question, if you need more info do let me know.
***241. Pls tell me, we r using at line-selection,at user-command

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.

242. can any one tell me if i will put mode as error(E) in


session or call transaction for at background and if any
error data is there in flat file , then what will be
happen ,
ANS. U can set the Mode as E in call transaction only.But in
Session method u can verify the logs only. Actually E means
Errors in screen mode only. If any errors will come,
automatically it comes to screen mode from back ground.So u
can identify the errors.

243. What type of reports (ALV, Interactive, Classic) we can


generate in SAP ABAP?
ANS.REPORTS BASICALY TWO TYPES CLASSICAL AND INTERACTIVE
BUT ALV IS NOT A TYPE REPORT THIS IS REPORT OUTPUT TYPE.
IT ALSO TWO TYPES CLASSICAL ALV AND INTERACTIVE ALV.

244. Explain about No intervals, no extension in select options.


ANS. In the select options it show the ranging values.
If we define no interval, no extension it will act as a
parameter.
Please check this code.
TABLES: vbak.
SELECT-OPTIONS : s_vbeln FOR vbak-vbeln NO-EXTENSION NO
INTERVALS. by using no extension we give range of values but we cant see
extension tab right side on selection screen.

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.

247. How to transfer data which is coming from are report as


output to another report?
ANS. PERFORM FORMA IN PROGRAM ('ZABC') TABLES ITAB.
IN PROGRAM ZABC IMPLEMENT FORMA
FORM FORMA TABLES ITAB.
ENDFORM.
BY THIS WAY U CAN GET DATA OF INTERNAL TABLE FROM ONE
PROGRAM TO ANOTHER REPORT

248. In start of selection, if we perform validation, what


happens ?
ANS. Nothing happend, because start-of-selection triggers after
displaying the selection screen.
249. Will 50,000 records be uploaded directly into APP’S?

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.

loop at it_tab into wa_tab.

write : / wa_tab-matnr,
wa_tab-werks.
endloop.

251. difference between the workarea and headerline?


ANS. Workarea and headerline both are contain single record
structure.normally we have two types of internal tables.
1. with headerline
2. with out headerline
in with headerline internal table it self first row
contains workarea. In case of without headerline internal
table it will contain work area and body.

252. defination of workarea? and header line?


ANS Workarea: Workarea as the same structure as table...and
contains only one record(last) record...no internal table
declaration: begin of wa,
headerline: in this v have internal table with headerline
means that internal table will have workarea..and data is
pulled from that internal table body...

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.

254. Can u give me one example where we should use only


CALL TRANSACTION method in BDC?
ANS. we have to use process the only one application at time and

42
update the database is asynchronously and synchronously.then
we have to use call transaction in BDC

**255. We execute the BDC program in foreground and got list in C


drive. If the same program we can execute in back ground
what happen?
ANS.

256. Can we write inner join between transparent table and


cluster table? If both having common fields?
ANS. We can only use inner join in Transparent table not in pool
or Cluster Table.

257. When using call transaction method for 1000 records , If u


found error in 64th record then how can u find it and how
can u send this to user?
ANS. Using BDCMSGCOLL structure you can capture the error
records.

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.

259. How to do sorting in classical report?


ANS.BY THE SORT STATEMENT WE CAN SORT THE INTERNALTABLE IN CLASSICAL REPORT
EXAPLE: SORT IT_MARA BY MATNR.

260. How to call transaction( Any transaction ex:xk03)from ALV


Report. Where should I write code?
ANS. DATA: c_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_USER_COMMAND = c_user_command.

FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM


I_SELFIELD TYPE SLIS_SELFIELD.
DATA: F_SUBRC LIKE SY-SUBRC,
s_arseg like tab_arseg.
READ TABLE tab_arseg INDEX i_selfield-tabindex INTO s_arseg.CASE F_UCOMM.
WHEN '&IC1'.
CASE i_SELFIELD-SEL_TAB_FIELD.
WHEN 'TAB_ARSEG-BELNR'.
CHECK NOT S_ARSEG-BELNR IS INITIAL.
SET PARAMETER ID 'RBN' FIELD S_ARSEG-BELNR.

43
SET PARAMETER ID 'GJR' FIELD S_ARSEG-GJAHR.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.

261. How to display footer in every page in ALV report?


ANS. In my opinion, You can display the footer, by using the
event - end of page event.
by using top of page event, u can give the heading or comment.

262. How to do sub totals in classical reports?


ANS. hi use control break events to calculate totals (at
first,at new f,at end of f,at last)

263. What is the exact use of Reuse_alv_field_catlog_merge?


ANS. This FM is used to populate a field catalog which is
essential to display the data in alv.
EXAMPLE:A)row_pos (row position)B>col_pos (column position) value set: 0, 1 – 60
C>fieldname (field name) value set: internal output table field name (required parameter)
D>Tabname (internal output table) value set: SPACE, internal output table name
E>ref_fieldname (reference field name) Value set: SPACE, Data Dictionary field name
F>ref_tabname (reference table/structure field name) value set: SPACE, name of a Data Dictionary
structure or tablE
G>outputlen (column width) value set: 0 (initial), n
H> key (key column) value set: SPACE, 'X' 'X' = kex field (key field output in color)
I>no_out (field in field list) value set: SPACE, 'X' 'X' = field is not displayed in the current list.
J>emphasize (highlight columns in color) value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
'X' = column is colored with the default column highlight color. Cxyz' = column is colored with a coded
color:
C: Color (coding must begin with C) x: color number y: bold z: inverse
K>hotspot (column as hotspot) value set: SPACE, 'X' 'X' = column cells are output as hotspots
L>do_sum (sum over column) value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output
table field
M>Just (justification) value set: SPACE, 'R', 'L', 'C'.

**264. What is updated Function Module?


ANS. CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A...
a = 2.
CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A...
a = 3.
COMMIT WORK.
Here, the function module UPD_FM is performed twice in the update task: the first time, with value 1 in PAR, the second
time with value 2 in PAR.

265. what is partner profiles?


ANS. Patner profile is nothing but which patner u will have to
asigned that is either outbound partner or inbound partner.
The transaction code is for partner profile WE20.
In this partner profile u will define the these parameters.
Sender receiver message type
these above define of both inbound as well as outbound partners.

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

269. how to write a Classical batch input program using


transaction FK01 to create vendor/change the vendor address
into R/3 system. (Call Transaction Method)
plz mention the detail coding
ANS. FK01 is for create vendor t-code.
FK02 is for change vendor t-code.
the steps as follows:
1.Recording through SHDB
2.Transfer the recording into Program zxyz...
3.Define BDC structure and internal table
4.Decomment the BDC open grp , BDC insert and BDC close
group functions in appropriate steps.
5.Fetch the data from LFA1 or ADRC table into internal table
and assign the internal table fields to BDC structure
inside the loop.

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.

u write it for selection criteria.


then u write the event
at selection-screen on radiobutton group.
u write query for each one here.
when u select first one, first query is executed, then
second executed for second etc.

272. How to Create an Interactive List based on the selection


criteria specified for the customer number for displaying
the customer information on the basic list, their
corresponding order details on the secondary list.
Plz specify the coding details.
ANS.in selection criteria u use select-options statement
eg: select-options <field> for <table-field>
here <field> is name of field and
<table-field> is name of table filed( ur field customer no)

u write a query for basic list in start-of-selection block.


and u must write hide statement after first sql query only.

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.

273. What is the role of an abapper in developement process?


What is the process of technical specification and how it is
carried out?
ANS. Abaper main role is to develop the objects according to
Technical Spec.

Functional people develop the Functional Spec according to


the client requirement. they will send to technical people.
Tech lead is changed the Functional spec to Technical spec
and forward to Abapers. Abapers will develop the objects by
using spec

274. If i work in an implementation project will i have to


register with SAP?What is the process of blue printing?What
is the role of an abapper in implementatin project?
ANS. This is correct one
u don't want to register with sap, just u can work only that
project. everything do company.register with sap is company's
work. that is not developer.
blue print meals, suppose one company wants to start sap,
ie. newly development. at that time technical managers
prepare some blue prints, means how many developers need to
develop project (for abap,sd,mm etc)
that blue print contains the what are the aims and goals of
company. in implementation project abapers will do develop
thereports,scripts,bdcs etc according to there requirement.

275. what is need of function group for function modules whereas


there is no need of f.group for subroutines?
ANS.
1)Need of function modules is to avoid the lengthy and
faster accessing data,how means,suppose for example: i want
the previous month first day and last day based on Today
date(means day Sunday or Monday or etc)Actually today date
is 19Apr2008,Saturday. I want previous month first day and
last day, ie first day is 1Mar 2008 it is Sunday or Monday
or Tuesday etc and like last date 31Mar 2008 is Monday or
Tuesday etc. Generally you need to write lengthy coding , so
to avoid lengthy coding just u use date function module in
coding and pass the parameters, it will give the out put to
u(just few lines of coding)
2)Function groups means, some related function modules are
grouped in to one function group.
For Example: For date lot of different date function modules
are available in SAP R/3, so these function modules are
grouped in to one Function group.
3)Subroutines are used in only with in the program.
Frequently used part of program is keep in to subroutines.
Globally not available. But where as Function modules are
available in central library of R/3 and global access.

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

277. what is the use of OK_CODE in BDC?


ANS. BDC_OKC0DE will store all the ok codes in the BDC program,
when you pass the Fields to a scrren after filling the
fields we need to click any button to move other screens,
so here the Button will be have a OK_CODE internally to
know this we do the recording of the Program, after that we
will store this OK code in the BDC_OKCODE field to trigger
the next operation.

278. which command is used to flushes the database buffer?


ANS. $tab is command which flushes database buffer.

279. how to change the package of an object?i.e a report stored


in ymadhuri package.now it should be changed to ysaru?
ANS GOto SE38-->Goto-> Object dictionary entry->
Click on change button->Remove previouis package name.
Enter your new package name.Click on save.
If you want a new request you can create.

280. what is cardinality?how it works in ABAP?


ANS. The cardinality (n:m) describes the foreign key
relationship with regard to the number of possible
dependent records (records of the foreign key table) or
referenced records (records of the check
table).
The left side (n) of the cardinality is defined as follows:
n=1: There is exactly one record assigned to the check
table for each record of the
foreign key table.
n=C: The foreign key table may contain records which do
not correspond to any record of
the check table because the foreign key field is empty.
This can occur for example if the
field of the foreign key table is optional, in which case
it does not have to be filled.
The right side (m) of the cardinality is defined as follows:
m=1: There is exactly one dependent record for each
record of the check table.
m=C: There is at most one dependent record for each
record of the check table.
m=N: There is at least one dependent record for each
record of the check table.
m=CN: There may be any number of dependent records for
each record of the check table.

281. can labels generate in smartforms?if yes how?


ANS. in ecc 5.0 there is one smartforms lable printing example .
go to smartforms - search by *label* ,you will get it .

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

284. What is the difference between normal report program and


module pool program?
ANS. Reports are created from abap editor
Report is evaluate data from database,and displayed in list.
Report are standalone programs.
Reports are controlled be events.
Module pool is nothing but transaction, created from object
browser.
Transaction is the sequence of screens. In module pool at
least one screen is participated.
Module pool is not standalone programs.
PBO,PAI and screen flow are important events

285. How many sessions will be opened using bdc_open_group?


ANS. Only One

286. What do you do when the system crashes in the middle of


batch session?
ANS. if system crashes in the middle of batch session.we check
the log.howmany records are successfuly updated and delete
those records from source file.and re run the session.

288. What are the problems in processing batch input session?


ANS. sessions can not run fast and not in parallel

289. How to generate and processing the session in the same


program?
ANS. Write BDC Program then call "RSBDCSUB" using "Submit" Command

290. What table stores online messages?


ANS. T100

291. What is the Difference between Header and Item in ABAP?


VBAK-Sales Order Header,VBAP-Sales Order Item, how can u use
these tables in one query,means by using these tables write
a select query.
ANS. Header is always standard and Item is variable.
Ex: If one visits the Doctor, the prescrition would contain
standard text i.e Doctor name, Qualification, address etc.
This info can be considered as Header and the Drugs that
are prescribed for the patient, which varies from person to
person can be considered as Item.

292. could u plz provide me the details of blue printing?


Role of an abapper in implementation project?
Details steps of implementation?
ANS. Implementaion Phases
1) Project Preparation.2) Business BluePrint. 3) Realization. (ABAPers)
4) Final Preparation 5) GoLive and Support.

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

294. how to run bdc program in background?


ANS. by using RSBDCSUB we can do this

295. how to send the idoc to multiple sub systems?


ANS Before send IDOc to multiple system you haveto configure
logical system(SALE), Maintain RFC destination(SM59),
Create Port(WE21) in all recevied systems..
Next step In sender sytem maintain message type in
Distribution Model(BD64) and maintain outbound partener
profile(we20) in sender system..
In receiver reciver system just maintain inbound partner
profile(we20)..
The above steps repeat for all receivers and finally send
IDOC.

296. there is size categery(0,1,2,3)if i need more space after


giving the size 0.what i have to do now?
ANS. The size category is used to define initial space require
in database. If due to overload of data more size is
require then it will automatically increase in the ratio of
size category.
For example category 0 can contains 0 to 630 records.
When 631 item will be inserted into table automatically
space for next 630 records(as category is 0) will be
provided in database.
Appreciate it helps;

297. types of buffering techniqes.


1.bufering not allowed
2.buffering swithed on
3.buffering not allowed but switced on
what does it means?
ANS. Hi First of all please correct 3rd option:
It is buffering allowed but switched off.
Answer: Buffering depends on table is selected;
1. Volume of Data and 2. Access type(read or write)
Buffering techniques
Buffering not allowed : No buffering
Buffering switched on : buffering allowed but it depends on
buffering type (Single record buffering; Generic Area
buffering; Fully buffered)
Buffering allowed but switched off : buffering is allowed
on the table as per above two parameters but currently it
is switched off.

298. what is collective search help?


ANS. Collective search helps combine several elementary search
helps. Collective search help thus can offer several
alternative search paths.
The user can thus choose one of several alternative search

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.

299. how to create lock object?


ANS. Transaction : SE11 and go to last option
Lock object name should always start from 'E' and it will
generate two fuction module enqueue (Activate the lock) and
dequeue(Deactivate the lock). Use update sql between these
FM's.

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.

301. what is the keep parameter in BDC_OPEN_GROUP function module?


ANS. If KEEP = 'X' Parameter is passed. The session will remain
in SM35 even after successful execution otherwise it will be
deleted.

302. what is the difference b/w database and data dictionary?


ANS.

303. if we are inserting record in BDC,if poweroff how can you


know how many records inserted?(poweroff yourside)
ANS. These types of logs are called as Application logs. In SLG1
tcode we can find those the records which r not updated.

304. 1.What is the difference between append structure and


include structure.
2. what is the logging of technical setting while creating
db table.
ANS. Append structure and Include Structure both are used to
appened table/structure in DDIC.

1)Append Structure is to add fields to the SAP standrad


Table/structure.
1)Include structure is used to add field in
ztable/zstructure.
2)You can append structure only at the last of
table/structure.
2)you Can use include any where in your Table/structure.
3)If the structure or table contains the last field as long
data type then you can't use append structure becoz append

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.

examaple: if your Table contain fields AAA ,BBB, CCC and


you want to include a structure to it with field DDD and EEE
after Activating table you will fine AAA,BBB,CCC,DDD,EEE.

In ABAP point of view there is almost no difference in


handling .Include and .Append.
Technical settings determines data class, SIZE category and
buffering details

305. Suppose, we are creating one table. at that time we are


mention table space and size category.
Generally size category is from 0 to 6 is available. suppose
if we are declare size category as 0(zero).
For 0 (zero) the size of rows is from 0(zero) to 19000. I
have 25000 records to insert into table. but table size is
declared as 0(zero). i.e 19000 records. what about remaining
6000 records. shall i insert in to table or not?
if insert how can i do? if not insert what can i do?
ANS. It will create another extent . suppose the primary extent
contain the 19000 record and the next extent or secondary
extent contain the remaining 6000 record . Its created
automatecally by the RDMS.

306. how to calculate the difference between two date type of


variables ?
ANS. data : date1 type sy-datum ,
date2 type sy-datum ,
days type i .
date1 = sy-datum.
date2 = sy-datum - 7.
days = date1 - date2.
write : days. "Answer should be 7

307. How many servers present for Database servers,Presentation


and Application servers in Landscape? All these servers are
present at client side or company side,means where the
Database server is Located, where the Application and
Presentation servers Located in a Landscape?
ANS. all the servers are located at client location only.
Client is giving authorisation(user id and password to us)
to offshor people to work on that

308. What are types of Projects ?


ANS. implementation support rollout upgrade

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.

310. what is cardinality.how it will work in abap?


ANS. Cardinality is defined during foreign key relationship.The
cardinality of the foreign key relationship describes, for
each value in the check table, how many rows of data are
allowed to be in the foreign key table.
Cardinality is defined as X:Y, where refers to the check
table and Y refers to the foreign key table. X can have
only values 1 or C and Y can be 1,C,N or CN.
1,C,N,CN has specific descriptions.
cardinality is not enforced by the system.It is optional.

311. what is difference between update and modify?


Ans. update:- update not inserte new record but change the
existing record.
modify:- it is used to modify the record but if record does
not exist then it insert the new record.

312. am facing problem in inserting multiple data from user


defined selection screen to internal table can anyone tell
me any small code the can insert multiple data from screen
to internal table.
ANS. *For example i have used the scarr table
*Internal table declaration.
Data: Begin of Itab occurs 0,
carrid like scarr-carrid,
carrname like scarr-carrname,
currcode like scarr-currcode,
end of itab.

*Fields on selection screen.


parameter : carrid for scarr-carrid ,
carrname for scarr-carrname,
currcode for scarr-currcode.

*To insert data from Selection screen fields to the


*internal table
loop at itab.
itab-carrid = carrid.
itab-carrname = carrname.
itab-currcode = currcode.
append itab.
clear itab.
endloop.

313. explain abt EXTRACT STATEMETN?


ANS. Once you have declared the possible record types as field
groups and defined their structure, you can fill the
extract dataset using the following statements:
EXTRACT <fg>.
When the first EXTRACT statement occurs in a program, the
system creates the extract dataset and adds the first

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.

315. What are the function module types?


ANS. Basically,the word function module come from reusability
technique. Depending on this reusability and scope we can
categorize the types of function modules.
4 types of function modules:
1. Subroutines - scope is within program or package
(using external calling mechanism).
2.Normal function module- scope is within R3 system.
3.Remote enable function module(RFC)- scope is between R3
systems
4. BAPI - scope is between sap and non-sap legacy systems
and can be used within R3 systems also.
316. What is the significance of keyword " H I D E"
ANS. This statement stores the content of a variable dobj
together with the current list line whose line number is
contained in sy-linno in the hide area of the current list
level. The data type of the variables dobj must be flat and
no field symbols can be specified that point to rows of
internal tables, and no class attributes can be specified
Ex: DATA: A TYPE i,
B TYPE i.
START-OF-SELECTION.
FORMAT HOTSPOT.
DO 10 TIMES.
A = sy-index ** 2.
B = sy-index ** 3.
WRITE / sy-index.
HIDE: A, B.
ENDDO.
AT LINE-SELECTION.
WRITE: A, B.

317. What is the difference between occurs 1 and occurs 2?


ANS. The main difference between the occurs1 and occurs 2 is
given below.
occurs1: is used to the system allocate the 2 memory
locations are cratead.
occurs2: is used to the system allocate the 3 memory
locations are crated.
318. Can we have more than one selection-screen . And how ?
ANS. We have created the more than one selection screen by using
the call screen statement .
This is the syntax for the more than one selection screen.
call screen (sno) including program (program) (screen no)
AND BY THIS COMMAND
EXAMPLE: SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TWXT-001
SELECT-OPTIONS:

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.

319. what is the significance of keyword "LIKE "?


ANS.A> LIKE is used to refer the existing DataObjects
EXAMPLE. TYPE: REFER THE DATA TYPE.(NO MEMORY CREATED)
LIKE: COPY THE DATA TYPE.(ITS OWN MEMORY WILL BE CREATED)
Data: Price Like Num.
Here Like is used to refer existing DataObject Num.

320. how do you pass table to function module?


ANS. pass the data from the table to the function module is used
to the by using the import and export parameters.
import: is used to the transfer the data from the table to
the function module
export: is used to the transfer the data from the function
module to the table.

321. what are the similarities between internal tables and


structures?
ANS. 1)Both Internal Tables and strucures do not have enries
stored in data base.
2) Both of them do not have a primary key or a forieng key
relation ship with any table in the data base.
3) Unlike database tables both internal tables and
structures do not have technical settings.
Internal table is a temporary storage area that exits at
runtime of the program .
Structure also exists at runtime of the program.
Structute does not have allocate memory in the system.
where as Internal table allocate memory in the system.

322. which state ment is used to move identically named fields


between structures?
ANS The statement Move-Corresponding can be used to move data
related ti identically named fields between structures.

323. How to create a index on views?


ANS. We can creat the index on views like this.
go to the abap dictonary transaction code is SE11 and select
the radiobutton type as view and select the particular view
type and creat the index for that table based on the primary
key value.
So mandatory key is important role in the while creating the
index based on the views.
Index: is a sap provide mechanizam to retrive the records
fastly from the database based on the primary key value of
the table.

323. What is binary search? where it is used?


ANS. If the data in the Internal table is huge and
you are trying to read the data from the Internal table
then it is recommend to use binary search.

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

325. what is long text?


ANS. A long text is nothing but a text is assinged with the
standard text which is assioated with the text elements.
This is defined by the transaction code is SO10.
syntax: selection-screen begin of block bl1 with frame title
text-001. (If u double click on the text will go open the
one pop-up window for entering the text.

326. How to change the development class of any object?


ANS. In development class is nothing but all the objects are
stored into the development class. for that purpose we will
create the one customer development names space and what are
all the objects are created these are put into the that
development class. if u want to change the objects we can
easily change the objects.
But where as in $TMP development objects are cannot
transportable from one system to another system. Because of
the this is system
we can use se80 and se03 transactions to change the
development Class.

327. Difference between Occurs0,occurs10 and occurs100?


ANS. The differneses are given below.
1. occurs 0:
(It means it will create the default rows for the
internal table depend on the requirement)
2. Occurs 10.
(It means it will create the 11 rows for the internal table)
3.Occurs 100.
(It means it will create the 101 rows for the internal table)
But where as in defauty the system is create the 8KB size of
the memory space for the internal table.

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

329. hoe can we write the include programs in reports?


ANS. INCLUDE ZDODO. CLICK ON THIS AND WRITE YOUR CODE.

330. how to retrieve the field label of data element in


reports.(not in alv).

55
ANS.

331. can we write any interective or classical reports in alv


reports if yes how?
ANS. Yes, we can generate both classical and Interactive reportS
in ALV..
For classical report in ALV..
Type-pools : slis.
DATA : it_Fcat type slis_T_fieldcat_Alv
wa_fcat type slis_fieldcat_Alv.
Data : itab type standard table of (SOme Structure)
wa like line ot itab.

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.

when '&IC1'. " this is FunctionCode which catchs when


user do some actions.
READ TABLE Itab INTO WA_tab INDEX RS_SELFIELD-TABINDEX.
perform buildcatlog.
perform DataRetrieval.l
Perform Listdisplay.
Perfrom Dispaly.
endcase.
THIS IS HOW WE DO INTERACTIVE ALV...
I THINK THIS WIIL U IN DOING CLASSICAL AND INTERACTIVE
ALV..

332. 1. How can we create PUSH Botton in presentation layer.


2.How can we print the record.
3.If database has nor records & if we write 'for all
entries' in select statement then what will be happen.

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.

336. 1.If a table is fully buffered?can we fire single select?


2.Diff between submit progam name and submit program name
and return? main criteria for using loop at read table?
ANS. Answer 1. Full table buffering :- here entire database
table buffered to application server.
So further access to same table can be access from

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.

Answer 2. The SUBMIT statement accesses an executable


program. And executes the report program called thru Submit.

The addition AND RETURN starts the executable program in a


new internal session. The session for the calling program
is retained. Once program access is completed, program
execution for the calling program continues after the
SUBMIT statement.

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.

340. how to download sap Smart form in text format?


ANS. it con be saved as a PDF file using otf function module..

341. how to upload logo in the smart forms?


ANS. use T-code SE78 to upload logo.
Click on 1)from graphics
2)stored on document server
3)GRAPHICS general graphics
4)BMAP bitmap images
then click on import tab which is there on tool bar 1st
button.

342. what is the use of 'split' in BDC? Is it related to some


tab adjustment to the flat file during BDC?
ANS. spilt is a keyword which can split data based on seperation
in inter face programming,,,,,,,,,,
example;
1 in,in,in tab x,y,z tab 11,12,13.........this is flat
file,......
split it_itab-banks at ',' in to table banks,
split it_itab-bankl at ',' in to table bankl,
split it_itab-bankn at ',' in to table bankn.......

343. Which is the event trigger last?


ANS. we generally use end of selection for display of report. So
its a gud practice to put the write statements in end of
selection. When the control comes to the first write
statement in end of selection and if this write statement
is a valid one then immediately the event triggered is top-
of-page. In this top-of-page event we generally write the
headings. So after printing the headings the control comes
back to end of selection and prints the corresponding data.
After this if the report has footer lines reserved in end
of page event then this will be triggered. So we can say
that end of page can be the last event which is triggered
if the data is filled upto reserved lines.

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)

345. what is macro?


ANS.MACRO IS NUMBER OF INSTRUCTION.HERE EACH TIME WHEN YOU CAL MACRO
THE SET OF INSTRUCTION WILL BE INSERTED IN THAT LOCATION.IT REQUIRE MORE
MEMORY THAN FUNTION
REPORT demo_mod_tech_macros.
DATA: result TYPE i,
n1 TYPE i VALUE 5,
n2 TYPE i VALUE 6.
DEFINE operation.
result = &1 &2 &3.
output &1 &2 &3 result.
END-OF-DEFINITION.
DEFINE output.
write: / 'The result of &1 &2 &3 is', &4.
END-OF-DEFINITION.
operation 4 + 3.
operation 2 ** 7.
operation n2 - n1.
This produces the following output:
The result of 4 + 3 is 7
The result of 2 ** 7 is 128
The result of N2 - N1 is 1
In this example, the two macros operation and output are defined. output is nested
in operation. operation is called three times with different parameters. Note how the
placeholders &1,&2,... are replaced in the macros.

346. what is advantages and disadvantages in call by value and


call by reference?
ANS. In call by reference the the object will get change.
In calle by value it won't.

call by reference passes the address of the argument into


the required subroutine, thenh when it is altered in the
subroutine, its altered value will overwrite the original
argument value.

call by value only passes the value to the subroutine(i.e.


the subfunction defined)and this does not overwrite the
argument value.

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.

348. how to transport request give step/producer of transport


request give step?
ANS. go to se80 click package-go to program(or its depends upon
u what u transport request)]
fallow these path
right click on program->more function->write transport
entry click
pop up window open
create request
pop up window open select request task -> click
request will be cteated note request no.
save
back se80
click on transport(truck symbol)
now go to se01
click on request type
click display

349. how to identify all the BDC Programs running in Client SAP
Environment?
ANS. SM36.

350. what is the table name of stock of material?


ANS. MARD Material stock
MBEW Material stock with valuation

351. types of smartforms?


windows in smartforms?
ANS.

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.

353. WHAT IS PEFORMANCE TUNING?


ANS.

354. MM Flow & SD Flow?


ANS. MM flow:
purchase requstion ME51
request for quatation ME41
quatation from differnt vendors ME47
price comparision ME49
purchase order send to vendors ME22
goods reciepts MIGO
logistic invoice verification MIRO
SD flow
Enquirey VA11
Qutataion VA21
sales order processing VA01
delivery VF01
billing VL01

354. When we append a record to a sorted internel table how it


is appended?
ANS. If an internal table is defined Sorted, then dont even
think about Appending. Always use INSERT. Append will only
append data after last record in internal table. INSERT
will find the index and insert the record. e.g. itab
contains data like A, D, F, J, K etc..now i want to add B
to it.. INSERT will update internal table like A, B, D,
etc...If used APPEND, program will abend.

355. which one is efficient in following command to copy data


from one itab1to another itab2 . both itab table has same
structure.
1. move itab1 to itab2
2.move corresponding field of itab1 to itab2
3. itab2[] = itab2[]
4.appends line of itab1 to itab2..
ANS. To move all entries from one internal table to another
which has the same structure use the following statement:
ITAB2[] = ITAB1[].

356. how many structures are in sap R/3(ABAP)?

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.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'


EXPORTING
I_CALLBACK_PROGRAM = W_PROG
I_CALLBACK_USER_COMMAND = 'PICK'
I_STRUCTURE_NAME = 'EKKO'
TABLES
T_OUTTAB = T_EKKO
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.

*&----------------------------------------------------------
----------*
*& 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.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'


EXPORTING
I_STRUCTURE_NAME = 'EKPO'
CHANGING
CT_FIELDCAT = T_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

DELETE T_FIELDCAT WHERE FIELDNAME EQ 'EBELN'.


DELETE T_FIELDCAT WHERE FIELDNAME EQ 'BUKRS'.
DELETE T_FIELDCAT WHERE FIELDNAME EQ 'LGORT'.
DELETE T_FIELDCAT WHERE FIELDNAME EQ 'WERKS'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'


EXPORTING
I_CALLBACK_PROGRAM = W_PROG
IT_FIELDCAT = T_FIELDCAT
IT_EVENTS = T_EVENTCAT
TABLES
T_OUTTAB = T_EKPO
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.

ENDCASE. " CASE COMMAND


ENDFORM. " FORM PICK

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

360. what are use of ok_code in bdc?


ANS The OK_CODE field stores the function code in your program.
It is always the last field in the field list of a screen.
You need to assign a name to this field in the Screen
Painter. Traditionally, this field is always called
"OK_CODE". However, you can call it anything you like. Once
you have assigned a name to the OK_CODE field, you need to
declare a field with the same name in your module poo

361. in select _upto N ROWS IF N=0 THEN------------------are rows


are selected?
ANS. All rows will be selected

362. what is the structure of itab of screen?


ANS. NAME,GROUP1,GROUP2,GROUP3,GROUP4
REQUIRED,INPUT,OUTPUT,INTENSIFIED,INVISIBLE
LENGTH,ACTIVE are the components in screen

you can declare internal table with scrren structure in itab

DATA: BEGIN OF it_screen OCCURS 0.


include structure screen.
DATA: END OF it_screen.

it_screen-active = 0
append screen.
This is how you can use the components in the itab screen.

363. what is the purpose of RDBMOIND RPOGRAM?


Ans. RBDMOIND is used to update the status of Outbound IDoc from
03 to 12.
03- Idoc pasted to communication layer
12- data passed to port OK

364. what is the difference detween EDI AND ALE?


Ans. EDI:
edi is electronic data interchange is exchange the data by
electronically from one system to the another system that
is weather is document or anything.ex:if you send the
purchase or der from the (sender) system that means outbound
system that is recieved to sales order to the inbound
system(Reciever)
so that means that document is changed by electronically
from the outbound system to the inbound system.

ALE:

Application link enabling it provides the link between the


two systems that is the sap or non-sap or third party
systems within the distributed systems only. ex: if u send

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.

366. what is the difference table type and structure?


ANS. Structures (structured types)
Structured types describe the structure and functions of any
structured data objects, that is of data structures with
components of any type.
A component can be a field with an elementary type or can
itself be a structure. A table can also be used as a
component in a structure.
A database table always has a structure and is therefore
implicitly a structured type. However, the fields of a
database table can only have an elementary type.

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.

Sample code how to use them to create internal table:


* Create Internal table from a structure:
DATA: IT_DATA TYPE STANDART TABLE OF Structure.
* Create Internal table from a table type:
DATA: IT_DATA TYPE table_type.

367. can we insert two records in internal table?


if yes give code.
ANS. Ofcourse we can insert two receods to an internal table.
Here is a sample code.
*Internal table declaration.
Data: ftab like scarr occurs 0.
Data: begin of itab,
carrid like scarr-carrid,
carrname like scarr-carrname,
currcode like scarr-currcode,
end if itab.
itab-carrid = BB.
itab-carrname = British airways.
Append itab to ftab.
clear itab.
itab-carrid = AA.
itab-carrname = American airlines.
Append itab to ftab.

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

369. difference b/w classical report and intractive report?


ANS.
370. what is diffrence between table control and alv grid in
dialog programming in abap?
ANS. Alv Grid control is advanced for Table control.
table control means we have to use in Dialg Programing But
grid control is having features like ALV Programing.

371. what is difference betwen type and like statement?


ANS.
372.Smartform : how to print a smartform with portrait style and
landscape style at the same time?
ANS. Double click on page and go to OUTPUT OPTIONS tab.
And choose the radio button for the landscape and portrait
style.
But you done only one Style in one time.

373. A report has statements like:


top-of-page.
write :/.
End-of-page.
write:/.
But the end-of-page is not displayed ?please verify?
ANS. in top-of-page no need to reserve space for header in
apage.
in case of end-of-page u need to reserve some space for
footer in the report program by using line-count 20(2).
in that 2 lines of space is reserved for footer then only
it display the footer in those 2 lines in out put.

374. How to debug an Idoc at runtime?


ANS.IDocs are processed by a function module, which are mapped
against in table EDIFCT. When you process an IDoc with BD87
you can have a breakpoint in the function and it will stop.
For outbound processing it depends on which program is
sending the IDoc. For transactional data like purchase
orders, the IDoc is created via RSNAST00 which in turn calls
a function module assigned to the processing code (BD41).

375. what class is used to display the ALV grid control?


ANS. Use the Class CL_GUI_ALV_GRID To display the ALV grid
control and call Method SET_TABLE_FOR_FIRST_DISPLAY.

376. parter profiles are stored in which table?


ANS. EDPP1 EDP12 EDP13 EDP21

377. what is the use of CTU_PARAMS when we working with BDC?


ANS. actually CTU_PARAMS IS THE STRUCTURE,
CTU_PARAMS FIELDS ARE:

68
DISPLAY MODE.
UPDATE MODE.WHILE WE WERE EXECUTING THE CALL TRANSCTION BDC PROGRAM

THESE TWO FIELDS WE NEED TO USE FOR INPUT PARAMETRS.


378. what is the standard program to check the consistency of the
partner profiles?
ANS. To check the consistency of partner profiles, we can
execute the program RSECHK07. You can do this via
transaction SE38.

379. what is the field to be used in field catalog of an ALV


report to hide the relevant column in the list?
ANS. Field 'NO_OUT'

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

380. to explicititly intialize the selection screen for each call


you must you the event ________________?
ANS. initialization event

381. tcode to find applicatin server directories?


ANS. AL11

382. what is the standard program to check the consistency of


partner profiles?
ANS. RSECHK07

383. what is the flag?


ANS. flag is a variable which contains only two value like ( 0
or 1) or ( true or false ).

384. how to debug a popup window?


ANS. Create a small text file(notepad) on your local computer
with the following content
[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand
Start Debugging, whenever you want to debug a popup take
this file and drop it over your popup.

385. what is the difference between functional spec and


technical spec?
ANS. Functional Specs, These are generally given by the Client
as per their business flow and their products list /
requirement list..

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.

387. what is Transport Request? why it is needed for us?


ANS. Transport request is a request which is used to transport
the object from testing to the production sever.
Each and every task will be stored in the transport request

388. What type of transport requests?


ANS. Transport Requests are 4 types.

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.

390. in ALV reports how double click event works?


ANS. The event which is used is '&IC1' . when ever a double click event is
worked the above is used. apart from USERCOMMAND.

391. where u can find out the check table?


ANS. goto SE11- > give table name ->click on entry help push
button -> u can view a new column in the table i;e CHECK
TABLE where the check table name is defined

392. How to create our own data types in a Report??


ANS. using syntax "TYPES" we can create our own data types.
for ex:-types : name(15) type c.
types : name1 type name.

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

1. First we will create an internal table wih fields.


example.
tables: mara.
data:s_matnr for mara-matnr.
data:Begin of itab occurs 0,
MATNR TYPE MATNR, "FROM MARA TABLE
ERSDA TYPE ERSDA, "FROM MARA TABLE
MAKTX TYPE MAKTX, "FROM MAKT TABLE
end of itab.

2. write select statment.


select a~matnr
a~ersda
b~maktx
from makt inner join mara
on a~matnr = b~matnr
into table itab where a~matnr in s_matnr.

395. How to search a Internal Table Fields?


ANS. SORT itab by BINARY SEARCH
LOOP at itab.
write:...
ENDLOOP.

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.

397. Explain the SmartForm with an Example?


ANS.

398. How to Split one delivery into many ( Step by Step)?


ANS. when orderd qty < delivered & the remaining qty has
deliverd some other time,there may be the possibilities to
split.so once again it effects from picking,packing & delivery
with different document numbers poooled to reach the
desired delivery.

399. What is user specific parameter?


ANS. The values in SPA/GPA parameters are user-specific. ABAP
programs can access the parameters using the SET PARAMETER
and GET PARAMETER statements.

400. Screen wise process for creating sales order quotation


through transaction code VA21 AND What are the mandatory fields to be filled
in Transaction VA21 for 'Creation of sales order Quotation'.
ANS. We need to set job processing as By using

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

402. what is the difference between at line selection and at


line selection on field.
ANS. 1)at line selection: it is used to capture all the field
values
2)at line selection on filed: it is used to capture only
particular field value.

403. how to upload open purchase order through BDC?


ANS. by using some of functionModules like
in both AS,PS we have to create internal table
1)UP-LOAD 2)DOWN-LOAD these are used if the data is in Presentation
Server
3)READ-DATASET 4)TRANSFER these are used if the data is in Application
Server
(Or)
By using Manualprogramming
like BDCDATA structure
there we have fields like program,dynpro,dynbegin,fname,fval

404. how many no of buttons we can create on Apllication tool Bar?


ANS. 8 button & 6 menu

405. I have two selection screens, i gave values in first


selection screen but i din't give any values in second
screen. will it display or not plz tell me?
ANS. It depends on your code.
If you have enterd some values in frst screen and used the
levae to list processing statement then it will display
values of the first screen else if you directly called the
second screen then it might not display any values.

406. What is the significance of at line-selection event?


ANS. at line-selection is an event which is
trigerred when ever u double click a record line in the
primary list.... or single click onthe record if u using
HOTSPOT command....
so when this event is triggered it will fetch that row's
information in the system variable SY_LISEL...as it is
displayed on the screen....
so again u will have to use the offsets to fetch that
information only which u want....
or instead of this... use HIDE command ... to fetch those
fields only which u want.... simple

72
buddy.... hope u have got it....
mainly this event is used whenever we r using lists...
one list under the other

407. how to transfor the data from flat file to bdc


plz send the steps as well as example
ANS. 1.USING GUI_UPLOAD UPLOADED DATA FROM FLATFILE TO INTERNAL
TABLE.
2.APPLY A MAPPING LOGIC USING VARIOUS METHODS I.E
SESSION,CALL TRANSACTIION ETC I.E WE CALLED TRANSFER THE
DATA.
3.UPDATE THE DATABASE.

408. WHAT IS MEAN BY XK01, VA01 AND VD01 IN BDC PROGRAMES


ANS. its an customer master , vendor master, and sales order
t.codes in BDC to give the input field screen

409. what is difference between parameter & select-option?


ANS. select-option: is used for the whenever create the
select-options the system creaat the one internal table same
variable name. that table name is called selection table.
the main purpose of the internal table is used to stored the
selection text.but at the same time the system create the
Sign ,Option,Low,High implicitly.
it will accept the value ranges from the selection screen.
means lower range and higher range value.

parameters: is used for the it will accept the value from


the user.the system doesnot create the internal table
implicitly. it will create the explicitly.

410. how to debug background jobs?


ANS. In SM37: Select the job, type JDBG in the OK-code and press
enter. This can be used for both completed jobs and jobs to
be processed (just make sure you have enough time to debug
before the job actually starts). Breakpoints set in the job
flow works. This method has been successfully used in R/3
4.6C.

411. how can you call a function module in smart form..??


ANS. when u right click the new node
create->flowlogic->programlines.
then a window opens for program lines..
there in the left side u can find the icons..
check,pretty printer and a statement struct...
clicking his statement struct icon u can call funtion module...

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.

413. what are the roles and responsibilities of a technical


consultant will be assigned in idoc development in real time?
in case of

73
a)IDOC EXTENSION
b)sending TRANSACTIONAL IDOC
c)CHANGE POINTERS

ANS. 1)IDOC Extension is nothing but Extending the Existing IDOC as


an Enhancement
2)Transactional IDOC is means that sending the IDOC from place
to an another by using FM called INBOUND-IDOC_PROCESS
3)Change pointers are menat for Activate the IDOC by using TX
Code BD61

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

415. wahts is the diff between the transaction...


VD01 and XD01???
ANS. Both are used for Customer creation but in VD01 we dont
specify company code details whereas in XD01 we have to.

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.

417. what is the remote system in ale whether it is sender /


receiver?
ANS. remote system is receiver system

418. Difference between select and select single statement?


ANS. select statement extracts all the records from the table of
database whereas select single will extract only a single
record.

419. what is a TEXT Table ?


ANS. Table A is a text table of table B if the key of A
comprises the key of B and an additional language key field
(field of data type LANG). Table A may therefore contain
explanatory text in several languages for each key entry of

74
B.

420. what are steps of smart form.


ANS. there are five steps in while creating the smartforms.

1.create the new smartform


2.defining the looping process for the internal table
3.define the data into the form.
4.call the smartform function module from the normal abap
program in se38.
5.process the internal table.

421. WHAT IS DIFFERENCE BETWEEN BATCH INPUT MEHTOD AND DIRECT


INPUT
ANS. Direct input method Batch Input Method

1) We cannot send the fields | 1) We can send fields as per


according to our requirement| requirement.
|
2) validations are done based | 2) validations are done based
on pre-defined function | on applications.
modules

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.

423. WHAT IS THE PURPOSE OF SPLIT COMMAND?


ANS. Split Command Split word in two patrts

424. what is field string ?


& where we are using field strings?
ANS. Field strings are a special form of dynamic string, which
have all the capabilities of a dynamic string, but may also
represent a defined part of a random file buffer or a
defined part of a dynamic string.

Field strings must always be declared using LOCAL.They may


be used in the same manner as a dynamic string variable, or
they can be bound to a file buffer for an open random-
access file or a dynamic string using a corresponding FIELD
statement. Each field string occupies sixteen bytes of
memory, and requires slightly more general overhead than a
regular dynamic string variable

The TABLES statement automatically defines a field string .


they are mainly used in screen painter.

425. how to transfer two idoc simeltaniously,


ANS. select the option collect idoc instead of tranfer
immediately. then schedule the transfer of idocs at periodicity

426. what is the difference b/w driver program & print program?
ANS. driver program internally created.

75
print program we have to create

427. how to call the function module generated in smartform for


printing the form ?
ANS. in smart forms the function module will be generated
automatically by the system when activate the smart form and
provides a name for function module as name. you can call
that function module in the print program using pattern (
ctrl + f6).

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

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


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.

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.

Suppose you have an IDOC to be sent to your vendor which


has purchase details .
U also want to send the same data to Vendor's Plant as an
acknowlkedge to the receipt of material.

Sending the same idoc with same message type to both of


them might lead to confusion.

IN order to avoid this you attach our idoc segment to a


message type whih defines what is it carriying.
You do this assiging a segment to Message type in WE81

430. what is meaning of idoc monitoring?


ANS. Idoc monitoring means Idoc Status

431. what is the function module to read the standard text?

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.

434. how to fill the select options from an internal table


dynamically ie can i use the loop in the initialization
ANS. TABLES : mara.

DATA : BEGIN OF itab OCCURS 0,


matnr LIKE mara-matnr,
END OF itab.

SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.

INITIALIZATION.

CLEAR : itab,
s_matnr.
REFRESH : itab,
s_matnr.

SELECT matnr
INTO TABLE itab
FROM mara
WHERE meins EQ 'CS'.

* fill select option.


LOOP AT itab.
s_matnr-low = itab-matnr.
s_matnr-sign = 'I'.
s_matnr-option = 'EQ'.

APPEND s_matnr.
ENDLOOP.

435. how to print amount in words in alv ??


will the function module spell_amount work ??
ANS. the function module spell_amount will work but there is
some limitation to it as well.
for eg: if amount is '6000' it will read as six thousand.
if amont is '6078',it will read as six thousand
seventy-eight.
but for 6000.78,it will read as six hundred
thousand seventy-eight.
You can try out other combination as well.

436. can we debug the smartform if yes how can we debug?

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.

438. HOW MANY WAYS TO DEFINE INTERNAL TABLES.


ANS. there r so many ways to define internal table

1. data: begin of itab occurs 100,


matnr like mara-matnr,
mtart like mara-mtart,
end of itab.

2.data: begin of itab.


include mara.
data: end of itab.

3. data: begin of itab.


matnr like mara-matnr,
mtart like mara-mtart,
end of itab.
data: jtab type standard table itab,
gtab type itab.

4. data: itab like standard table of mara.


data: jtab like table itab.

5. data: itab like table of mara with header line.

439. what is data structure and data table


ANS. data sturcture:
data structure is nothing but its create only at runtime.
it doesnot allocate the memory. and also it contains no
data. because of its only structure.no memory is allocated
for the sturcture.

data table:its nothing but sap predefined the table.

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.

440. can u send the results from report to sap memory?


ANS. yes ofcourse we can send through SET PARAMETER.
CHECK THIS OUT......
SET PARAMETER ID pid FIELD f.
Effect
Writes the contents of the field f to the global SAP memory
under the key pid . If the key already contains a value, it
is overwritten.
The key pid must consist of three characters. You can find
a list of the keys (parameters) used in the SAP system
description or in the ABAP/4 Development Workbench.

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

441. what is meant by filtration in alv? how to do it?


ANS. in output of alv list we can remove some field rows this
is filtration.

-in the output one pushbutton is their for filter . if u


press that u will get one screen it will ask wt fields u
need to hide.

442. what is the button to change the variant in alv?


ANS. It depend when these "specific circumstances" are occurring?

Before displaying the ALV, then force the value of the


variant used in set_table_for_first_display,

CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY


EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT = GS_variant
I_SAVE = X_SAVE

79
CHANGING
IT_OUTTAB = GT_SFLIGHT.

If you want to simulate multiple "default variant" you


should "mislead" the ALV by changing the report name used
for storing variant (IS_VARIANT-REPORT) But in this case
you will no longuer see every variant when in the ALV, only
those of the "report name" passed when setting for first
display.

443. how to field properties are set with **** as a password.


ANS.
at election-screen output .
loop at screen.
screen-invisible = 1 .
modify screen.
endloop .

444. in start of selection if we perform validation ,what happens?


ANS.

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.

446. can u add a new view to the existing view?


ANS. no . view is using created one or more tables.
actually view is used for read only purpose.we cannot
manipulate the existing tables or system defined tables.
views created on transaparent tables only.

447. how to call the function module generated in smartform for


printing the form ?
ANS. in smart forms the function module will be generated
automatically by the system when activate the smart form and
provides a name for function module as name. you can call
that function module in the print program using pattern (
ctrl + f6).

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.

450. can u create internal table dynamically ? how?


ANS.
Use this method.
call method cl_alv_table_create =>create_dynamic_table
and assign this to a field symbol.

451. what r the main events that r used in alv?


ANS. TOP_OF_LIST
END_OF_LIST
END_OF_PAGE
TOP_OF_PAGE
TOP_OF_COVERPAGE
END_OF_COVERPAGE

452. if u write a write statement after end of selection ,will


that be triggered?
ANS. Without Stop statement also it will trigger.
End-of-selection normally triggers when all the records
have been read from database.
start-of-selection.
end-of-selection.
write : / 'endofselection'

453. in bdc which method is suitable for back ground processing?


ANS. in bdc session method is best for the background processing.
because of all error records are stored into the creat the
error logs in session method.
records are not updated until to rectify the errors. if any
error record is that is not updated into the database..
to correct the error record then u can process again then
is stored into the data base.

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

Check out this eg code :

suppose we think u have 3 Internal tables i.e.,


t_marc,t_mara,t_makt
and 4th internal table is itab[final interanl table]

Start-of-selection.

Select matnr werks lvorm from marc


Into table t_marc
Where matnr = s_matnr
And werks = p_werks.

If t_marc is not initial.


Loop at t_marc .

Read t_marc into itab with key matnr = t_marc-matnr.


Select matnr Mbrsh Meins maktl from mara
Into table t_mara
For all entries in t_marc
Where matnr = t_marc-matnr.
Select matnr maktx spras from makt
Into table t_makt
For all entries in t_marc
Where matnr = t_marc-matnr.

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.

457. How can I pass SELECT-OPTIONS to function module generated


by SMARTFORM?
ANS. decalre ur select options there n call that generated FM in
ur driver program n pass the parameter

458. How to transfer a smartform from Development to Quality


Server?
ANS. assign smartform into a transport request and release it
from development sever and import it in quality using SMTS
transaction

459. How to debug a smartform otherthan putting break-point in


initializatin section?
ANS. Execute the smartform, u can see a function module /000012.
Click on GOTO on the menu bar. Click on Main program. You
canm see the includes. click on the last include i.e F01.
and keep the break-point(Shift+Control+12) at ur desired
point.

460. how we can take a file from Presentation server to


Application server?
ANS. To upload a file from presentation server to application
server we have to do the following :

1. upload the file from presentation server in to an


internal table using gui_upload.
2.open dataset
3.loop the internal table
4.use transfer statement to write into application server

461. which of the following is more efficient when we are


retrieving data from more tables.
select statement using innerjoins or select statement using
for all entries?
ANS. For Key Field Inner Join is most appropriate if all keys
are matched. For example: EKKO-EKPO based on EBELN. It
reduces the network traffic for selecting data from both
the tables.

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.

463. what is the difference between function modules and


Subroutines?
ANS. funtion modules subroutines
1.they can be tested by itself 1.they cannot .
2.they can be remote enabled 2.they cannot .
3.they can handle exceptions 3.Only a few can handle.
4.they have to be maintained in 4.It is not necessary.
a function group.

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.

465. the control commands in the report program are


atfirst,atnew,atlast,atend of and what is the difference
between them?
ANS. At first
this event is trigerred when it encounter the first record
At new
This event is triggered whenever the value of thge field
specified as part of at a new event changes
At end of
this event is triggered at the end of current field value
which is specified as part at end of event
At last
this event is trigerred when it encounter the last record

466. how to creat a table with out primary key?


Ans. A table can be created without using the primary key.
first understand why we use primary key on a table:-
1.in order to avoid inserting of duplicate values in a table,we use
primary key,we can create a table with different values.

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

467. How to handle Errors in Function Modules?


ANS. To handle errors in function modules we have to use the
exceptions attribute. When the function module is called we
have to handle is by RAISING the exceptions.

468. how can u write in single program call transaction and


session method logic?
ANS. It is possible to use : call transaction , and session
method in the same program.
First , try posting using call transaction,
if sy-subrc is ne 0.

save bdctab.
open a BDC session.
insert data.
and close session.

endif.

468. say in selection screeen (ie is in select-options) i have


selected record range from 1000 to 2000 but in the final
display list i sholud not get 1200 to 1300 records it
should be hide how is it posible
ANS. click on the arrow tab beside the outer range and give the
range in excluding the range it will apper on red colour LED
in such range will be exclde from ur selection range.

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

470. how many types of idoc'c?


ANS. there are 2 types of idocs
1. Basic idoc
2. Extended idoc
Basic idoc
one controll record
one data record
one or many status record
Extended Idoc
One controll record
one or many data records
one or many status records.

471. how to stretch the report size in standard tool bar.


ANS. in alv reports how i insert logo
into alv grid(if it is tcode 'oaer' )?tell me procedure,
in the same report how insert background logo tell me the
procedure please?
ANS. to show LOGO in ALV grid with header details,
in REUSE_ALV_GRID_DISPLAY,
I_CALLBACK_HTML_TOP_OF_PAGE = 'TOP_OF_PAGE'

*****at the end of main program*******

form TOP_OF_PAGE.
**********Declaration*************
data : glistheader type slis_t_listheader,
llistheader type slis_listheader.

******Populate header data************


clear llistheader.
llistheader-typ = 'H'.
llistheader-info = 'This is Grid Title'.
append llistheader to glistheader.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'


EXPORTING
it_list_commentary = glistheader
I_LOGO = 'ENJOY_SAP_LOGO'
* I_END_OF_LIST_GRID =
.

endform.

472. I am trying to automate a manual processing of iDOCs in


BD87. I used the following code to pass idoc-id to global
variable 'DCN' and then skip the first screen of BD87 to go
to processing directly. After running this code
SET PARAMETER ID 'DCN' FIELD itabhdr-idoc_id.
CALL TRANSACTION 'BD87' AND SKIP FIRST SCREEN.
it takes me to the first screen because it cannot recognize
my idoc-id. How I can pass idoc-id to global?
I have used the above code to goto VA02 with VBELN and it

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.

474. what is meant by ale configuration? what can u do in ale


configuration?
ANS. ALE configuration :
Goto SALE T-code then
1) Design LogicalSystem and go back to IMG initial Screen
and 2) Assign Logical System to the client.
3)then Goto SM59 to create RFC Destinatio for the Logical
System (i.e.receiver system.).
4) then Goto WE21 T-code for Port Creation in WE20 select
TranscationalPort and create your Own Port.
5) Goto BD64 T-code for Distribution Model
here we create Model view and specifies the what kind of
Message is distributed between them .
6)we'll save and goto environment in the menu bar..
7) goto we20 T-code for Partner Profile ..create the
Partner file ..and give inbound and outbound messagetypes.
These r the steps for ALE Configuration.
Suppose If u Specify Matmas as Message type ...got BD10 and
sent the material .

475. if u take one worst program how can u bebugg in application


server & database server?
ANS. by maintaning break points in the program (ie for the
statements which you want to debugg)

476. how can u write in single program call transaction and


session method logic?
if u write logic in call transaction ,is there any errors ?
how can u see in session ?
ANS. You can set radio button in select options
call transation
call session method
if call transaction = 'X'.
call transaction.
else

87
call session method.
endif.

477. How Calculate TOTALS,SUBTOTALS in ALV Reporting?


ANS. data: wa_fieldcat type slis_fieldcat_alv,
it_fieldcat type slis_t_fieldcat_alv.

data: wa_sort type slis_sortinfo_alv,


it_sort type slis_t_sortinfo_alv.

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

479. Can Top-of-page trigger with VLINE.?


ANS. one thing remember top of page will be
triged only after write statement only if a report is
having no write statement no top of page will be triged)
TOP OF PAGE is triggered with
write or
skip or
uline or
not with vline.

480. what is meant by maintenance allowed(if it can provide


authorization, what is authorization)
ANS. Table maintenenece will give authorisation to add or all the
enetries into any database table .
authorisation is nothing but it is to give authorisation to
particular user for a transaction.

481. why u can call(r using) ssf_function_module_name in smartforms?


ANS. By using "ssf_function_module_name " the user can obtain
the function mudule generated by the Smartform. The input
parameter is the SMARTFORM name the output parameter is the
function module generated .It has to be type RS38L_FNAM.
After getting the output parameter . CALL FUNCTION(output
parameter name).
A function module is generated whenever a Smart Form is
activated. This Smart Form could be called from the driver
program by calling the function module generated in the
system directly.

But this is not an efficient way of calling Smart Form for


the following reason:

Whenever a Smart Form is generated, a function module is


generated and the naming convention for that Smart Form is

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.

So when this Smart Form is transported from the development


to Quality or Production system, a new function module name
is generated according to the number series available in
that system. If the above program is transported to either
quality or production system, the program might go for a
dump as the function module is not available in that
system, because the number series generated in the for
example in development system will be different from that
of the quality system . To handle this situation, we use
the function module SSF_FUNCTION_MODULE_NAME to get the
name of the function module for a Smart Form dynamically.
If the form is not active, the function module
SSF_FUNCTION_MODULE_NAME raises the exception NO_FORM.

482. how to transfer smartforms?


ANS. by transport request
but remember funtion modules of smart forms not
transfort.they have to generate in taget system.
name of sf may change on transport

483. if take one table with max no of records,in that i transfer


only three records to quality r production r anywhere how it
is possible?
ANS. by using TABINDEX

484. if idoc generated successfully where it can be stored i know


database)?
ANS. EDID4 - Data Records are Stored in this Data Base Table.
EDIDS - Status records are Stored in this DB Table.
EDIDC - Control Records are Stored in this DB Table

485. how to process the idoc?


ANS. idoc can be processed by using processing codes
transaction codes for processing codes:
we41 for out bound process codes
we42 for in bound process codes

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

select f1 f2 f3 from table1 into table wa_t1


slect l1 l2 l3 from table2 into table wa_t2
select e1 e2 e3 from table3 into table wa_t2

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.

488. difference between at new and on change of


pl its urgent?
ANS. 1.It can be used in any loop construct, not just loop at.
For example, it can be used within select and endselect, do
and enddo, or while and endwhile, as well as inside get events.
2. A single on change of can be triggered by a change within
one or more fields named after of and separated by or. These
fields can be elementary fields or field strings. If you are
within a loop, these fields do not have to belong to the loop.
3.When used within a loop, a change in a field to the left
of the control level does not trigger a control break.
4.When used within a loop, fields to the right still contain
their original values; they are not changed to contain zeros
or asterisks.
5.You can use else between on change of and endon.
6.You can use it with loop at it where . . ..
7. You can use sum with on change of. It sums all numeric
fields except the one(s) named after of.
8.Any values changed within on change of remain changed
after endon. The contents of the header line are not
restored as they are for at and endat

489. I want to give a input/output field on list, where can i


define it.
ANS. when you are writing that field.
ex: write:/ wa_fname input/output.

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.

491. If s1 and s2 are different structures how will u transfer


ANS. move corresponding s1 to s2

492. I have two structures s1 and s2 have same struture of


five fields each how can u transfer data from s1 to s2
ANS. s2 = s1.
or
move s1 to s2.(because both have same structure so, we
don't need move corresponding)

90
493. In data element how many domains were defined
ANS. one domain

494. How can you call a subroutine which is located in program A


from program B?
ANS. BY USING "INCLUDE" PROGRAMS WE CAN CALL A SUBROUTINE FROM ONE PROGRAM TO
ANOTHER,"INCLUDE" IS A EXTERNAL SUBROUTINE OBVIOUSLY.....

495. What is the use of event AT SELECTION-SCREEN ON FIELD?


ANS. We can give F4 help to selection field or restrict the F4
help for specific values.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_vaplz-low.
SELECT werks arbpl ktext INTO TABLE it_vaplz FROM m_crama
CLIENT SPECIFIED
WHERE mandt = sy-
mandt
AND werks
= '4000'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = c_vaplz
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = c_so_vaplz_low
value_org = 'S'
TABLES
value_tab = it_vaplz
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO Note --Validation is not
possible with AT SELECTION-SCREEN
ON FIELD, Because it comes before entering the value in
selection screen.
AT SELECTION-SCREEN event comes in picture after entering
value in selection screen, so validation is possible only
here.

496. What is the maximum value for Line-Size in the Report?


ANS. The maximum width of a list is 1023 characters.
You should keep lists to the minimum possible size to
improve useability
and performance(recommendation: LINE-SIZE < 132).
For very wide lists (LINE-SIZE > 255), you should consult
the notes for using LINE-SIZE greater than 255.

497. how to debug a screen without using


/h,break-point,debuging,stop.
ANS. Wite this code in a notepad
[FUNCTION]

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.

498. in which method i can upload data to two transactions?


and how?
ANS. Using session method you can upload data for 2 or more
transactions.The procedure is
1)open the session using FM : BDC_OPEN_GROUP
2)Insert the transaction using BDC_INSERT
repeat the second step for as many tcodes as you need just
by calling the FM : BDC_INSERT
3)End the session using FM : BDC_CLOSE_GROUP

499. can we write at-line-selection and at-user-command at a time


in same program.
ANS. YES BOT THE EVENTS ARE TRIGGERED IN THE SAME PROGRAM. AT
LINE SELECTION EVENT SELECT THE CURRENT ROW WHICH IS STORED
IN SY-LSIND. IF THE USER DOUBLE CLICK ON THE LINE THE AT
USER COMMAND TRIGERS. THIS CONTAINS THE FUNCTION CODE OF
THE FIELD.NOW YOU CAN CALL LIST SCREN THERE AFTER. SO ITS
MANDATORY BOTH THE EVENTS SHOULD TRIGGER IN ONE PROGRAM.

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.

501. Can we call one program(not include) from another program?


ANS. By using SUBMIT Statement.

SUBMIT <rep_name> USING SELECTION-SCREEN scr

SUBMIT <rep_name>
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM <rep_name>
AND RETURN.

502. what is difference between occurs1 and occurs2?


ANS. if its occurs 1 then only one record will be copied to the
internal table among the total number of entries selected
as the selection is restricted by the internation table.

if its occurs 2 then only 2 lines would be displayed or


fetched to the internal table.

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.

4) bY RUNNING THE TABLE MAINTENANCE GENERATOR THEN YOU CAN


MAINTAIN THE TABLE THROUGH SM30 DIRECTLY.

5) YES IF ITS A HUGE TABLE AND THE VALUES ARE RARELY


CHANGED.

6) THROUGH CALL FUNCTION AS BAPI IS A FUNCTION MODULE.

8)IN THE STATUS BAR WITH A COLOUR YELLOW

9) I GUESS A POP UP SCREEN OR THE STAUS BAR.


10) IF YOU DEFINE A FIELD NAME IN A WATCH POINT AND YOU RUN
YOU PROGRAM, IF THE VALUE IN THAT PARTICULAR FIELD CHANGES
THEN THE PROGRAM HAULT THERE. ITS VERY MUCH USEFULL FOR
DEBURGING.
11) THE SPOOL CONTAINS ALL THE PRINTING REQUEST. IT IS A
WORK PROCESS IN THE APPLICATION SERVER. YOU CAN SEE IT IN
SPAD T-CODE.
12) NO I DONT KNOW.
13) THROUGH RETURN CODE THAT IT EXPORT AFTER RUNNING.
14) RAISE A REQUEST THROUGH SO10 THEN THROUGH STMS
TRANSPORT.

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.

506. sy-field for internal table process?


ANS. SY-TABIX. IS USED TO PROCESS THE DATA IN INTERNAL TABLE.

507. which is not a table?

93
ANS. Structure is not table.
because it creates WorkArea and Body is same acts as
Header.and it is temp memory location

508. cardinality 1:6 wat view?


ANS. Database view or maintainence view..

509. how to send output of program via email?


Ans. REPORT ZSEND .

TABLES: KNA1.

* data for send function


DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.

SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.


WRITE:/ KNA1-KUNNR, KNA1-ANRED.

* send data internal table


CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY
SPACE.

APPEND OBJCONT.
ENDSELECT.

* insert receiver (sap name)


REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: SY-UNAME TO RECEIVER-RECEIVER,
'X' TO RECEIVER-EXPRESS,
'B' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.

* insert mail description


WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'


EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6

94
ENQUEUE_ERROR = 7
OTHERS = 8.

509. final entry BDC table?


Ans. BDC_CURSOR. can be the final entry of the BDC table.
Actually it depends on the transaction you are processing.
The Final entry in BDC Table is Save
for that BDC_CURSOR value is '/11'.

510. three jobs are there if one fails wat happens?


ANS. roll back and start all over again

511. wat does BDCRECXX contains?


ANS. this is a SAP Defined Include Program used in BDC.
It Contains
1) Subroutines to Populate the Data to BDCDATA Internal
Table
2) Subroutines to Open, Insert and Close The Session.
3) Subroutines to Call the Call Transaction.

512. one time loading 10000 records?


ANS. YOU CAN LOAD UPTO 65000 DATA AT ONE TIME COZ THE EXCELL
SHEET CONTAINS THAT MUCH OF DATA.

513. which is a statement used to write a record to a file in


ABAP?
ANS. DATA: MESS(60),
FNAME(10) VALUE '/tmp'.

OPEN DATASET FNAME FOR OUTPUT MESSAGE MESS.

SELECT * FROM TAB1.


ENDSELECT.

514. wat is a field symbol?


ANS. Field symbol is a pointer dynamically assigned to a field.
After assignment we can use the same field-symbol in our
program in place of actual field name.
Use FIELD-SYMBOL statement to define a field symbol &
use ASSIGN to assign a field to it.
The FIELD SYMBOL name must begin & end with angular
brackets.

Ex:- FIELD-SYMBOLS <f>.


ASSIGN f1 TO <f>.
Where F1 is a field defined in the program.

515. does select single *.. / select * .. affect performance ? how?


ANS. select single * ---> retrieves all the records in that
particular row defined by our selection citeria.
select * ---> retrieves all records from all the coloumns of
the table i.e., the entire table.

so the time consumed in retrieving all this information is

95
very high atleast in terms of programming and so it
significantly affects the performance.

516. will where conditions in a sql query help improve performance?


ANS. If a table has an index for a key in the order
f1,f2,f3 then from the point of view of performance
the where clause should specify the fields in the
same order
select ..
from ...
where f1 = v_f1 and f2 = v_f2 and f3 = v_f3.

Note that the MANDT is implicitly compared first in the


order, and if using CLIENT SPECIFIED queries, ensure that
MANDT precedes the list.

517. will sorted internal tables help in performance?


ANS. Yes definitly it increases the performance. When ever
binary se19.arch is used, sort the internal table.

518. will join conditions in sql queries affect perfomance? how?


ANS. THAT ENTIRELY DEPENDS ON THE CRITERIA YOU HAVE USED. IF THE
WHERE CONDITION HAVE ALL THE PRIMARY KEY FIELD THEN THE
PERFORMANCE WILL NEVER BE SLOW. ITS ONLY ADVISIBLE NOT TO
HAVE MORE THAN 5 TABLES IN THE JOIN OR ELSE THE PERFORMANCE
WILL BE SLOW.

519. what is the role of extended syntax check in performance tuning?


ANS. for extended syntax check, we used tr.code SLIN.
the main purpose is if we declare somany unnecessry
variables in our program ,then easyly we can find it
through SLIN.different ares are availavle like
check load tables,set/get parameter,package check,field
attributes,screen constincy etc.
go through slin .

520. what is the role of ST05 in performance tuning?


ANS. SQL trace
it tells how much microsecond does it is taking to execute
the program

521. what is the role of secondary index in performance?


ANS. If you cannot use the primary index to determine the result
set because, for example, none of the fields primary index
occur in the WHERE or HAVING clause, the system searches
through the entire table (full table scan). For this case,
you can create secondary indexes, which can restrict the
number of table entries searched to form the result set.

You should only create secondary indexes, for database


tables from which you mainly read, since indexes have to be
updated each time the database table is changed. secondary
indexes should contain columns that you use frequently in a
selection, and that are as highly selective as possible to
improve performance..

521. What are steps you follow to improve the performance of a

96
report ?
ANS.

521. What is performance tuning?


ANS. increasing effeciency of programs thru optimized coding
eg : select ... table itab...
instead of
loop at itab

select ,...into itab..


endloop
Performance tunning.

There are various steps to increase the performance of ABAP


report.

* should not use * in the select query ,instead use the


appropriate field names.
* In the occurs clause avoid using 0 instead use the number.
* try to use move-corresponding .
* use the aggregate statement.

522. difference betn top-of-page and top-of-page during at-


line-selection? in an interactive report, after going to 5th
list, can you come back to 2nd list? how?
ANS. Top-of-page event trigger when ever new page start or
when ever write statement trigger in the start-of-selection.
Top-of-page during line selection triggers when ever
secondary list displays.
By using Function Key F3 we can come back to 5ht list to
2nd list . [or]
at line-selection.
if sy-lsind = 5.
sy-lsind = 2.
endif.
write : / 'Secondary List:' sy-lsind .
U can also use AT PF#.
And the rest remains same.

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.

introduce a type group with type-pool.


maintain a type group via abap dictionary.

for simple alv:


slis_alv_fieldcatalog : populate the fieldcatalog
slis_layout_alv : it is for layout
slis_alv_events : it is for internal tables events

524. how to create a button in selection screen? how to add a gui


status in a selection screen?

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.

Data t_mara type standard table of mara.

or

types : begin of ty_mara,


matnr type mara-matnr,

98
mkart type mara-mkart,
end of ty_mara.
Data t_mara type standard table of ty_mara.

528. what does it mean occurs 0 while creating an internal table?


ANS. occurs 0 means a internal table will be allocated 8kb of
memory initially.if it needs more then again 8 kb of is
allocated to it

529. when do you need to create an internal table with header


line ?and with out a header line?
ANS. in this question we can proceed like this.
with header line.
data:itab like lfa1 occurs o with header line.
itab:internal table body.
with out header line:
data:begin of fs,
field1 like lfa1-field1,
end of fs.
these are syntaxes for both...but if u want to extract all
the fields from predefined table or exhisting table.. very
complex to write all field names in internal table
declaration.so that time use with header line syntax.

fields are very few..go for with out header


line..performance wise with out header line is better.

530. what is a binary search ? and how it is useful in a sorted


internal table?
ANS. The solution provided by Siddhart is though correct, I
would like to project the solution in a much detailed with
example.
Binary Search Basic rule - Sort the data in Ascending order.
Suppose we have random numbers ranging from 1 to 10000 and
we are searching for 4219. If the data is unorganized and
random....a sequential search would be time consuming.
Hence once the data is sorted in Ascending order. Binary
search would reduce the LOOKUP time.
In the FIRST PASS BINARY search would split the range of 1 -
10000 in to two halfs (i.e 1 - 4999 & 5000 - 10000) and
compares the 4219 which happens to fall in the first half.
In the next pass again two halfs are made and compared.
This way BINARY SEARCH works by dividing either data into
two halfs.
For internal table......or for anything else....this is it

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.

if t_marc is not initial.

select matnr mbrsh meins matkl from mara


into table t_mara
for all entries in t_marc
where matnr = t_marc-matnr.
else.
write : / 'No data was fetch by t_marc'.
endif.

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

533. can you create an internal table dynamically?(at run time)


ANS. Internal tables can be created dynamically using
object oriented abap.chek out the method
CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_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.

535. differences between events?


ANS. Events are Two types
1)List events Uesdt to disolay the outputlist.
Ex:End-of-Page,Top-of-page
2)selection Events:used to selecting the data from database
for validation and retrival.
Ex:At selction-screen,End-of-selection etc..

536. What is the difference between macro and subroutine?


ANS. 1.macro doesn't have any return statement...but a subroutine
can have ..
2.execution time needed for a macro is much lesser than
subroutine
3.memory requirement for a macro is generally heigher..
4.subroutine can be classified as stated in Previous

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

537. How can I make a differentiation between dependent and


independent data?
ANS. Client dependent or independent transfer requirements
include client specific or cross client objects in the
change requests. Workbench objects like SAPscripts are
client specific, some entries in customizing are client
independent. If you display the object list for one change
request, and then for each object the object attributes, you
will find the flag client specific. If one object in the
task list has this flag on, then that transport will be
client dependent.

538. What is Smart Forms?


ANS. Smart Forms allows you to create forms using a graphical
design tool with robust functionality, color, and more.
Additionally, all new forms developed at SAP will be created
with the new Smart Form solution.

539. What is CTS and what do you know about it?


ANS. The Change and Transport System (CTS) is a tool that helps
you to organize development projects in the ABAP Workbench
and in Customizing, and then transport the changes between
the SAP Systems and clients in your system landscape. This
documentation provides you with an overview of how to manage
changes with the CTS and essential information on setting up
your system and client landscape and deciding on a transport
strategy. Read and follow this documentation when planning
your development project.

540. What is ALV programming in ABAP? When is this grid used in


ABAP?PARAMETERS OF GRID DISPLAY?
ANS. ALV is Application List viewer. Sap provides a set of ALV
(ABAP LIST VIEWER) function modules which can be put into
use to embellish the output of a report. This set of ALV
functions is used to enhance the readability and
functionality of any report output. Cases arise in sap when
the output of a report contains columns extending more than
255 characters in length. In such cases, this set of ALV
functions can help choose selected columns and arrange the
different columns from a report output and also save
different variants for report display. This is a very
efficient tool for dynamically sorting and arranging the
columns from a report output. The report output can contain
up to 90 columns in the display with the wide array of
display options.

541. What are internal tables?


ANS. intermediate tables are called internal tables which exists
only during the runtime of program. two types of internal
tables are there,
1) internal table with header line

101
2) internal table without header line

542. What are the functional modules used in sequence in BDC?


ANS. These are the 3 functional modules which are used in a
sequence to perform a data transfer successfully using BDC
programming: BDC_OPEN_GROUP - Parameters like Name of the
client, sessions and user name are specified in this
functional modules. BDC_INSERT - It is used to insert the
data for one transaction into a session. BDC_CLOSE_GROUP -
This is used to close the batch input session.

543. What is an ABAP/4 Query?


ANS. ABAP/4 Query is a powerful tool to generate simple reports
without any coding. ABAP/4 Query can generate the following
3 simple reports:
Basic List: It is the simple reports.

Statistics: Reports with statistical functions like Average,


Percentages.

Ranked Lists: For analytical reports. - For creating a


ABAP/4 Query, programmer has to create user group and a
functional group. Functional group can be created using with
or without logical database table. Finally, assign user
group to functional group. Finally, create a query on the
functional group generated.

544. Difference between transparent tables and pooled tables ?


ANS. Transparent tables: Transparent tables in the dictionary has
a one-to-one relation with the table in database. Its
structure corresponds to single database field. Table in the
database has the same name as in the dictionary. Transparent
table holds application data.

Pooled tables: Pooled tables in the dictionary has a


many-to-one relation with the table in database. Table in
the database has the different name as in the dictionary.
Pooled table are stored in table pool at the database level.

545. What are indexes?


ANS. An index helps to speed up selection from the database. An
index is a sorted copy of selected database table fields.

The primary index is always automatically created in an


ABAP-based SAP system. It consists of the primary key
fields of the database table. This means, for each
combination of the index fields exists a maximum of one
record in the table. This kind of index is called a UNIQUE
index.

If the primary index cannot be used to determine selection


result, (for example, the WHERE condition does not contain
any primary index fields), the system searches the whole
table. To prevent this, and determine the selection result
by searching through a restricted number of database
records, you can create a secondary index.

102
However, you should not define an index for all possible
fields in the WHERE condition.

Creating a secondary index :


You can use the transaction ABAP Dictionary Change &#8594;
Indexes... &#8594; Create to create an index. To make the index
unique, select UNIQUE. To specify the fields that will
comprise the index, choose "Choose fields". Then save and
activate the index.
Optimal number of indexes for a table :
You should not create more than five indexes for any one
table because:
Whenever you change table fields that occur in the index,
the index itself is also updated.
The amount of data increases.
The optimizer has too many chances to make mistakes by
using the 'wrong' index.
If you are using more than one index for a database table,
ensure that they do not overlap.

546. What is foreign key relationship?


ANS. A relationship which can be defined between tables and must
be explicitly defined at field level. Foreign keys are used
to ensure the consistency of data. Data entered should be
checked against existing data to ensure that there are now
contradiction. While defining foreign key relationship
cardinality has to be specified. Cardinality mentions how
many dependent records or how referenced records are possible.

547. difference between cluster and pooled tables?


ANS. pooled tables: these r small small tables having 100
records in each of them!but, these tables were used for
storing the system data!in these tables there will be no
keys!these tables r having many - to - one relationship!
these tables r having different names which doesnt match
with database tables.

cluster tables: these r very large tables so many records


in each of them!but, these tables were used for storing the
system data!in these tables atleast one primary key will be
present to find the record!these tables r having many - to -
one relationship!

these tables were used by basis people to calculate the


system performance!

548. what is the syntax for eliminating duplicate values in


internal table.
ANS. First sort the internaltable using
Syntax:
Sort iTab using <field-name> Ascending/decending

Then Use the Delete adjacent Duplicate statement

Delete adjacent duplicate entries from <iTab> [comparing

103
<F1><F2>....]

549. what is the Tcode to send customer master data to another


system.
ANS. SEND MATERIAL MASTER: BD10
GET MATERIAL MASTER: BD11
SEND CUSTOMER MASTER: BD12
GET CUSTOMER MASTER: BD13
SEND VENDOR MASTER: BD14
GET VENDOR MASTER: BD15

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.

551. what is check statement


ANS. If you use the CHECK <expr> statement within an event block
but not within a loop, and the condition <expr> is not
fulfilled, the system exits the processing block
immediately.

<expr> can be any logical expression or the name of a


selection table. If you specify a selection table and the
contents of the corresponding table work are do not fulfill
the condition in the selection table, it is the same as a
false logical expression.

If you use the CHECK <expr> statement within an event block


but not within a loop, and the condition <expr> is not
fulfilled, the system exits the processing block
immediately.

If the CHECK statement occurs in a loop using DO, WHILE, or


LOOP, it is the loop that terminates, not the processing
block.

A subroutine normally ends at the ENDFORM statement.


However, you can terminate them earlier by using the EXIT
or CHECK statement.
In loop structures like

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

552. what do u mean by one to one relationship in the database of


transparent and many to one relation in pooled table could
ANS. Actually, SAP itself defines some pre-defined tables. All
these table details will be maintained in Data Dictionary.

For transparent table it is always one to one relation. It


means, there exist only one table in the DB for an table in
Data Dictionary.

For Pooled table it is always many to one relation. It


means, there exist only one table in the DB for more than
two table in Data Dictionary. Physically one table exists in
Database level, however the tables in Data Dictionary are
act as views. This concept is implement only to use by SAP
itself. In general, we dont make use of this concept. This
concept meant of better performance of the SAP application.

553. what are logical and physical databases?


ANS. LOGICAL DATABASE:
=================
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of
related tables to an ABAP/4 program.

Advantages: i)check functions which check that user input is


complete, correct,and plausible. ii)Meaningful data
selection. iii)central authorization checks for database
accesses. iv)good read access performance while retaining
the hierarchical data view determined by the application
logic. dis advantages: i)If you donot specify a logical
database in the program attributes,the GET events never
occur. ii)There is no ENDGET command,so the code block
associated with an event ends with the next event statement
(such as another GET or an END-OF-SELECTION).
Logical databases are special ABAP programs that retrieve
data and make it available to application programs. The most
common use of logical databases is still to read data from
database tables by linking them to executable ABAP programs.
Logical databases contain Open SQL statements that
read data from the database. You do not therefore need to
use SQL in your own programs. The logical database reads the
program, stores them in the program if necessary, and then
passes them line by line to the application program or the
function module LDB_PROCESS using an interface work area.
A logical database provides a particular view of
database tables in the R/3 System. It is always worth using
logical databases if the structure of the data that you want
to read corresponds to a view available through a logical
database.
The data structure in a logical database is
hierarchical. Many tables in the R/3 System are linked to
each other using foreign key relationships. Some of these

105
dependencies form tree-like hierarchical structures. Logical
databases read data from database tables that are part of
these structures.

Physical Database is actual Database.


554. what are conversion routines?
ANS. conversion routines are used to convert the fields either
from display format to SAP internal format or from SAP
internal format to display format.
For this the following routines are used.
Conversion_exit_xxxxx_input - display format to SAP
internal format.
Conversion_exit_xxxxx_output - SAP internal format to
display format.
we have to create the conversion routines while creating
domains.

555. difference between structure and append structure?


ANS. structure :
Either a structured type in the ABAP Dictionary or a name
for a structured data object in an ABAP program. You can
access whole structures or merely by component. In ABAP,
structures that contain only character-type, flat
components can also be treated as elementary data objects
in ABAP

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.

556. in session method sy-subrc is not returned whereas in call


transaction method sy-subrc is returned . what does it mean?
ANS. In both the case we can use "SY_SUBRC". It is system
defined object. "SY_SUBRC" is mainly used in BDC Call
Transaction and BDC Session. The "SY_SUBRC" object is used
whether the records are Successfully Inserted or not, for
that we can use "SY_SUBRC".

IF SY_SUBRC=0 -->Successfully Insert/Updated the records in


table.
IF SY_SUBRC=4 --->Not Inseterd.Updated the records in table.

In call transaction return the "SY_SUBRC",because records


are dump at a time. but where as Session not return.why,
because if any error occurs in the program it will not open
the first. i.e (BDC_OPEN_GROUP) so that it can't be read
the data from the table.

The main thing is initially it can't be open the table.

557. In select-options, how to get the default values as current


month first date and last date by default?

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.

SELECT-OPTIONS : s_data FOR sy-datum.

INITIALIZATION.
s_data-sign = 'I'.
s_data-option = 'BT'.
s_data-low = sy-datum.
lv_datum_low = sy-datum.

REPLACE SECTION OFFSET 6 LENGTH 2 OF lv_datum_low WITH '01'.


if sy-subrc eq 0.
s_data-low = lv_datum_low.
endif.

CALL FUNCTION 'LAST_DAY_OF_MONTHS'


EXPORTING
day_in = sy-datum
IMPORTING
last_day_of_month = lv_last_day_of_month
EXCEPTIONS
day_in_no_date = 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.
ELSE.
s_data-high = lv_last_day_of_month.
ENDIF.
APPEND s_data.

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.

select f1 f2 f3(key fields) from db into


iNtertab
for all entries in itab
where condition.
sort intertab by f1.
loop at itab.
read intertab with key f1 = itab-f1
binary search.
Endloop.

559. What are the output type and Tcodes?


ANS. In short : outtype type means type of output..Ex
print,fax,email,edi,ale..etc

This come into picture in Sapscript...and Idoc also ..

RSnast is the program used to precess all type of


output..and I believe the tcode for this program is BD15.

560. Among "Move" and "Move Corresponding", which is efficient one?

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

Move-Corresponding itab to lfa1.


(here:lfa1 is screen fields name).

* in case of MOVE stmt.

Move itab-lifnr to lfa1-lifnr.


Move itab-name1 to lfa1-name1.
Move itab-ort01 to lfa1-ort01.

Movecorresponding :
If DBtable having 1000 fields and you are using
movecorresponding, then system has to check all the field in
table to move.

561. What is pf-status?


ANS. Pf status is used in interactive report for enhancing the
functionality. If we go to se41, we can get menus, items and
different function keys, which we are using for secondary
list in interactive report.

562. What are Standard Texts?


ANS. Its a sapscript component ...
Tcode to define stand text is :so10.
1.Langauge specific..
2.Include z_Standard_text object id 'sds' lang 'df'.( this
type of statement is used in sapscript to include standard
text z_standard_text.)

3. we can call the standard text in se38 program


also ...using read _form fucntion module..

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.

Drill down report is nothing but interactive


report...drilldown means above paragraph only.

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.

Below messages are go to internal table. when you run the


call transaction.

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

567. What is runtime analysis? Have you used this?


ANS It's checks program execution time in microseconds. When you
go to se30. if you give desired program name in performance
file. It will take you to below screen. You can get how much
past is your program.

568. What is the advantage of structures? How do you use them in


the ABAP programs?
ANS. you can make the structure as a separate table by referring
an internal table for that structure, we can add fields
from various transparent tables,hence we can use it for
various purposes.

569. An ABAP program creates a batch input session. We need to


submit the program and the batch session in back ground. How
to do it?
ANS. go to SM36 and create background job by giving job name, job
class and job steps (JOB SCHEDULING)

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.

571. In Function module SAP provieds Two Standard Exception,

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.

2. for all entries select statment should have all primary


kyes in where clause.

3. it is good for small data but for larg data it is not


good to use.

573. What are AUTHORITY OBJECTS ?


ANS. Authorization Objects,
1) Protects actions and access data
2) Allows various users to perform various complex checks
with varous conditions.
3) Conditions are descibed in Authorization Fields which
are specified 10 at the max.

574. what is the use of free and refresh?


ANS. Refresh : Refresh clears the data, at the same time it
releases dynamically allocated memory. Predefined memory
not released.

Free : Free clears the data, at the same time releases


both predefined and dynamically allocated memory. internal
table structure will not available any more.

575. What is the difference between Collect statement and Append


Statement?
ANS. Append adds the record at the end of internal table.
Collect sums up the numeric fields of the records whose
primary keys are equal and adds it as a single record i.e
To fill an itab with lines which have unique standard keys
we use collect statement.If an entry with the same key
already exists,the collect statement does not append a new
line as append statement but adds the contents of the
numeric fields in the work area to the contents of the
numeric fields in the existing entry.

576. What are client dependent objects in ABAP or sap?


ANS. Client Dependent objects r those objects whose records
entered in one client for a client dependent table the same
record is not visible for in any other client .
eg: SAP Script , text element, and some DDIC objects
Client Dependent Object are those objects whose
Functionality is restricted to a particular client.

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.

The work processor contains screen processor, abap


processor and flow logic.

ABAP processor process the abap code.

For each request in workprocessor contains user context and


roll area.
Roll area contains program name, variables, memory area,
dyanmic variables, etc.

579. What is the main point while using control break in


internal table ?
ANS. Field for which we are using the control break should be
the first field of the internal table.

Internal table should be sorted on the field for which we


are going to use the control break statment.

580. what is the code for basic list to 2ndry list?


ANS. Hi first retrive the data for basic list(from KNA1) after
that write the fallowing code.

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.

SORT T_VBAK BY VBELN.


NEW-PAGE LINE-COUNT SY-SROWS.

LOOP AT T_VBAK INTO W_VBAK.


WRITE:/10 SY-VLINE, W_VBAK-VBELN ,
35 SY-VLINE, W_VBAK-ERDAT,
55 SY-VLINE, W_VBAK-ERNAM,
67 SY-VLINE, W_VBAK-NETWR, 90 SY-VLINE .
HIDE W_VBAK-VBELN.
WRITE:/10 SY-ULINE(81).

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.

582. Function Module for smart forms?


ANS. use 'SSF_FUNCTION_MODULE_NAME' in this u can pass ur
smartform in report

583. How to get the no of records using select statement?


ANS. data: wa_t001 type t001,
t_t001 type table of t001.

select * into table t_t001 from t001.

loop at t_t001 into wa_t001.


write: no.of records sy-tabix.
endloop.

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.

Things to be considerd when working with 'for all entries':

1)Make sure that the select contains atleast the primary key
fields

2)IF NOT <ITAB> IS INITIAL. is a mandatory check before FOR


ALL ENTRIES.

584. what are the Pre requisites for binary search?


ANS. The pre-request for binary search is you have to do SORT the internal
table. Then use binary search for the internal table. otherwise performance
issue for the internal table.

585. what are the diff page formats available in SMARTFORMS ?


ANS. Page formats in Smartforms : Landscape and Portrait.

586. what is meant by serialization ?


ANS. Serialization plays an important role in distributing
interdependent objects, especially when master data is being
distributed. IDocs can be created, sent and posted in a
specified order by distributing message types serially.
Thus Errors can then be avoided when processing inbound IDocs.
Types of Serialization:
Interdependent messages can be serially distributed in the
following ways:
• Serialization by Object Type
• Serialization by Message Type
• Serialization at IDoc Level (Not for IDocs generated

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

append wa_final to i_final.


enddo.

588. How do you monitor sessions?


ANS. 1.Goto SM35, select the session and press F2 to monitor the
processing details.

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

( Above configuration required irrespective of sending or


receiving an IDOC).

Mandatory Outbound Configuration:

Matain Distibution Model -- BD64


Maintain Partner Profile -- WE20

590. How to put checkbox against a row in ALV display?


ANS. CLEAR s_layout.
s_layout-box_fieldname = 'FLAG'.
s_layout-box_tabname = 'INTTAB'.

DATA : BEGIN OF inttab OCCURS 0,


flag(1),
...
end of inttab.

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.

593. There are 4 internal tables containing data. How to put it


into a final table?
ANS. u have to do by loop the internal table which having more records compare
to other internal table. Then read the other internal table by using read
statement.After that move the records into final internal table.

594. How do you create secondary index. Do you have access to


create secondary index?
ANS. Creating Secondary Indexes

Procedure

In the maintenance screen of the table, choose Indexes.


If indexes already exist on the table, a list of these indexes is displayed.
Choose .

In the next dialog box, enter the index ID and choose


The maintenance screen for indexes appears.

Enter an explanatory text in the field Short text.


You can then use the short text to find the index at a later time, for example
with the R/3 Repository Information System.

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.

596. Events in Reporting. Which events we can ignore while coding.


ANS. we can ignore Start of selection,should not be preceeded by
any Event.

597. Under which event we can make a filed disappear on selection


screen.
ANS. Under AT SELECTION-SCREEN OUTPUT.

115
loop at screen.
if screen-name = 'P_MATNR'.
screen-active = '0'.
modify screen.
ENDIF.
endloop.

597. How many records a Read statement will retrieve?


ANS. Actually read statement for fetching only single record from
internal table,if you are declaring ( with key,index) with
read statement ,then you can focus the exact
record,otherwise it will take the 1st index record by default.

if you want more than a record,using loop statement,you can


get it.

598. n an internal table you want to modify content of a


particular field in a row. How to do it?
ANS. First apply 'loop' or 'read' on the table to fetch that row
into the work area. overwrite the field value by passing
the data u want to modify with. Finally use the statement
given below.

If changing 1 or 2 fields, Better use


Modify itab from wa index sy-tabix transporting 'fieldname'.

If changing more fields


Modify itab from wa index sy-tabix.
MODIFY <Internal Table> transporting <FIELD (in INTERNAL TABLE)>

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)

600. How do you generate interactive lists in ALV?


ANS. in FM reuse_alv_grid_display
pass the value to the foll. parameters,

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.

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

602. What is NAST Table, what it will consists?


ANS. 'NAST' is a transaparant table.It is the table for Message

116
status.It consists of applicationof message conditions,
message type, message language etc.

603. how to transport abap workbench objects


ANS. SE09 transaction is for workbench transport request wherein
the developers can track their changes or modifications to
the workbench objects .
604. loop 5 times.
sy-tabix,sy-index.
endloop.
what is the output?
ANS. By looping 5 times(if the internal table has 5 records),
sy-tabix will be 5 and sy-index = 0.

sy-index will work only in do and while loops, where as


sy-tabix will work only in loop..endloop and also sy-tabix
will be changed if we append the records into the internal
table using append statement.

605. what is Composite key in table creation? what is the use?


ANS. A composite key consists of two or more columns, designated together as a
table's primary key. Multiple-column primary keys can be defined only as
table-level constraints:

A composite key has more than one attribute (field).

Used in database management systems as a key which has two or more fields in
the columns in the table, or in a file.

607. differences between the sorted ,standard, hashed tables.


ANS. 1.Standard Internal Tables: These tables have a linear index
and can be accessed using the index or the key. The response
time is in linear relationship with number of table entries.
These tables are useful when user wants to address
individual table entries using the index.
2.Sorted Internal Tables: These tables also have an index
and the key. But, the response time is in logarithmic
relationship with number of table entries, since it uses
binary search algorithm instead of linear search. These
tables are useful when user wants the table to be sorted
while additional entries have to be added.
3.Hashed Internal Tables: These tables have no index, but
have the key. The response time is constant irrespective of
number of table entries, since it uses a Hash algorithm.
These tables are useful when user wants to access the
entries with key only.

608. which table contains the details of all Tcodes?


ANS. TSTC ---> table for Tcodes
TSTCT---> table for Tcodes with text

609. Are programs client dependent?


ANS. NO, THE PROGRAMS ARE CLIENT INDEPENDENT BECAUSE, AS THIS
SOFTWARE IS PLATFORM INDEPENDENT SO ANY CLIENT CAN USE ANY
PROGRAM FROM ANYWHERE.

610. what is the functionality of Runtime Analysis?

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.

613. How to populate signature in smartforms?where can we upload


the signature?is der any tcode for it?
Answer
INSERT-->GRAPHICS--->graphics means it takes BMP so here u
have to add ur BMP file.

digital Signature : upload this digital Signature image to SAP .

u have to two ways to upload image into SAP.


1.RSTXLDMC : which converts TIFF file to Standard text.
2.SE78 : which take BMP file into SAP and u can directly
call this BMP in Smartforms.

614. i want to populate 10 fields in smartforms..uptil 9th it is


taking but 10th one is not populating?what might be the
reason?
ANS. Main window may not have enogh space...

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.

DATA: AD(10) TYPE C, " before Decimal


BD(10) TYPE C. " After Decimal

SPLIT VALUE AT '.' INTO BD AD.

IF AD+0(1) GE 5.
BD = BD + 1.

ELSE.
BD = BD.
ENDIF.

617. WHAT IS COMPOSITE KEY??


ANS. A table can have one or more primary key columns. EX: MARC
(It contains both material number and plant as primary key)
and When you have such a table which define more than one
column as your primary key, then it is called a composite
primary key.

618. what is the use append structure?? in data dictionary


ANS. In Append structure means you have add fields into standard
tables or other database tables..
ex:

1. first customize that Existing database,


2. added some field to exiting database. using append
structure.

619. what is the use of lock object??


ANS. Lock objects are use in SAP to avoid the inconsistancy at
the time of data is being insert/change into database.

SAP Provide three type of Lock objects.


- Read Lock(Shared Locked)
protects read access to an object. The read lock allows
other transactions read access but not write access to
the locked area of the table

- Write Lock(exclusive lock)

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.

- Enhanced write lock (exclusive lock without cumulating)


works like a write lock except that the enhanced write lock
also protects from further accesses from the
same transaction.

You can create a lock on a object of SAP thorugh


transaction SE11 and enter any meaningful name start with
EZ Example EZTEST_LOCK.

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.

Example: in HR when we are enter a personal number in


master data maintainance screen SAP can't allow to any
other user to use same personal number for changes.

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.

You have to use these function module in your program

620. 1)How many


layou types we have in smartforms & difference between them..?
2)how to do pagebreaks in SMARTFORMS..?
3)Do we develope Smartform from scratch or do we use
standard smartforms in real time..?
ANS. 1)layout type is one which we can modified the existing
one or developed the new one from scratch.
2)in smartforms we will do the page breaks using of the
command.
3) in real time it will depends on the requirement if
client if the standard available we will continue with
standard it is not available we will develope form scratch.

621. What is a difference between - RETURN, EXIT, CHECK, STOP &


REJECT - To leave the processing blocks
ANS. STOP: This terminates the block and executes end-of selection.
EXIT: It terminates the loop processing and process the next
statements.
CHECK: It evaluates the subsequent logical expression if it

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 .

623. What is the difference between At first and On change


control command.
ANS. At fist : It Compare Previous Record. but it only use with
in loop.
On change : It compare with auxiliary memory.but it can use
out side loop.

624. If we put Top of Page in between Start-of-selection and


End-of-selection and what happenes
ANS. Nothing will happen!
the run time system picks up the events always in its pre-
defined order.eventough you code any event in any order
always right event is picked and processed.

625. we can write the select query or any code after the end of
Selection. WHAT HAPPENED?
ANS.

626. how do you send the BDCDATA table in a Call Transaction


statement
ANS. CALL TRANSACTION <tcode>
USING <bdc_tab>
MODE <mode>
UPDATE <update>
<tcode> : Transaction code
<bdc_tab> : Internal table of structure BDCDATA.
<mode> : Display mode:

627. if i remove the select stmt from start-of-selection and put


the select stmt in end-of-selection it is triggering then
what is the use of start-of-selection?
ANS. Actually Start-of-selection is a default event that's been
triggered while executing a ABAP Report or Program. Here if
you've used Initialization event or AT Selection Screen
event, then you need to mention the Start-of-Selection event
explicitly. The use of Start-of-Selection is to fetch the
data from the database.

628. How do u do performance analysis means and what is the

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.

Code inspector is a tool that gives PERFOEMANCE OF PROGRAM.


syntactical check
security check
performance check
search func.

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.

630. what are the variants in alv reports ?


and what is the use of reuse_alv_variants_get ?

and what is the purpose of i_save parmaetr in the


resue_av_grid-display funmodule?

what is the purpose of reuse _av_default_varinat_get ?


ANS. Variants in ABAP are like any other variants that we use in
ABAP. It helps us get a default value on our screen fields.
In short, it works like saving your pwds on your mail accounts.

The reuse_alv_default_variant_get helps you to give a


default value( had you mentioned in the program ) to your
screen field. This default variant is generally stored in
the struc CS_VARIANT of your program.

i_save in reuse_alv_grid_display : As mentioned above


cs_variant from the reuse_alv_default_variant_get is passed
to your functional module via i_save..
If i_save = '' variants cannot be saved.
i_save = X std save mode.
You also have modes like U and A.

631. How we will handle the Page Breaking in Smart Form?


ANS. We can do page-break forcibly in smart-forms using
command node. and also every node has general properties

122
tab. on that tab we have to check the check box 'pagebreak'.

632. querry is as follows How to trigger


the page break in smartforms forcibly ? and how to trigger
the page break in the scripts forcibly ? means for every 10
records i have to trigger the page break ? and in smart form
also ?
ANS. in SMARTFORMS.

as of me we have to use 'command' from


create------->flowlogic---------->command.

but dont write command node in main window

by using this u can do page break.

in SAPSCRIPTS u have to use FM 'contorl_form'

CALL FUNCTION 'CONTROL_FORM'


EXPORTING
command = new-page
* EXCEPTIONS
* UNOPENED = 1
* UNSTARTED = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

633. what exact functionality of the END-OF-SELECTION event?


and in a report im using the END-OF-PAGE and
END-OF-SELECTION events which one will triggers first?
ANS. END-OF-SELECTION is the last of the events called by the runtime
environment to occur. It is triggered after all of the data from the
logical database, and before the list process is started.END-OF-
SELECTION occurs only once and its a Runtime event.

END-OF-PAGE is an Output Event used for page footers.


This event is triggered when the system encounters insufficient space
on the current output page.
The LINE-COUNT statement within the REPORT statement specifies the
size of the page area.
If a LINE-COUNT is not explicitly coded, the END-OF-PAGE event block
will not be processed.

634. how can i transport a idoc from development system to

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.

It's possible to generate an IDoc with out creating a


distribution model.

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.

Another example is when there is a table with many fields


and it does not make a lot of sense to see all of them
together everytime, it is better we project only certain
columns that we want to see.

There are four types of views:


a) Database View (Generally used a a read only view)
b) Maintenance View (Used as a means to maintain the
underlying tables participating in the view)
c) Projection View (Single table view)
d) Help View (used in 'search helps' got by pressing F4)

636. Difference between Maintanance view, Help view, Data Base


View and Projection View?
ANS. Maintenance View: Created by joining two or more related (by
foreign key) tables. Join conditions are always using the
foreign key. Data can be changed, viewed and created using
such maintenance views. This type of view implements outer
join (where those records that do not have a corresponding
entry in some of the tables participating in the view also
show up) against database views that implement inner joins
(where the user sees only records which have a corresponding
entry in all tables participating in the view).

In tcode SE54, generate table view, and select view type as


'maintenance view'. More information is available in
manuals/books on how to create a one step and two step
maintenance view.

A database view can be READ only (formed by joining two or


more tables) and of course, if the appropriate option is

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.

Projection View is formed out of exactly only one table and


it is a projection view (selective columns are displayed
from the table).

Help views also implement an outer join in the tables


participating in the view. Typically these are used when one
creates a F4 help in a field of a data entry screen. A
database view could also be linked to a search help but must
be avoided because database views use an inner join and
therefore some records may get hidden and may not therefore
really HELP.

637. How to get the table name from a field?


ANS. we can find the table for a specific field from table DD03L which
will contain all table names for corresponding fields.

638. tell me ddic objects


ANS. tables, structures,views,data elements,domains,lock
objects,search helps etc

639. how we link two fields by using foregin keys


between two tables in sap abap?
ANS. Go to Se11, Give your table name click display.

You will find attributes tab, delivary and maintance tab,


fields, entryhelp/check tab and currency/quantity filed tab.

In that select entryhelp/check tab.

click foregin key check box for which field you to define
foregin key relatiobship.

640. how to maintain the quantity field in bdc


ANS. FVAL is the quantity field of an internal has a structure of
BDCDATA.
It is reference field to bdc_field subroutine.
fnam and fval are its reference fields.

641. What is the difference between Search help and Match code ?

ANS. Search Help:


is used to retrieve the possible values for the
database field from the database. by pressing the function
key F4 .

Match code:

is used to retrieve the search paths for the


database field.

125
Search Help - use Check table concept
match code - uses the value table cocept

642. What is the SD Flow in SAP.Can you explain with Transaction


codes...
ANS. Enquiry VA11
Quatation vA21
Sales Order VA01
Delivery VF01
Billing VL01

643. What's the use of AT PF event?


ANS. When the user chooses a function code PF<nn> (<nn> can be
between 01 and 24), the system always triggers the AT
PF<nn> event. In the standard list status, the function
keys F<nn> that are not reserved for predefined system
functions all have the function code PF<nn> as long as a
corresponding event block is defined in the program.

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.

If you use these event blocks at all, it should only be for


temporary test versions. In production programs, you should
only use AT USER-COMMAND with a dialog status of your own
to assign function codes to function keys. When you use
your own interfaces, the system displays a function text
explaining what the function does. This does not happen
when you use AT PF<nn> event blocks.

644. why cluster tables are not buffered?


ANS. Cluster tables is acombination of less no. of large tables.
Higly updated tables cannot be buffered,hence cluster
tables cannot be buffered.

645. Can we create a search help for a particular user ? if


yes..How ?
ANS. It is not possible for user.

646. difference between at selection-screen and at


selection-screen output?
ANS At selection screen is used to validate input..

at selection screen on output is used to set screen attributes

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.

*val....1 Variant check


* Once the user has entered variant, check about its existence
PERFORM CHECK_PVAR. "Using FM REUSE_ALV_VARIANT_EXISTENCE
*val....2 Sd do not exists
SELECT SINGLE VBELN INTO WA_HEADER-VBELN FROM VBAK WHERE VBELN IN
S_VBELN.
IF SY-SUBRC 0.
MESSAGE E010 WITH TEXT-010.
ENDIF.
*val.....3 Date of creation check
LOOP AT S_DOC.
IF S_DOC-LOW > SY-DATUM OR S_DOC-HIGH > SY-DATUM.
MESSAGE E011 WITH TEXT-011.
ENDIF.
ENDLOOP.
*VAL....4
if P_DOWN = 'X' AND P_PATH is initial.
MESSAGE E011 WITH TEXT-011.
endif.

if P_DW_RP = 'X' AND P_path is initial.


MESSAGE E011 WITH TEXT-011.
endif.

647. can we transport text elements and text symblos in reports


from devlopment to quality?is it necessary?
ANS. once we created text element or text symbols..we must
assign text element to transport request through program
RSTXTRAN.

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.

Number of lines currently displayed in a table control.It


Can be used to determine the step loop blocks in the screen
and for scrolling functionality.

127
649. How to put page-breaks in smartforms?

ANS.in smartfoms under loop statement in data tab select event


on sort end checkbox .then one event on sort end node will
be displayes just right click on this node & select
command option . then in command select go to new page
checkbox & give new page name .

650. What is collect statement?explain with example?


ANS. if an entry with the same key already exists, the COLLECT
statement does not append a new line, but adds the contents of
the numeric fields in the work area to the contents of the
numeric fields in the existing entry.

651. Is der any other criteria for using For All Entries except
if not itab is initial?
ANS. In case of FOR ALL entries,

1. Move the contents of the internal table to a local


internal table.

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.

652. WHY WE NEED TO CREATE A PORT IN ALE IDOCS?


ANS. port number is used to communicate the sender and
receiver ,it is used to carry the data from sender to
receiver system,one receiver can have more port numbers,it
is the way of path.we can create a port number in we21 t-
code

653. Difference between SY-CPROG and SY-REPID?


ANS. SY-CPROG : ABAP program, caller in external procedures
SY-REPID : Name of the Report program

654. How to debug smartforms?

ANS.

657. If i double click on any sales order no it sud take me to


the transaction how?
ANS. Use AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SONo'.
GET CURSOR FIELD FNAM VALUE FVAL.
SET PARAMETER ID 'VBE' FIELD VBELN.
CALL TR VA01 AND SKIP FIRST SCREEN.

128
658. How to write file to application server?
what is file handling?
ANS. ABAP contains three statements for working with files:

OPEN DATASET for opening files


CLOSE DATASET for closing files
DELETE DATASET for deleting files
Read dataset <file> for output.
loop at itab into wa.
transfer wa into <file>.
endloop.
close dataset <file>.

659. I want to disable a field in selection screen so that it


does not appear while displaying.How can i do that?wat wud
be the code?
ANS. PARAMETERS: LIFNR like LFA1-LIFNR MODIF ID 'ABC'.

AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP_NAME = 'ABA'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

660. In Interactive Report : How to come from Secondary List 10


to secondary list 4? what is the Program code?
ANS. from list index 10 to come bck to list index 4 we can use the
code as follows.....put some function code button on application or
menu tool bar then code as below

case 'FNCODE'.
when CLICK
CHECK LSIND = 10.
LSIND = 4.
endcse.

661. I have 2 radio buttons with 2 fields each on selection


screen.My requirement is like if click on 1st radio button
the second radio button field should be disabled and and
vice versa.How can i do that?
ANS. AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN
IF R1 EQ 'X' AND SCREEN-GROUP EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF R2 EQ 'X' AND SCREE-GROUP EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.

129
ENDIF.
ENDLOOP

662. What will happen if i dont use initialization and start of


selction event in report?
ANS. Nothing will happen system takes by default those events..

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

664. what is the difference between se16 and se17 ???


ANS. The difference between se16 and se17 is
1. se16 icons will be available application. by pressing
left corner Icon(f7) TABLE CONTENTS. it will display pop up
window in that win we can choose the required fields.

2. se17 no icons will be available after giving the table


name we have to press enter. then another screen will come
we have to give X below (output) for the fields to be
displayed. Then we have to execute it will display those fields.

665. what are nodes in smart forms?


ANS. There are diff nodes avilable in SF like:

-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

668. Why is bdc _cursor and GET_Cursor used?

ANS. BDCDATA-FNAM ='BDC_CURSOR'.


BDCDATA-FVAL ='fieldx'.

Then Enter value for the corresponding field.

Eg :
PERFORM bdc_field USING 'BDC_CURSOR'
'CSKSZ-KOSTL'.

PERFORM bdc_field USING 'CSKSZ-KOSTL'


record-kostl. "value
669. what will happen if you dont give any value in parameter and
select options in report??will it fetch any value?
Answer
IF you not specify any value in prameter then select query
will fetch only those records where condition value is
space or zero.
If you not specifed any value in select-options, select
query will fetch all records.

670. Is der any any alternative Statement instead of HIDE which u


can use in reports?
ANS. 1. Hide.

2. '&ic1' which is used with sel_field by declaring like sy-ucomm.

131
671. What is the use of AT Selection Screen output when we have
At selection screen?Can u explain?
ANS. AT SELECTION-SCREEN.

The event AT SELECTION-SCREEN is the basic form of a whole


series of events that occur while the selection screen is
be.ing processed.

The standard selection screen in an executable program or


in the logical database linked to it is automatically
called between the INITIALIZATION and START-OF-SELECTION
events. When you call the selection screen, and when users
interact with it, the ABAP runtime environment generates
selection screen events, which occur between INITIALIZATION
and START-OF-SELECTION.

AT SELECTION-SCREEN OUTPUT

event is triggered. This event block allows you to modify


the selection screen directly before it is displayed.

672. What is the difference between OpenSQL and Native Sql?

ANS. OPEN SQL

Open SQL allows you to access all database tables known to


the SAP system, regardless of the database manufacturer.
Sometimes, however, we may want to use database-specific
SQL statements called Native SQL in the ABAP/4 program.

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.

673. what is difference between break and watch point


ANS. BREAK POINT

The BREAK POINT is a debugging aid. When we run a program


normally, it is interrupted at the statement, and the
system automatically starts the debugger, allowing you to
display the contents of any fields in the program and check
how the program continues. If the program is running in the
background or in an update task, the system generates a
system log message.

WATCH POINT

132
Indicator in a program that tells the ABAP runtime
processor to interrupt the program at a particular point.

674. What is a Text Table?


ANS. ABAP programmers are often suppose to save language
depended data within ABAP applications. One of the possible
way how to store such a data is to create a text table for
transparent table in ABAP dictationary tool (TA code: SE11).

675. What is the difference between At New and On change Of


inside a loop??I want inside a loop difference not basic
difference??
ANS. 1.at new is always followed by single field.
eg: AT NEW MATNR.
if any changes in matnr occurs at new event triggers.
at this case right side fields of matnr appears like
this.right side character fields appears like **** &
numeric field become null in work area.

2.on change of follows by single or more fields.


eg: ON CHANGE OF MATNR OR LABST OR WERKS.
here any change in any field on change of event
triggers.here we can see all fields in work area.

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

677. If i have locked a program using Locking and iam in


bangalore.How can i give authorization to other user to use
my program who is another place say Pune?is it possible?
ANS. f you wish to Lock or UnLock a program Editor Lock it can
be done by the program given below. The SAP System Table
TRDIR has a field called EDTX which is basically the EDITOR
lock filed. Edit Lock facility is given in the PROGRAM
ATTRIBUTES. The EDITOR LOCK is a check box given in the
PROGRAM ATTRIBUTES. If this field is SET then the program
gets locked and if this is Unchecked the the program is
unlocked.

If the EDITOR lock is ON then only the program's author


user who has created the program can edit it. Please find
the program below.

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.

* Select the entered Program


SELECT SINGLE * FROM TRDIR WHERE NAME = P_PROG.

* Set/Remove the lock


TRDIR-EDTX = P_EDITOR.
MODIFY TRDIR.
IF SY-SUBRC EQ 0.
WRITE: / 'Editor Lock update Successful ', TRDIR-NAME.
IF TRDIR-EDTX = 'X'.
WRITE: ' Lock'.
ELSE.
WRITE: ' UnLock'.
ENDIF.
ELSE.
WRITE: / 'Editor Lock update Unsuccessful ', TRDIR-NAME.
ENDIF.

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

679. how we can moddify a internal table without using modify


statement
ANS.
how can you expect the system to modify an interanl table
without we write a code which is given by the ABAP Key
words.

please use modify statement.


and i think even if you use field symbols then also the FS
will not modify your internal table.

134
may subroutines if you pass the value by reference and the
form gets executed till the end , you may modify the values.

hope this will serve your purpose.

and then also if ur rigid to use modify statement then


Use Field Symbols

Something like this

DATA : itab TYPE TABLE OF string,


wa TYPE string.

FIELD-SYMBOLS : <wa> TYPE string.

wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.

LOOP AT itab ASSIGNING <wa>.

<wa> = 'DEF'.

ENDLOOP.

680. what is the diffrence between inner and outer join


ANS. difference between inner join and outer join is:

inner join means it selects same data only in both the


tables
outer join means first it selects same data and second it
selects different data from the both tables.

Outer Join:

There are three types of outer joins namely:


>>Left Outer Join---For retreiving all the columns from the
first table irrespective of the column match.
>>Right Outer Join---For retreiving all the columns from
the second table irrespective of the column match
>>Full Outer Join---For retreiving all the columns from
both the tables irrespective of column match.

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.

we have to write form definition in our program like below:


form sub3 using sy-ucomm like sy-ucomm
field type slis_selfield.

As slis_field is a structure, it contains the whole


information about the field we have selected like field-index,
field-fieldname,field-fieldvalue............

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:

AT SELECTION-SCREEN (without additions)

START-OF-SELECTION

GET

You leave these event blocks via STOP, and the runtime
environment triggers the event END-OF-SELECTION.

CONTINUE : The CONTINUE statement can only be used in


loops. If it is used, the current loop pass is ended
immediately and the program flow is continued with the next
loop pass.

CHECK : If the statement CHECK is executed in a loop and


log_exp is incorrect, the statement CHECK immediately
terminates the current loop pass and the program continues
with the next loop pass. For log_exp, you can specify any
logical expression.

Note
Outside a loop, the statement CHECK exits the current
processing block

EXIT ; If the EXIT statement is listed within a loop, it


leaves the loop by ending the current loop process. Program
execution is continued after the closing statement in the
loop.

Note
Outside of a loop, the EXIT statement leaves the current
processing block.

AT EXIT-COMMAND : it is used in module pool programming to


leave the screen without entering madatory fields.it is the
1st module in pai.

683. he material no,and sales orde


number?in which table conpany masterdata will store?

136
ANS. for Sales Order : Vbak and vbap
for Material: mkpf, mseg

684. how can u highlight perticular row in report programming?


ANS. By using hotspot..
eg.
Hotspot on.
<ur field>
Hotspot off.

Now to perform action after selection use :


At Line Selection.
if sy-lsind = 1 < to track current page number>
///write ur code
endif.

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 :

Suppose u write modify <DDIC Table > from <work area>


then it will modify the row with same primary key value as
that of work area. But if it donot find any row then it will
NOT insert the work area row in DDIC table,

whereas,
update statement will insert a new row at last in DDIC Table.

686. In select-options,how to make high as madatory.....?if we use


obligatory we'll get the low as madatory by default?
ANS. Yes,You are right.If we write statement as :
Select-options : vbeln for vbrk-vbeln obligatory.
then low value gets mandatory.

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.

In the report this field will be displayed in the edit


mode...

688. What event is trigger wen screen is displayed?Before


displaying Initailization and Pressing enter At selection-
Screen..............But at the selection displayed and we are
entering values naa that time?
ANS. LOAD-OF-PROGRAM :
=================
The Purpose of the load-of-program is to load the program
into system memory so that the program can be executed.

INITILIZATION:
===============
This triggers when the program is loaded into memory to
initilize the values.

=> When you execute program load-of-program must be


triggered and initilization event exist in the program then
it triggers next.

689. When we copy any Driver Program from Nace............when we


copy into zprog,when we activate how it was linking to that
particular std layout............what happening to the
previous driver prog?
ANS. In The NACE transaction you have to provide zprogram name
and standard Form. System will take care of linking the form
to the zprogram.

But We should not modify a Driver Program. Instead of


modifying Driver program, Using external subroutines we can
write code for the print program without modifying tha
standard Driver Program.

Incase if you want to modify the standard driver program you


can copy the program and you can modify it. After changing
the Driver program configurations has to maintained in NACE
transaction and provide modified changed program in the NACE
for the standard Form. But it is not recommended to change
print program.

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.

692. What is the purpose of buffering? How many types of buffering?


ANS. Table buffering is used to increase performance when reading data
from database table. Data from a buffered table is read from a local
buffer on the application server thus reducing database access.

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.

693. Waht is "READ TABLE" command?? Whats the use of it??


Whats the syntax of the same?
ANS.
SORT it_tab2 BY fname1 fname2.

LOOP AT it_itab1 into wa_itab1.


READ TABLE it_tab2 into wa_itab2
WHERE fname1 = wa_itab1-fname1
fname2 = wa_itab1-fname2
BINARY SEARCH.
IF SY_SUBRC = 0.
Do the processing.
ENDIF.
ENDLOOP.

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.

695. "What is NAST Table, what it will consists?"


'NAST' is a transaparant table.It is the table for Message
status.It consists of applicationof message conditions,

139
message type, message language etc.

696. what is the procedure for direct I/P method?


ANS. In case of direct input method validations will be done
based on pre-defined function modules.
PRE-DEFINED DIRECT INPUT PROGRAMS:
1.RMDATIND:Direct input program on material master
application
2.RFBIDE00:Direct input program on customer master
application
3.RFBIKR00:Direct input program on vendor master
application.
procedure for direct I/P method on MATERIAL APPLICATION
-------------------------------------------------------
RMDATGEN is the program to download data from material
master application to flat file.
1.go with se38.
2.provide name:RMDATGEN
3.PRESS F8.
4.let us provide which material no data we want to download
ex:628(go for any existing)
5.select option
select write file to presentation server i.e ws_download
executes
6.provide file name as for ex.c:\lakshmi.txt
7.press f8.
8.go with se38
9.provide program name:RMDATIND
10.press f8
11.select option :using physical filename
12.provide filename:c:\lakshmi.txt
13.provide option lock mode:E
E indicates unlocking automatically
14.press f8.
system will provide material no implicitly.

697. what is Delivery? In which tables delivery data will be


stored?
ANS. LIKP-Delivery Header Data

LIPS - Delivery item document


698. How many Interactive lists can you create in One Report?
ANS. The actual answer is 1 basic list and 20 secondary list. You
can say this as 21. after you click on the 21st list the
program will move into short dump as there is no further
list available thereafter.

699. How can you see the errors displayed in IDOC?


ANS. to rectify the erros in we19.

700. How you will catch errors in call transaction?


ANS. We will catch errors in the call transcation explicitly by

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.

CALL TRANSACTION 'MM01' using Bdc_tab mode N


updte S
messages into bdc_msg.
if sy-subrc = 0.
perform Error.
clear bdc_msg.
refresh bdc_msg.
endif.
Read table bdc_msg with key msgtype = 'E'.

if sy-subrc = 0.
call function 'FORMAT_MESSAGE'.
...

701. Difference Between ATPF and AT user command?


ANS. at pf<nn> will be triggered when a function key was
pressed in any list.

at user command will b triggered when a button or any


element containing function code was clicked.

702. what will happen in Initialization event?


ANS. the iniliazation event is used to fill the default the
values into the selection screen before the display the
screen program for first time in the execute it. this
event is used to fill the default values into the selection
screen. whenever u execute the program these values are
displayed on the screen.

703. How do you define an internal using types?


ANS. We can define internal tables in different ways. One way is
by using types.
ex:
DATA: ITAB TYPE STANDARD TABLE OF KNA1.

Instead of standard table , we can use hashed table, sorted


table also.

704. what is the purpose of TYPES keyword?


ANS. what is Application server?
Part of the application layer of an ABAP-based SAP System.
If the system is distributed to several application
servers, these are usually installed on different computers
whose operating systems do not need to be identical.
However, several application servers of one or more ABAP-

141
based SAP Systems may run on one computer.

Application servers communicate with the presentation


layer, the database layer, and with each other via the
message server. The most important components of an
application server are its work processes, the number and
type of which are determined when the ABAP-based SAP System
is started. An ABAP program is executed by a suitable
application server work process. The storage areas of an
application server, which can be accessed in the ABAP
programs, are the shared memory, the SAP memory, the ABAP
memory and the roll area in the internal session.

705. what is the use of FOR ALL ENTRIES in an internal table?

ANS. ADVANTAGE. IF THERE ARE MORE THAN ONE TABLE AND THERE EXIST A

RELATIONSHIP BETWEEN THEM BUT THE FIELD IN WHICH THE


RELATION IS MADE IS NOT A PRIMARY KEY IN ONE OF THE TABLE
THEN WE USED FOR ALL ENTRIES .
IT REDUCES REDUANCY OF DATA
RECORDS SHOWS CONSISTENCY .

IT BETTER TO USED FOR ALL ENTRIES INSTED OF NESTED SELECT.

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.

706. what are Joins? How many types are there?


ANS. IF WE WANT TO GET THE DATA FROM SOME TABLES WHICH HAS SOME
RELATIONS BETWEEN THOSE THEN WE USE JOINS TO GET THE DATA
BY USING THOSE PRIMARY KEYS.

THERE ARE 2 TYPES OF JOINS, INNER AND OUTER JOINS.

INNER IS USED TO GET THE DATA WHERE THE TABLES ARE IN SAME
DATABASE AND OUTER JOIN IF THEY ARE IN OTHER.

707. AN INTERNAL TABLE IS A TABLE WHICH HAS A STRUCTURE AS OF A


DICTIONARY TABLE OR AS A STRUCTURE OF OUR OWN TYPE.
THE MAIN DIFFERENCE IS THAT THE INTERNAL TABLE IS A
TEMPORARY TABLE IN WHICH THE DATA COMES OUT OF IT WHEN
THERE IS A HEADER LINE IF NOT WE HAVE TO CREATE A FIELD
STRING.

708. Explain SD and MM Flow?

ANS.MM flow:

purchase Requestion (ME51)

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

710. Commonly used tables in MM and SD?


ANS. Commonly used tables in MM
MARA,MAKT,MVKE

Commonly used tables in SD,


VBRK,VBRP,VBAK,VBPA,VBAP,LIKP,LIPS

711. System fields in Interactive reports?


ANS. sy-cpage,sy-cucol,sy-curow,sy-lilli,sy-lisel,sy-listi,sy-
lsind,sy-pfkey,sy-staro,sy-staco,sy-ucomm

712. what is the difference between upload and WS-Upload?


ANS. Upload is function used to write data from a file in the
presentation server to internal table.here you get a dialog-
box to enter the path of the file name.

Ws_upload also perfoms the same function , but without


screen. here you do not get a dialog-box, rather you need
to type the path of the file name.

713.. What is Macro?


ANS. macro is a set of predefined statement.
when this command is interpretted in the report,the
predefined set of statements will be substiuted and will be
execcuted .

714. What are the select-option fields?


ANS. Select-options can be used if you want to give Upper limit
and Lower limit values for example Date range.
1.Also if u want to just use it like range u can use No-
Display
2.If To field is not required u can use option No-
Extension / No-intervals.
3. but u can't use radiobuttons / checkbox with this option.

715. How to insert data in ternal table?

ANS. There are 2 ways of populating an internal table


1. From Database Table
2. From Work Area of the same line type
1. SELECT <field 1>, <field 2>, ... <field n>

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>

716.Give the syntax of Inner,outer Join?"


ANS. inner join :
select P~<fieldname> d~<fieldname> into corresponding
fields of table <internaltable> from ( <table> as p inner
join <table> as d on <join condition> and <cond>.

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

717. what are the Performance technic you used?


ANS. ST05 - SQL TRACER WILL TESLL US ABOUT THE SELECT QUERY.

SLIN: EXTENDED CODING CHECK.

SE30: RUNTIEM ANALYSIS

718. what is Cross Applications?


ANS. ALL THE ALE AND IDOC ARE KNOWN AS CROS APPLICATION.

INTERACTION WITH OUT WORLD OTHER THAN SAP IS KNOWN A CROSS


APPLICATION.
RFC ENABLED FUNCTION MODULE.
BAPI.
USEREXIT.
ALE.
IDOC.

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)

720. How do you generate interactive lists in ALV?


ANS. in FM reuse_alv_grid_display

pass the value to the foll. parameters,

callback_program = sy-repid.
callback_usercommand = interactivelist.

then create a subroutine like


form interactivelist using r_ucomm like sy-ucomm

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>

keep: 'X' / ' '.

2)bdc_insert:this function module is used to insert the


values to the session

parameters related to bdc_insert are

tcode: mention the transaction code

dynprotab: mention the internal table having structure like

bdcdata.

3)bdc_close_group:

when ever u open the session it is must to close


the session

723. We have 100 records in table how to fetch 10 th record?


ANS.u CAN SELECT USING THE SELECT STATEMENT INSIDE THE LOOP
UISNG THE INDEX. ALSO INCEASE THE INDEX BY ONE AS LOOP
INCREASES...
HOWEVER IT IS NOT ADVISIBLE TO WRITE SELECT INSIDE LOOP AS
IT AFFECTS PERFORMANCE.

724. How to create hashed tables?and its purpose


ANS. Hashed Table:
You can imagine a hashed table as a set, whose elements you
can address using their unique key. Unlike standard and
sorted tables, you cannot access hash tables using an index.

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

Sample code for Hashed table Creation :


types:
begin of typ_pernr,
pernr like pa0001-pernr,
ename like pa0001-ename,
end of typ_pernr.

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.

727. Waht is "READ TABLE" command?? Whats the use of it??


Whats the syntax of the same?
ANS. Below given are 2 types of syntaxes for READ statement
which are used in common.

1)Read table itab into wa with key fname1 = fname2.

fname1 is the field defined in internal table 'itab'


and work area 'wa'.

146
fname2 is the field defined in the table corresponding to
which the read statement is used.

(or)

2)Read table itab into wa with index index_no.

* Here itab and wa should have the same structure.

728. What is the purpose of buffering? How many types of buffering?


ANS. Table buffering is used to increase performance when reading data
from database table. Data from a buffered table is read from a local
buffer on the application server thus reducing database access.

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.

729.What is Diff b/w Basic type and Message type?


ANS. Idoc Type ( Basic Type) defines the structure and format of
the data being exchanged.

Message type represents a specific type of document


transimitted between two partners.

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

You might also like