Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Thursday, November 27, 2008

IMPORTANT SAPSCRIPTS 20

CONTROL_FORM

Use CONTROL_FORM to pass SAPscript control statements to the layout set.


Function call:

CALL FUNCTION 'CONTROL_FORM'
EXPORTING COMMAND = ?...
EXCEPTIONS UNOPENED =
UNSTARTED =


Export parameters:

COMMAND Enter the SAPscript statement you want to execute in ITF format, but without the statement paragraph attribute '/:'.

Exceptions:

UNOPENED The current layout set function could not be executed, since the layout set output was no yet initialized using OPEN_FORM.

UNSTARTED No layout set was opened yet.Possible reasons:

• The layout set processing was started using OPEN_FORM without specifying a layout set name, but no layout set was opened yet using START_FORM.

• The last used layout set was closed using END_FORM, but no new layout set was opened using START_FORM.

• The last filled page of the current layout set has no subsequent page. In this case, the system automatically terminates layout set printing after this page. You need no explicit END_FORM call.

• In the current layout set, no page contains a main window, but a text element shall be output in the main window.
http://sapabapmaterial.blogspot.com/

AND THIS IS THE END OF SCRIPT SERIES.

Saturday, April 26, 2008

The Other 50 ABAP Interview Faq's ABAP Interview Questions

The Other 50 ABAP Interview Faq's

51. What are the techniques involved in using SAP supplied programs?
Do you prefer to write your own programs to load master data? Why?

52. What are logical databases? What are the advantages/disadvantages of logical databases?
ANS:-
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.

advantages:-


The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.

i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.

Disadvantages:-


i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).

53. What specific statements do you using when writing a drill down report?
ans:-
AT LINE-SELECTION,AT USER-COMMAND,AT PF.

54. What are different tools to report data in SAP? What all have you used?
ans:-

55. What are the advantages and disadvantages of ABAP/4 query tool?

56. What are the functional areas? User groups? and how does ABAP/4 query work in relation to these?

57. Is a logical database a requirement/must to write an ABAP/4 query?

59. What are Change header/detail tables? Have you used them?

60. What do you do when the system crashes in the middle of a BDC batch session?
ans:-
we will look into the error log file (SM35).

61. What do you do erros in BDC batch sessions?
ANS:-
We look into the list of incorrect session and process it again. To correct incorrect session we analyize the session to determine which screen and value produced the error.For small errors in data we correct them interactively otherwise
modify batch input program that has generated the session or many times even the datafile.

62. How do you set up background jobsin SAP? What are the steps? What are the event driven batch jobs?
ans:-
go to SM36 and create background job by giving job name,job class and job steps(JOB SCHEDULING)

63. Is it possible to run host command from SAP environment? How do you run?

64. What kind of financial periods exist in SAP? What is the relavent table for that?

65. Does SAP handle multiple currencies? Multiple languages?
ans:-
Yes.

66. What is a currency factoring technique?

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

68. What is SAPscript and layout set?
ans:-
The tool which is used to create layout set is called SAPscript. Layout set is a design document.

69. What are the ABAP/4commands that link to a layout set?
ans:-
control commands,system commands,

70. What is output determination?

71. What are IDOCs?
ans:-
IDOCs are intermediate documents to hold the messages as a container.

72. What are screen painter? menu painter? Gui status? ..etc.
ans:-
dynpro - flow logic + screens.

Menu painter -
GUI Status - It is subset of the interface elements(title bar,menu bar,standard tool bar,push buttons) used for a certain screen.
The status comprises those elements that are currently needed by the transaction.

73. What is screen flow logic? What are the sections in it? Explain PAI and PBO.
ans:-

The control statements that control the screen flow.
PBO - This event is triggered before the screen is displayed.
PAI - This event is responsible for processing of screen after the user enters the data and clicks the pushbutton.

74. Overall how do write programs in SAP?
ans:-
Create program-SE93-create transcode-Run it from command field.

75. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is the other type of screen painter called?

76. What are step loops? How do you program pagedown pageup in step loops?
ans:-
step loops are repeated blocks of field in a screen.

77. Is ABAP a GUI language?
ANS:-
Yes.
ABAP IS AN EVENT DRIVEN LANGUAGE.

78. Normally how many and what files get created when a transaction program is written?
What is the XXXXXTOP program?
ans:-
ABAP/4 program.
DYNPRO

79. What are the include programs?
ANS:-
When the same sequence of statements in several programs are to be written repeadly they are coded in include programs (External programs) and are included in ABAP/4 programs.

80. Can you call a subroutine of one program from another program?
ans:- Yes- only external subroutines Using 'SUBMIT' statement.

81. What are user exits? What is involved in writing them? What precations are needed?

82. What are RFCs? How do you write RFCs on SAP side?

83. What are the general naming conventions of ABAP programs?
ANS:-
Should start with Y or Z.

84. How do you find if a logical database exists for your program requrements?
ans:-
SLDB-F4.

85. How do you find the tables to report from when the user just tell you the transaction he uses? And all the underlying data is from SAP structures?
ans:-
Transcode is entered in command field to open the table.Utilities-Table contents-display.

86. How do you find the menu path for a given transaction in SAP?
ans:-

87. What are the different modules of SAP?
ans:-
FI,CO,SD,MM,PP,HR.

89. How do you get help in ABAP?
ans:-
HELP-SAP LIBRARY,by pressing F1 on a keyword.

90. What are different ABAP/4 editors? What are the differences?
ans:-

91. What are the different elements in layout sets?
ans:-
PAGES,Page windows,Header,Paragraph,Character String,Windows.

92. Can you use if then else,perform ..etc statements in sap script?
ans:-
yes.

93. What type of variables normally used in sap script to output data?

94. How do you number pages in sapscript layout outputs?

95. What takes most time in SAP script programming?
ANS:-
LAYOUT DESIGN AND LOGO INSERTION.

96. How do you use tab sets in layout sets?

97. How do you backup sapscript layout sets? Can you download and upload? How?

98. What are presentation and application servers in SAP?
ANS:-
The application layer of an R/3 System is made up of the application servers and the message server. Application programs in an R/3 System are run on application servers. The application servers communicate with the presentation components, the database, and also with each other, using the message server.

99. In an ABAP/4 program how do you access data that exists on a presentation server vs on an application server?
ans:-
i)using loop statements.
ii)flat

100. What are different data types in ABAP/4?
ans:-

Elementary -
predefined C,D,F,I,N,P,T,X.
userdefined TYPES.
ex: see in intel book page no 35/65

Structures:-
predefined TABLES.
userdefined Field Strings and internal tables.

101. What is difference between session method and Call Transaction?
ans:-

102. Setting up a BDC program where you find information from?
ans:-

103. What has to be done to the packed fields before submitting to a BDC session.
ans:-
fields converted into character type.

104. What is the structure of a BDC sessions.
ans:-
BDCDATA (standard structure).

105. What are the fields in a BDC_Tab Table.
ans:-
program,dynpro,dynbegin,fnam,fval.

106. What do you define in the domain and data element.
Technical details like

107. What is the difference between a pool table and a transparent table and how they are stored at the database level.
ans:-
ii)Pool tables is a logical representation of transparent tables .Hence no existence at database level. Where as transparent tables are physical tables and exist at database level.

108. What is cardinality?
For cardinality one out of two (domain or data element) should be the same for Ztest1 and Ztest2 tables. M:N
Cardinality specifies the number of dependent(Target) and independent (source) entities which can be in a relationship.

ABAP Certification Sample Questions for Abapers ABAP Interview Questions

Question:
Within the TOP-OF-PAGE event the following code represents:

write: /1 text-001.

A: A selection text.
B: A basic list row.
C: A page footer
D: A page header

Question:
Given the two ABAP Dictioary tables below, the Customer number field in table one must contain a value from table two. The Customer number field is known as a ____.

Table one:
Customer number (Primary key)
Company code (Primary key)
Other data

Table two:
Customer number (Primary key)
Customer name
Other data

A: Secondary index
B: Matchcode object
C: Validation field
D: Foreign key


Question:
A batch input job with two steps is processed. IMPORT/EXPORT statements are used to pass values between the steps.

Step 1 contains the statements
STATUS='S'. CONT = 'C'.
EXPORT STATUS CONT TO MEMORY ID 'XXXX'.

Step 2 contains the statements
CLEAR:CONT, STATUS, FLAG.
IMPORT CONT FLAG FROM MEMORY ID 'XXXX'.

What do the fields SY-SUBRC, CONT and FLAG contain after the IMPORT statement have been executed?

A. SY-SUBRC=4. CONT='C'. FLAG=''.
B. SY-SUBRC=0. CONT='C'. FLAG=''.
C. SY-SUBRC=0. CONT=''. FLAG=''.


Question:
The structure of a table has been changed in the ABAP/4 Dictionary.
Which of the following adjustments in the relevant database table is correct, if you want to retain the previous data?

A. Delete and recreate the database table.
B. Change the database directory (ALTER TABLE) where the structure change with ALTER TABLE is supported by the database.
C. Convert the table.


Question:
Must Exits be predefined by SAP programmers?

A. No
B. Yes
C. Customers can determine for themselves where they want to use exits

Important ABAP FAQ's ABAP Interview Questions

1)What are dml statements in sap?

Ans: Insert, Update, Delete.

2)What is the difference between open sql & native sql?

Ans: Open SQL allows you to access all database tables known to the SAP system, regardless of the database manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your ABAP/4 program.
To avoid incompatibilities between different database tables and also to make ABAP/4 programs independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements which are specific to SAP.
A database interface translates SAP's Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly

3)What is Primary key, foreign key ? what is primary index? secondary index?

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

4)How many indexes can be created for a table?

Ans: 9.

5)What is data class?

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

6)Give few names of cluster tables in sap?

Ans:

7)Give few names of pooled tables in sap?

Ans: A pool table has many to one relation with the table in the database. For one table in the database there are many tables in the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff no of fields and field names are different. A pooled table is stored in the pool at the database level. A table pool is a databse table with a special struct that enables the data of many R3 tables to be stored in it. It can hold only pooled tables.
Sorry I dont know table names.

8)Give few names of transparent tables?

Ans: A transparent table has a one to one relataionship in the database. The table in the dictionary has the same name, same no of fields, and the fields have the same name as in the R3 table defn. A transparent tabel has application data (Master and Transaction). sorry i dont know table names.

9)What is a buffer and how many types?

Ans: Buffer is othing but which stores data temporarily. there are two types of buffers.

They are Roll and Page areas.
Pages : it stores the application data.
Roll area: it stores the data of previous pages.Data areas of used programs are created in roll areas for each internal session.

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

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

11)How to add new fields to a standard sap table?

Ans: 1. Appended structures 2. Customizing tables

12)What are lock objects?

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

13)Diff betwn inner & outer join?

Ans:

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

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

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

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

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

Ans: Yes

17)How to create a button in selection screen?

Ans: Using parametres

18)How to add a gui status in a selection screen?

Ans:

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

Ans: Regarding Runtime creation of Check Boxes

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

Ans: Yes through Submit and return

21)Can you call a transaction from a report? how?

Ans: Yes Using Call transaction and leave to.

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

23)What are the main events that are used in an ALV report?
Ans:

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

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

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

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

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

How many type of internal tables are there?

Ans: Standard, Hashed, Sorted tables

27)What is the difference between hashed & sorted internal tables?

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

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

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

29)What is the use of at new statement?

Ans:

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

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

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

Ans:

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

Ans : Batch Input method.

33)What is direct input method?

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

Ans: Exec Sql[Performing
[Native sql statements]
endexec.
The above is the syntax for the native sql statements.

Disadvantages:

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

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

What transactions do you use for data analysis?

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

35)What are selection texts?

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

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

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

Ans: Through functions.

37)What is performance tuning?

Ans: Performance tuning for Data Selection Statement

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

Ans: 1) USe select fields statements (not select *)
2) Use views rather than tables
3) Don't use nested Select.

39)What is the role of secondary index in performance?

Ans:

40)What is the role of ST05 in performance tuning?

Ans: SQL trace

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

Ans:

42)Will join conditions in sql queries affect perfomance? how?

Ans : Yes

43)Will sorted internal tables help in performance?

Ans: Yes

44)Will where conditions in a sql query help improve performance?

Ans: No Not at all

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

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

SAP ABAP Interview Questions And Answers ABAP Interview Questions

What is the difference between internal table and structure?

There are there types of structure:-

1. Flat structure( elementary fields)
2. Nested structure ( type reference to other structure)
3. deep structure ( type reference to database tables)


Explain row type and line type concept

line type refers to the structure of an internal table,whereas row type is the actual part that contains the data and it refers to the table body.creating internal table using line type and row type concept is for reusability purpose.Line type and Row type are defined at DDIC LEVEL.


Can any one give me brief explanation about internal tables, and work area ?

*An internal table is a run time instance. It get created when program starts execution.

*It get destroyed when program terminates. It has two different parts: HeaderLine(optional) and Body(Compulsory).

*Any value that comes to or goes from interanal table, that travels through headerline.


How to eliminate duplicate entries in internal tables?

Answer1:

SORT itab.DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.

Answer2:

The following syntax:

SORT itab ..fieldname..
delete adjcent duplicates from itab comparing .


Size of the internal tables?

The size of the internal tables are set using the 'occurs n' clause. Here n refers to a integer number that specifies the size. Usually its given as 'occurs 0' which creates an itab with the memmory space of 8kb.


What is the basic difference internal tables and database tables? How can we differentiate by looking at the tables? Handling of internal tables


The basic difference is database tables are stored in DB server
and the internal tables are virtual tables these are created run time only
Internal tables are created dynamically, the memory of internal tables is not
permant memory, for internal tables the memory will be created in the application server and it is external memory and terminates after the program termination.

ABAP Frequently Asked Question ABAP Interview Questions

ABAP/4

Q: When we create a customer the information is updated in structure RF02D and the some tables like KNA1 are updated. How can we find the tables for master data transactions?

A: Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> follow the customizing based tree for your application. Double click on a lowest hierarchy level to get for the correct marked development class. Here you can find all the tables, views, logical databases etc. used for a system operation.



R F C

Q: We want to move a SAP table to an Access table using TABLE_EXPORT_TO_MSACCESS_RFC
Importing parameters are
DBNAME
DEST
FLG_APPEND
FLG_POPUP
LANGU
The table has three columns:
TABNAM
MANDT
SDATA
We have no Exporting parameters.

Q.How shall we set the parameters?
A: Install the PS utilities, which are part of SAPGUI install CD. You may run report RIACCESS from SE38. Go to SALE -> Communication -> Define RFC Destination. Setup two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and will have to get them to point to wdpsastr.exe and wdpsatab.exe respectively. Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables. Please note that Access only supports tables with up 255 fields.

Q: We want an RFC do the following transactions - MB1A, MB1C,>MB01 (goods receipt/issue).
A: Call the RFC INBOUND_IDOC_PROCESS with IDOC_CONTROL and IDOC_DATA. The structure in the field sdata in the IDOC_DATA are e1mbxyh and e1mbxyi.



Transports

Q: In a Dev instance, we want to transport a modification to a layout set from one client to another. What is the best way?
A: use transaction SE71. Choose Utilities->Copy from Client. Layout sets need not be transported between clients , via transport requests DEVKxxxxxx.

Q: We need to keep track of the transports that need to flow through to other systems (ie, DEV, TST, TRN, PRD etc). Is there a way do this?
A: SAPCRAFT enables you to control the CTS from DEV system. This keeps track of all transports at all stages and enables you to allocate Import, export and Authorization functions to specific user.



E D I / IDOC

Q:1 We created an EDI Vendor and created all required output conditions. However no IDOC is generated when PO is printed. Why?
A: Go to Header->output for the PO. The output type shall be '6'. The status shall be '1'. If the status is '0' check the timing. If the status is '2' , go to 'GOTO->Processing Log' and the explanation for non-generation of IDOC can be seen.

Q: How can we create / upload IDOC's from legacy system to SAP?
A: Third party tool Mercator may be used to convert Legacy files to Idoc format. Mercator provides an IDOC tree import facility, SAP provides the export facility. You can transfer the Idoc layouts from SAP to Mercator automatically and then map.

Q: We want to receive an outbound EDI 855 IDOC only if E2EDP20 -scheduling confirmation segment is present. Else get an "error" status preventing triggering the EDI subsystem.
A: User exit logic has to be added in function IDOC_INPUT_ORDRSP.

# Set up a test flag and set it off when the IDOC header is read.
# Turn the flag ON when the EDP20 segment is read.
# Interrogate this flag when the next segment after EDP20 in the same IDOC comes in. If it is on ,you have an EDP20 coming in.
# Issue an error status 51 with suitable message for whichever condition you don't want the IDOC to be processed, This will stop the IDOC from posting.

Q: Where ever PO is sent to the vendor via EDI, we want an acknowledgement of the PO by vendor. Which fields are updated and what should be my procedure?
A: Execute Program: IDOC_INPUT_ORDRSP
Process code: ORDR
Message type: ORDRSP
IDOC: ORDERS01
The confirmation process allows the supplier to return an acknowledgment. Only Dates and quantities can be changed The information is stored in the PO and can be viewed via Item->Confirmation->Overview. The PO can be flagged as 'confirmation required' so that Pos without acknowledgement receipt can be monitored. Control keys and tolerances (days and quantities) have to be customized.


A L E

Q: Our IDOC remains in status 51 ( not posted) while testing ALE setup by passing DEBMAS02 Idocs. The message 'Field KNA1-BRSCH is not an input field'. This is the Industry key. What are we missing?

A: Go to IMG - menu path IMG->LogisticsGeneral-> Logistics Basic Data: Business partners->Customers-> Control->Define Account groups and field selection for customer.
Select sold-to or ship-to. Select General Data. Select control and double click. Industry key is found here. Change the option to 'Optional Entry'.
Check OSS 5599. You may have to update view V_T078D also.



Batch In-put/ Direct In-put

Q: We are calling transaction VL01 in batch input to create deliveries using a program for delivery due list. How ever we are unable to create deliveries for transport stock orders. Why?
a: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard SAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate options . It is preferred to call a report than create a Batch-input program.

Q: What are some sample Direct input data transfer programs?
A: In MM for Material Master data - RMDATIND
FI - for Accounting Documents - RFBIBL00
PP - for Independent requirements - RM06IN00
CA - for Classification data - RCCLBI03



Handling Tables

Q: We specify the logical database. And we want a field that is not present in any of the tables defaulted in logical database. How can we want to add this additional field from a different table?
A: . Presume you have a

logical database
table 1
table 2
table 3

Define the required field as additional field say fld of table 1, table 2 or table 3
and then in the code section define.

Perform get_f1d(zxxxxxxx) using f1d.
Form zxxxxxxx could be like;
Form get_f1d using f.
Select * from where 'conditions'
f = table4 - f1d.

Q: We need to download an internal table to the Presentation Server(local workstation). Whenever we run the program, the same file has to be saved as a separate file in sequential order. Ex: 0001.txt, 0002.txt etc. Where can we store the last file number?

A: SAP has a table TVARV for storing the variants.
A record may be created in TVARV for all the programs that require this kind of incremental records.

For Ex: the record could be 100Zmm10001 MM sequence rec where first part consists of client code and the program being run. Client code is required because TVARV does not has a field for client code. The second part is the description indicating the purpose what the record is created. This entire string may be posted in the Name field (char - 30).
The Type field ( char- 1) may be populated with P or S (Parameter or Selection)
Low field (char- 45) may be populated with '0001' when run first time and increment it by one in your program for downloading of the internal table.


Others

Q: How can we use CAD with SAP ?
A: Third party tools from Eigner + Partner provide interfaces to SAP. Another third party software - Fastlook Plus from Kamel Software enables you to view all of the Autocad formats.

Q: How can I access SAP through Internet?
A: SAP has its own Internet transaction Server (ITS) . Other products include Haht, WebObjects, NetDynamics etc. Each product has its' own architecture.
However to access the database, access paths SAP GUI or RFC Channel have to be used.

Q: How can we transport the standard text?
A: Refer note 3355 in OSS for a complete explanation. The SAPscript objects that should be transported must be written in a transport request.
The entries are as follows:
R3TR FORM NAME (NAME = Name of the layout set)
R3TR STYL NAME (NAME = Name of the style)
R3TR TEXT OBJECT,NAME,ID,L
(OBJECT = Text object, NAME = Text name, ID = Text ID, L = Text language)
If you want to transport a number of texts, you can use report RSTXTRAN to insert the individual text keys into a correction. The transport request must be entered and released via the transport system.

Q: How to find what transactions a particular user was running for a given period in the past (Eg: from 1st of a month )
A: You may use the transaction - STAT.

Q: We want protect/lock a field so that only selected people can change the value while others can only read. How to set the authorizations?
A: Create an authorization object for change mode. Loop at screen in the user exit and set input to 0. Check the user based on sy-uname and the authorization. Decide whether input should be 0 or 1.

Q: How to lock an user defined transaction for some time during which no user can access the same?
A: Use transaction SM01. Scroll through the transactions and check against the transaction to be locked. And after the maintenance is over, go back to SM01 and uncheck the same to unlock.

Answers to some ABAP Interview Questions ABAP Interview Questions

Questions which I have faced in an interview:

1) What is runtime analysis? Have you used this?

2) What is meant by performance analysis? Have done anything to improve the
performance?

3) How to transfer the objects? Have to transferred any objects?

4) How did you test the developed objects?

5) What is the difference between SAP Memory and ABAP Memory?

6) In order to upload Purchase order details, how you handle multiple values for
a single field?

Eg: Item field may contain no. of values for a record

7) What is the procedure you followed to upload the data?

8) How did you handle errors in Call Transaction?

9) Among the Call Transaction and Session Method, which is faster?

10) What are the difference between Interactive and Drill Down Reports?

11) How to pass the variables to forms?

12) How to create a link between modified form and modified print program?

13) What is the table, which contain the details of all the name of the programs
and forms?

14) How did you test the form u developed? How did you taken print?

15) What are Standard Texts?

16) What is the difference between Clustered Tables and Pooled Tables?

17) What is pf-status?

18) Among "Move" and "Move Corresponding", which is efficient one?

19) What are the output type and Tcodes?

20) Where we use Chain and Endchain?

21) Do you use select statement in loop endloop, how will be the performance? To
improve the performance?

22) In select-options, how to get the default values as current month first date and last date by default?

Eg: 1/12/2004 and 31/12/2004


Go through these answers:

1) What is runtime analysis? Have you used this?

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.

2) What is meant by performance analysis? Have done

3) How to transfer the objects? Have you transferred any objects?

4) How did you test the developed objects?

I was testing a developed object. There are two types of testing

- Negative testing
- Positive testing

In negative testing we will give negative data in input and we check any errors occurs.

In positive testing we will give positive data in input for checking errors.

8) How did you handle errors in Call Transaction?

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

9) Among the Call Transaction and Session Method, which is faster?

Call transaction is faster then session method. But usually we use session method in real time...because we can transfer large amount of data from internal table to database and if any errors in a session. Process will not complete until session get correct.

10) What are the difference between Interactive and Drill Down Reports?

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.

11) How to pass the variables to forms?

12) What is the table, which contain the details of all the name of the programs and forms?

Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll depends upon your wish. And these all are stored in database (data dictionary).

Which contain the details of all the name of the programs and forms? (I don't know).

13) How did you test the form u developed? How did you taken print?

14) What are Standard Texts?

16) What is the difference between Clustered Tables and Pooled Tables?

A pooled table is used to combine several logical tables in the ABAP/4 dictionary. Pooled tables are logical tables that must be assigned to a table pool when they are defined.

Cluster table are logical tables that must be assigned to a table cluster when they are defined.

Cluster table can be used to store control data they can also used to store temporary data or text such as documentation.

17) What is pf-status?

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.

18) Among "Move" and "Move Corresponding", which is efficient one?

I guess, 'move corresponding' is very efficient then 'move' statement. Because usually we use this stamtent for internal table fields only...so if we give move corresponding. Those fields only moving to other place (what ever you want).

19) What are the output type and Tcodes?

20) Where we use Chain and End chain?

21) Do you use select statement in loop end loop, how will be the performance? To improve the performance?

22) In select-options, how to get the default values as current month first date and last date by default?
Eg: 1/12/2004 and 31/12/2004


Q: How to compare the 2 tables between the 2 systems?
Ans: Which is using the transaction code is 'oy19'.

Q. What is the use of pick statement do?
Ans: The pick statement is used to it will capture the user action.
ex: if sy-ucomm = 'x'.
This statement is used to capture the user action.

General - Number Range Generation ABAP Interview Questions

General - Number Range Generation


* In the 4.6x environment, SAP have included a number range generation
* program just like those used for Purchase Order, Sales Order etc.
*
* This SAP number range generation is an include program.
*
* INCLUDE ZRANGENO.
*
* Always have to be included in the main program data declaration
*
* data: wnorange like INRI-NRRANGENR, "number range,
* wsubobj like inri-SUBOBJECT, "sub object
* wdocno(12).
*
* Steps :-
* 1. Number range Sub Object must be maintain in table ZSGRP
* You can used transaction SE16 to create a table entries.
* 2. Maintain number range and intervals in transaction code SNUM
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*
*

call function 'NUMBER_RANGE_ENQUEUE'
exporting
object = 'ZOWNNO' "Create with SNUM
exceptions
foreign_lock = 1
object_not_found = 2
system_failure = 3
others = 4.
if sy-subrc ne 0.
* message e086 with 'Lock error' sy-subrc.
endif.

call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = wnorange
object = 'ZOWNNO'
subobject = wsubobj
importing
number = wdocno "Number generated by SAP
exceptions
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
internal_overflow = 6
others = 7.
if sy-subrc ne 0.
* message e086 with 'Number Range' sy-subrc.
endif.

call function 'NUMBER_RANGE_DEQUEUE'
exporting
object = 'ZOWNNO'.

if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

Extract the smtp email address ABAP Interview Questions



*
* Extract the smtp email address from the User Profile SU01 or
* Vendor Master LFA1
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*
*
REPORT ZSMTPADR.

TABLES: USR21,
LFA1,
ADR6.

DATA: BEGIN OF WA,
BNAME TYPE USR21-BNAME,
LIFNR TYPE LFA1-LIFNR,
ADRNR TYPE LFA1-ADRNR,
PERSNUMBER TYPE ADR6-PERSNUMBER,
ADDRNUMBER TYPE ADR6-ADDRNUMBER,
SMTP_ADDR TYPE ADR6-SMTP_ADDR,
END OF WA,
ITAB LIKE SORTED TABLE OF WA
WITH NON-UNIQUE KEY BNAME LIFNR.

SELECT-OPTIONS: UNAME FOR USR21-BNAME.
SELECT-OPTIONS: LIFNR FOR LFA1-LIFNR.

IF UNAME-LOW <> SPACE.
SELECT U~BNAME U~PERSNUMBER U~ADDRNUMBER
A~SMTP_ADDR
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( USR21 AS U
INNER JOIN ADR6 AS A ON A~PERSNUMBER = U~PERSNUMBER
AND A~ADDRNUMBER = U~ADDRNUMBER )
WHERE U~BNAME IN UNAME.

LOOP AT ITAB INTO WA.
WRITE:/ WA-BNAME, WA-SMTP_ADDR(50).
ENDLOOP.
ENDIF.


IF LIFNR-LOW <> SPACE.
SELECT L~LIFNR L~ADRNR
A~SMTP_ADDR
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( LFA1 AS L
INNER JOIN ADR6 AS A ON A~ADDRNUMBER = L~ADRNR )
WHERE L~LIFNR IN LIFNR.

LOOP AT ITAB INTO WA.
WRITE:/ WA-LIFNR, WA-SMTP_ADDR(50).
ENDLOOP.
ENDIF.
*-- End of Program

How to Get the Version Value When I Print the PO ABAP Interview Questions

Need to display the Version of PO in the printout. But the table ekko or erev doesn't contain the version value at runtime.


The following example code will get the version no. in PO :-

referesh : erevitem.
clear : erevlines.

SELECT SINGLE * FROM cdpos
WHERE objectid = ebeln AND
value_old = 'G' AND
value_new = 'B'.

IF sy-subrc EQ 0.

erevlines = erevlines + 1.

ELSE.

erevlines = 0.

ENDIF.

SELECT * FROM nast
INTO CORRESPONDING FIELDS OF TABLE itab_nast
WHERE objky = ebeln AND
vstat NE '0'.

CLEAR itab_nast.
SORT itab_nast DESCENDING BY erdat eruhr.

READ TABLE itab_nast INDEX 1.

IF sy-subrc EQ 0.
IF itab_nast-vstat NE '0'.

LOOP AT l_doc-xekpo INTO tekpo.

CALL FUNCTION 'ME_CHANGEDOC_SELECT'
EXPORTING
i_document_category = pekko-bstyp
i_document_number = ebeln
i_document_item = tekpo-ebelp
* I_DATE_START =
* I_TIME_START =
* I_DATE_END =
* I_TIME_END =
* I_USERNAME =
* I_ALL_ITEMS =
* I_GRIDHANDLE =
* I_REVISIONLIST =
* I_ARCHIVE_HANDLE =
IMPORTING
* E_LINES =
e_outtab = imecdgrid.


it_mecdgrid[] = imecdgrid[].

LOOP AT it_mecdgrid INTO wa_mecdgrid WHERE tabkey+13(5) = tekpo-ebelp.


IF wa_mecdgrid-fname = 'MENGE'.

itab_po_change-matnr = tekpo-matnr.
itab_po_change-text = '***** Quantity Change ******'.
erevlines = erevlines + 1.


APPEND itab_po_change.

ENDIF.

IF wa_mecdgrid-fname = 'NETWR'.

itab_po_change-matnr = tekpo-matnr.
itab_po_change-text = '***** Price Change ******'.
erevlines = erevlines + 1.


APPEND itab_po_change.


ENDIF.


ENDLOOP.


ENDLOOP.

SORT itab_po_change BY matnr text.

LOOP AT itab_po_change.

DELETE ADJACENT DUPLICATES FROM itab_po_change COMPARING matnr text.

ENDLOOP.


ENDIF.
ENDIF.


SELECT * FROM erev INTO CORRESPONDING FIELDS OF TABLE erev WHERE edokn = pekko-ebeln.

SORT erev BY revno DESCENDING.



LOOP AT erev.
MOVE-CORRESPONDING erev TO erevitem.
APPEND erevitem.
ENDLOOP.

DESCRIBE TABLE erevitem LINES erevlines.
IF erevlines = 1.
CLEAR erevitem[].
erevlines = 0.
ENDIF.
*
** erevlines = erevlines - 1.
*
DELETE erevitem WHERE revno = 0.
CLEAR erevlines.
DESCRIBE TABLE erevitem LINES erevlines.

call function fm_name
exporting
erevlines = erevlines

tables
erev = erevitem
endform.


IN SSF :

loop at erev into wa_erev where erevlines > '0'.


wa_erevlines-revno(.0) for version no.
wa_erevlines-txz01 for version text

Attach T-Codes to Area Menu ABAP Interview Questions

We know how to create transaction codes. We can use the transaction code SE93 ( Maintain Transaction).

Module pool programs/On-line programs must be attached to a transaction code to execute them.


Report programs (executable programs) can be executed directly without attaching them to the transaction codes.


But in real time, we do create custom transaction codes both for module pool programs/On-line programs and report programs. Module pool programs and on-line programs are one and the same, where we do create screens using screen painter (SE51).


In real time business scenarios, after creating transaction codes, we need to attach them to Area Menu. End users can easily access the transaction codes if they are attached to Area Menu. Area Menu is nothing but starting screen where in the left hand side we find menu.


The transaction code to maintain area menu is SE43. Using SE43, we can attach our custom transaction codes to the area menu.


Please explore how to create nodes and sub nodes under menu using SE43.

What is the use of Authorization Checks? ABAP Interview Questions

To ensure that a user has the appropriate authorizations when he or she
performs an action, users are subject to authorization checks.

The following actions are subject to authorization checks that are performed
before the start of a program or table maintenance and which the SAP
applications cannot avoid:

· Starting SAP transactions (authorization object S_TCODE)

· starting reports (authorization object S_PROGRAM)

· Calling RFC function modules (authorization object S_RFC)

· Table maintenance with generic tools (S_TABU_DIS)

In coming posts, we will see how to add authorization checks for Reports and
transactions.

Today we will discuss about table authorization checks.

Purpose of assigning authorization groups for tables:

You can assign authorization groups to tables to avoid users accessing tables
using general access tools (such as transaction SE16). A user requires not only
authorization to execute the tool, but must also have authorization to be permitted
to access tables with the relevant group assignments. For this case, we deliver
tables with predefined assignments to authorization groups. The assignments
are defined in table TDDAT; the checked authorization object is S_TABU_DIS.

Now we will see how to assign/create authorization group for a table:
Go to SE54, Give the table name and choose authorization group and then click
on create/change. You can
create an authorization group.

Example:

You can assign a table to authorization group Z001. (Use transaction SM30 for
table TDDAT) A user that
wants to access this table must have authorization object S_TABU_DIS in his or
her profile with the value
Z001 in the field DICBERCLS (authorization group for ABAP Dictionary objects).

Authorization Check:
In the earlier post, we came to know the importance of authorization check in real
time environment. We know how to check authorization for table maintenance.
(Please refer earlier post).
Now we will see how to check authorization for Reports, Transactions, RFC
function modules.

The following actions are subject to authorization checks that are performed
before the start of a program or table maintenance and which the SAP
applications cannot avoid:


 Starting SAP transactions (authorization object S_TCODE)
 starting reports (authorization object S_PROGRAM)
 Calling RFC function modules (authorization object S_RFC)
 Table maintenance with generic tools (S_TABU_DIS)

The authorization objects S_TCODE, S_PROGRAM, S_RFC, and S_TABU_DIS
are standard SAP provided.
Creating a new authorization object is not in the scope of ABAP developer. It will
be taken care by SAP BASIS team.

To add authorization check to your program, you need to add the following code in
your report. Imagine that you have created a transaction code for your report, then
you should use the authorization object S_TCODE to check the authorization.

You can place the code in initialization event.

*Initialization
INITIALIZATION.
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD 'ZEXAMPLE'.

IF sy-subrc <> 0. "Not Authorized
MESSAGE e003(ZZ) WITH 'TCD' 'ZEXAMPLE'.
ENDIF.

Here zexample is the transaction code created for the report.

Difference Between BADI and User Exits ABAP Interview Questions

Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.

As with customer exits two different views are available:

In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.

In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.

In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.

SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.

The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).

All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.

The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.

What is difference between badi and user-exists?
What is difference between enhancements and user-exists? and what is the full form of BADI?

I have another doubt in BDC IN BDC WE HAVE MSEGCALL (i did not remember the > correct name) where the error logs are stored, MSEGCALL is a table or structure.

What is the system landscape?

1) Difference between BADI and USER-EXIT.
i) BADI's can be used any number of times, where as USER-EXITS can be used only one time.
Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
ii) BADI's are oops based.

2) About 'BDCMSGCOLL' it is a structure. Used for finding error records.
3) Full form of BADI 'Business addins'.
3) System land scape will be depends on your project
Ex:- 'Development server'-->'Quality server'---> 'Production server'......

BAPI Conventions ABAP Interview Questions

BAPI Conventions

Methods

  • If the BAPI to be implemented is a standardized BAPI, use the generic names, for example, GetList, GetDetail.
  • The method name must be in English (maximum 30 characters).
  • The individual components of a BAPI name are separated by the use of upper and lower case.Example: GetList
    Underscores ("_") are not allowed in BAPI names.
  • Each BAPI has a return parameter that is either an export parameter or an export table.
  • So that customers can enhance BAPIs, each BAPI must have an ExtensionIn and an ExtensionOut parameter.

Parameters

  • If standardized parameters are used, you have to use the names specified for standardized parameters.
  • BAPI parameter names should be as meaningful as possible. Poorly chosen names include abbreviations and technical names (e.g. "flag", table names, etc.).
    The parameter and field names must be in English with a maximum of 30 characters.
  • The components of a parameter name in the BOR are separated by upper and lower case letters to make them easier to read. Example: CompanyCodeDetail
  • Values that belong to each other semantically should be grouped together in one structured parameter, instead of using several scalar parameters.
  • For ISO-relevant fields (country, language, unit of measure, currency), additional fields for ISO codes are provided.
  • Unit of measure fields must accompany all quantity fields and currency identifiers must accompany currency amount fields.

Standardized BAPIs

Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.

The following standardized BAPIs are provided:

Reading instances of SAP business objects



GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method.

BAPIs that can create, change or delete instances of a business object type

The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.




Create( ) and
CreateFromData( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( ) The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add ( ) and Remove ( ) The BAPI Add adds a subobject to an existing object instance and the BAPI and Remove removes a subobject from an object instance. These BAPIs are instance methods.

BAPIs for Mass Data Processing

The BAPIs listed above for creating and changing data can also be used for mass processing. For more information see BAPIs for Mass Data Transfer [Extern]

BAPIs for Replicating Business Object Instances



Replicate( ) and SaveReplica( ) The BAPIs Replicate() and SaveReplica() are implemented as methods of replicable business object types. They enable specific instances of an object type to be copied to one or more different systems. These BAPIs are used mainly to transfer data between distributed systems within the context of Application Link Enabling (ALE). These BAPIs are class methods.

Other Less Used Standardized BAPIs

  • Programming GetStatus() BAPIs [Extern]
  • Programming ExistenceCheck() BAPIs [Extern]

Standardized Parameters

There are some parameters that can be created for various BAPIs because they contain the same or the equivalent data in all BAPIs. They should be implemented the same in all BAPIs.




Address parameters Specific reference structures are defined for address parameters in BAPIs. You should copy these structures to use in your BAPI, especially if the underlying object type uses the central address management (CAM).
Change Parameters In BAPIs that cause database changes (for example, Change() and Create() BAPIs) you must be able to distinguish between parameter fields that contain modified values and parameter fields that have not been modified. This distinction is made through the use of standardized parameters.
Extension parameters The parameters ExtensionIn and ExtensionOut provides customers with a mechanism that enables BAPIs to be enhanced without modifications.
Return Parameters Each BAPI must have an export return parameter for returning messages to the calling application. To provide application programmers with a consistent error handling process for BAPI calls, all return parameters must be implemented in the same, standardized way.
Selection Parameters Standardized selection parameters are used in BAPIs that can be used to search for specific instances of a business object type (e.g. in GetList() ). These parameters enable the BAPI caller to specify the relevant selection criteria.
Test Run Parameters The parameter TestRun is used in write BAPIs (Create() and Change() ), to check the entries for the object instance in the database before actually creating the object instance. The creation of the object instance is only simulated and data is not updated.
Text Transfer Parameters To transfer BAPI documentation texts (e.g. the documentation of a business object type), you have to create standardized text transfer parameters.

Important things to remember..

It is important to follow the guidelines below when develop9ng BAPIs:
  • BAPIs must not contain CALL TRANSACTIO or SUBMIT REPORT
  • BAPIs must not invoke a COMMIT WORK. instead use the BAPI TransactionCommit to execute the commit after the BAPI has executed.
  • BAPI structures must not use includes.
  • There should be no functional dependecies between two BAPIs
  • BAPIs must perform there own authorization check
  • BAPIs should not use dialogs
  • BAPIs must not cause the program to abort or terminate. re4levant messages must be communicated through the return parameter.

BAPI/ALE Integration

When you use the BAPIs for asynchronous messagning, the application in the sendig systen calls the generated ALE IDoc interface isntead of the BAPI.

Asynchronous BAPIs use the ALE interface this way:

  • Creates an IDOC from the BAPI data
  • Sends the IDOC to the target system
  • Receives the IDOC in trhe target system, crreates the BAPI data from the IDoc and calls the BAPI
An ALE interface for a BAPi is created in transaction BDBG.

BDC ABAP Interview Questions

1. What is full form of BDC Session?

Batch Data Communication Session.

2. What are the steps in a BDC session?

The first step in a BDC session is to identify the screens of the transaction that the program will process. Next step is to write a program to build the BDC table that will be used to submit the data to SAP. The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.

3. How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à STATUS command from any menu.

4. How do you save data in BDC tables?

The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.


5. What is the last entry in all BDC tables?

In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.

6. What is a multiple line field?

A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.

7. How do you populate data into a multiple line field?

To populate data into a multiple line field, an index is added to the field name to indicate which line is to be populated by the BDC session (Line index).

8. Write the BDC table structure.


BDC table structure

FIELD

TYPE

DESCRIPTION

Program

CHAR (8)

Program name of transaction.

DynPro

CHAR (4)

Screen number of transaction.

DynBegin

CHAR (1)

Indicator for new screen.

Fnam

CHAR (35)

Name of database field from screen

Fval

CHAR (80)

Value to submit to field.


9. Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

10. Does the BDC-INSERT function allow multiple transactions to be processed by SAP?

Yes.

11. What is the syntax for ‘CALL TRANSACTION’?

CALL TRANSACTION trans [using bdctab MODE mode].

Three possible entries are there for MODE.

A - Show all screens.

E - Show only screens with errors.

N - Show no screens.

Wednesday, April 23, 2008

SAP BDC Interview Questions And Answers ABAP Interview Questions

Difference between /N and /BEND ?

/BEND terminates the batch input processing and sets the session to be failed.
/N terminates the current batch input transaction.


SM35 transaction . How to automate BDC ?
After execution of batch input program , the session created is placed in the session queqe which can be viewed using SM35 transaction executing / Releseing the session will start the transfer of the data from the session into the database tables./


Update types in Call transaction method. What is the difference ?
At present with SAP we have only modes of updation

1.Synchronus Update.

2.Asynchronous Update.

There is no more Local Update.


What are the table controls in BDC ? What is the difference between bdc and
lsmw ? What is the difference between bdc and rfc ?

BDC - Batch data communication in which there are 2 processes

1. in bound

2. outbound

RFC - remote fucntion call(or) calling


Data conversion experience?

DATA CONVERSIONS:

SAP HAS PROVIDED A TOOL NAMED LSMW WHICH CONVERTS THE LEGACY DATA INTO THE REQUIRED SAP FORMAT AND UPDATES THE DATABASE.


Open datasets, Read datasets ( Reading and writing data to files)?

Date Sets are nothing but files on Application Server,they can even be called as Sequential files.


Open Dataset

Is used to open required file on the application Server.


Read Dataset.
Is used to read the contents required file on the application Server.


How to do back ground processing in BDC Session method ?

Goto sm35
select the option background process


Call transaction method, how to capture the errors ?

IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.

FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.

THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.

THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"

AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.


How to load data from MS Excel sheet to SAP by using BDC method ?

KCD_EXCEL_OLE_TO_INT_CONVERT even takes care of blank cells and is available in older versions of SAP

* Add values to internal table

SORT t_cells BY row col.

LOOP AT t_cells INTO wa_cells.

MOVE : wa_cells-col TO l_index.

ASSIGN COMPONENT l_index OF STRUCTURE itab TO ..f_value...

MOVE : wa_cells-value TO ..f_value..

AT END OF row.

APPEND itab

CLEAR itab.

ENDAT.

ENDLOOP.


What is the difference between call transaction and session method?

Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.

Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.


SM35 transaction . How to automate BDC ?

sm35 is used to play girls for better nightfalls.


What is the difference between Upload and WS_Upload ?

The diffrence between WS_Upload and Upload is when you use function Upload it prompts for a dailog box where in you need to key in the file location.Where as in case of WS_Upload you specify the file location in the function input parameters itself

If I want to execute a program only in background not in foreground is there any option for this?


The sm37 transaction can be used for running a program in the background. Also in the session method while processing the session you can specify the processing type as background or foreground.


What kind of BDC programs are written ?

There are five types of BDC methods available. They are 1.Batch input session 2.Call Transaction 3.Recording 4.Direct Input and 5.LSMW


How to read files and process BDCs automatically?

To read file from Presentation server use Upload or GUI Upload or WS upload and to read file from Application server use Opend Dataset,Read dataset and Close dataset


In session method sy-subrc is not returned whereas in call transaction method sy-subrc is returned . what does it mean?

While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.

The system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).

so the session method should not return any value.

In call transaction method data is directly pass to the SAP system.

So its compulsory return the value.

Because of the call transaction is the function.

A function should return the value mandatory.


Recording Function

With recording, user can avoid manual search for fields and tables required in a program including screen numbers. SHDB is the transaction code.


BDC vs Direct Loads( have you used direct loads on SAP tables )

Direct loads is 5 times faster than uploading by normal BDC method. but some times while updating the database referential integrity is violated.


Have you set up a back ground job ? How to create a background job without a variant ?

Yes, user can create background job scheduling in two ways.

1. By calling the executable program RSBDCSUB

2. Transaction Code SM37

Recent Topics