abap real time interview questions

Upload: knani9090

Post on 30-Oct-2015

769 views

Category:

Documents


9 download

DESCRIPTION

these questions are faced un my intervie3

TRANSCRIPT

FQ

HP

1. How to design selection-screen?

Ans. Selection-screen begin of block b with frame. Parameters: p_all RADIOBUTTON GROUP G,

P_in RADIOBUTTON GROUP G, P_de RADIOBUTTON GROUP G.

Selection-screen end of block b.

2. Call transaction syntax in bdc?

Ans. Call transaction using BDCDATA UPDATE A/S(A=ASYNCHORONOUS ,S=SYNCHORONOUS) MODE A/N/E(ALL DISPLAY,NO DISPLAY,ERROR DISPLAY) MESSAGE INTO BDCMSGCOLL(STRUCTURE FOR MESSAGES)Ans 2. Call transaction 'XK01' using it_bdcdata mode 'E'.

3. Difference b/w read and select statement? Ans. Select single: for this stmt u have specify all primary keys. It is used to get data from database table. Read: it is used in internal table to get a particular data.

4. Which transaction youre using in bdc?

Call transaction or batch input method

5. Difference b/w internal table and work area?

Internal table: it is used to hold the multiple records and it is a temporary storage location in application server. i.e. The data inside an internal table was not saved anywhere in SAP. Internal tables are dynamic memory storage locations and hence need not to provide the size.

The scope of an internal table is inside a program only.

Syn: DATA LIKE TABLE OF .

WORKAREA: It is used to hold once record at a time and also it is used to increase performance of the data processing.

Syn: DATA like line of

Q. how to edit text in script? And how to migrate scripts into smart forms?First Go to smart forms T-Code

Goto utilities->Migrate form

There Give the name of the Script that has to be migrated

Ans 2.Here are two way through which you can convert sapscript into smartforms.

1. This is basically a function module, called FB_MIGRATE_FORM.

You can start this function module by hand (via SE37), or create a small ABAP which migrates all SAPscript forms automatically.

2. You can also do this one-by-one in transaction SMARTFORMS, under

Utilities -> Migrate SAPscript form.

You could also write a small batch program calling transaction SMARTFORMS and running the migration tool.

Note: While converting sapscript into smartforms, only layout has passed. But you have do all logic coding in your smartforms.

6. What are indexes?

Ans. The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database. You can also create further indexes on a table. These are called secondary indexes. upto 9 secondary indexes can be created.This is necessary if the table is frequently accessed in a way that does not take advantage of the sorting of the primary index for the access.

7. What are pooled and cluster table?

Ans. pooled tables: -- These r 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 are very large tables so many records in each of them! But, these tables were used for storing the system data! --In these tables at least 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!8. Difference between select single and select upto 1 row in sap abap? Ans. According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.

Select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search. Whereas the select up to 1 row may assume that there is no primary key supplied and will try to find most suitable index.

The best way to find out is through Sql trace or runtime analysis.

Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.

The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.

The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause. If this results in multiple records then only the first one will be returned and therefore may not be unique.

Mainly: to read data from the 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.

ex code

Difference Between select single * and select upto n rows,

Select Single * Select upto n rows

1. It will fetch only one recordfrom the data base in which it satisfies the where condition. 2. It has high performance compare to select upto n rows. 3. Syntax: select single * from lfa1 into table l_wa_lfa1. 1. It will fetch all the records with whichthe where condition satisfies and displays the first record among the selected records. 2. Lower in performance, because this statement will look all the related key field values in a given table. 3. Syntax: select*from lfa1upto 1 rows into table l_t_lfa1..

9. bapi and badi?Ans. BAPI - These are published programs which is used to upload data into SAP system.

BAPI is Business Application Programming Interface and has the role as communication platform for developing applications, e.g. booking material documents from flat files, see more in trx BAPI.

BAPI - Business Application - commonly a function module that is normally RFC enabled as well and acts as a method of a business object. For example, Sales Order as the business object with a method of create - the BAPI is BAPI_SALESORDER_CREATEFROMDAT2.

BAdI is Business Add-In, and it should take the place from the user- exits (trx: SE18, SE19)

BADI - This is a program enhancement technique. SAP provides BADI openings in the standard programs. You need to search for the suitable BADI as your requirement and then do the coding and plug in the program.

A BADI is a Business Add-in - one of SAP's methods of implementing a user-exit or change to standard SAP code. BADI's are ABAP object based changes instead of the more common subroutines/function modules.

To implement BADI,

Follow the below steps to find out what all BADI's are called when you press any button in any transaction.

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction. .( performance tuning ?

Please find below the ABAP Code Performance tuning tips.

1. Run Extended syntax checks with character literals checkbox switched on & Code Inspector to rectify all relevant errors and warning (e.g. Use the results of the above checks to remove all variables/constants etc that are declared but are not used)

2. Internal Table is defined with TYPE STANDARD TABLE OF & Work-Areas is used instead of header lines

3. In SELECT statement, only the required fields are selected in the same order as they reside on the database table/structure/view

4. "SELECT *" should not be used in any case.

5. Usage of JOIN is limited to a maximum of 2 i.e. not more than 3 database tables are joined at one time

6. CHECK that the internal table used in FOR ALL ENTRIES is NOT empty as this will retrieve all entries from the table

7. SORT inside LOOP is not advisable and should not be used.

8. Sort internal table by fields in the correct order, which are used in a READ TABLE statement using BINARY SEARCH. If the order of sorting is invalid the BINARY SEARCH will never work.

9. Transaction SE30 (ABAP Runtime Analysis) must be checked to measure/compare program performance/runtime if program has multiple inefficient databases selects or complicated internal table operations

10. Use transaction ST05 (SQL Trace) to see what indices your database accesses are using. Check these indices against your where clause to assure they are significant. Check other indices for this table and where you have to change your where clause to use it. Create new indices if necessary, but do not forget to check the impact by consulting onsite coordinator.

10. BAPI Extension?Ans.

Hi

It's the same but the structure are different of course.

Here you can find the structures BAPI_TE_ and BAPI_TE_X.

For example for Z-field in MARA:

BAPI_TE_MARA and BAPI_TE_MARAX.

So if you add new field in MARA and you want to transfer its value by this BAPI, you have to add it in the BAPI structures too.

So you should have:

- MARA-ZFIELD

- BAPI_TE_MARA-ZFIELD

- BAPI_TE_MARAX-ZFIELD.

But while BAPI_TE_MARA-ZFIELD is like MARA-ZFIELD, BAPI_TE_MARAX-ZFIELD has to be a flag (so long only one char).

So if you've to transfer the new fields by BAPI you've to fill the extensions structure in this way:

TABLES: BAPI_TE_MARA, BAPI_TE_MVKE, ......

DATA: EXTENSIONIN LIKE TABLE OF BAPIPAREX.

DATA: EXTENSIONINX LIKE TABLE OF BAPIPAREXX

New fields of MARA

BAPI_TE_MARA-ZFIELD1 = .....

BAPI_TE_MARA-ZFIELD2 = .....

BAPI_TE_MARA-ZFIELD3 = .....

............................

BAPIPAREX-STRUCTURE = 'BAPI_TE_MARA'.

BAPIPAREX+30 = BAPI_TE_MARA.

APPEND BAPIPAREX TO EXTENSIONIN.

BAPI_TE_MARAX-ZFIELD1 = 'X'.

BAPI_TE_MARAX-ZFIELD2 = 'X'.

BAPI_TE_MARAX-ZFIELD3 = 'X'.

............................

BAPIPAREXX-STRUCTURE = 'BAPI_TE_MARAX'.

BAPIPAREXX+30 = BAPI_TE_MARAX.

APPEND BAPIPAREXX TO EXTENSIONINX.

New fields of MVKE

BAPI_TE_MVKE-ZFIELD1 = .....

BAPI_TE_MVKE-ZFIELD2 = .....

BAPI_TE_MVKE-ZFIELD3 = .....

............................

BAPIPAREX-STRUCTURE = 'BAPI_TE_MVKE'.

BAPIPAREX+30 = BAPI_TE_MVKE.

APPEND BAPIPAREX TO EXTENSIONIN.

BAPI_TE_MVKEX-ZFIELD1 = 'X'.

BAPI_TE_MVKEX-ZFIELD2 = 'X'.

BAPI_TE_MVKEX-ZFIELD3 = 'X'.

............................

BAPIPAREXX-STRUCTURE = 'BAPI_TE_MVKEX'.

BAPIPAREXX+30 = BAPI_TE_MVKEX.

APPEND BAPIPAREXX TO EXTENSIONINX.

and so... (for all material tables you've enhnced)

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

..............

TABLES

..............

EXTENSIONIN = EXTENSIONIN

EXTENSIONINX = EXTENSIONINX.

When this BAPI works, it runs a piece of code like this to transfer the data from extension structure to database table:

LOOP AT EXTENSIONIN.

CASE EXTENSIONIN-STRUCTURE.

WHEN 'BAPI_TE_MARA'.

MOVE EXTENSIONIN+30 TO BAPI_TE_MARA.

WHEN 'BAPI_TE_MVKE'.

MOVE EXTENSIONIN+30 TO BAPI_TE_MVKE.

WHEN ........

....................................

ENDCASE.

ENDLOOP.

LOOP AT EXTENSIONINX.

CASE EXTENSIONIN-STRUCTURE.

WHEN 'BAPI_TE_MARAX'.

MOVE EXTENSIONIN+30 TO BAPI_TE_MARAX.

WHEN 'BAPI_TE_MVKEX'.

MOVE EXTENSIONIN+30 TO BAPI_TE_MVKEX.

WHEN ........

....................................

ENDCASE.

ENDLOOP.

After check the field where the flag is setted and move the value to database (i.e. MARA, MVKE ,.....)

Max.

12. Debug scripts?

Ans. One way to start the script debugger is:

Se71->utilities->activate debugger.

This may be a time-consuming process. Instead, open a session and execute the program RSTXDBUG. Even if you follow the above menu path to activate the script, it will internally execute the program RSTXDBUG. So you are saving some time in going through all of the above processes.

Another advantage of using this program: when a developer works in the support environment and the client requests to makes some changes to a form, but doesn't know which form, he can just show the form output and request for changes.

Example: Transaction Code HRBEN0001. This contains a confirmation form, benefits form and others.

In this scenario, just open the other session and run the program RSTXDBUG program, click a push button on the transaction code and if a form is associated with that button it is automatically opened in debug mode. Once the form is in debug mode you can find the form name then open one more session and make the changes to the form while debugging it.

13. Different types of windows in SMARTFORMS?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 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.

14. What is function module?Ans. Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system. Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder. The Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.

15. BAPIS AND RFCS?

Technically, not much at all. They are both remote enabled functions that can be accessed from outside of SAP (to be more technically correct, from outside of the ABAP stack).

From a usage/functional perspective however, BAPIs are a little bit more special from RFCs.

Bapis:

- are designed as the methods of business objects in the business object repository (accessable using transaction BAPI or SWO1)

- have non-technical parameter names (the technical field names in SAP are mapped)

- have a fixed interface and functionality across all SAP releases (this is probably the key point as it means you can develop integrations with them which do not need to be changed when you upgrade)

Generally, if you are trying to find a function for a particular requirement you should look for a BAPI first, then for a RFC function which has a released status (check the function attributes in SE37), and then just a normal RFC last.

The benefit of an RFC function with released status means that it also has a fixed interface which will not change with new SAP releases.

Hope that helps.

16. MOVE and MOVE-CORRESPONDING stmts?Ans. MOVE-CORRESPONDINGSyntax MOVE-CORRESPONDING struc1 TO struc2.

Effect Structures must be specified for struc1 and struc2. All components with the same name are searched for in struc1 and struc2 and the content of components in struc1 is assigned to the components with the same name in struc2. All other components are not affected.

Nested structures are fully expanded. The names of the components are compared to the lowest common level. For each comp component pair with the same name, the

MOVE struc1-comp TO struc2-comp.

statement is executed, and - if necessary - the corresponding conversions are performed.

MOVE:Move the content of an internal table/variable to another internal table/variable

Syn: MOVE T_TEST-FIELD1 TO T_TEST2-FIELD1.

ACCENTURE

1. how to display footer in last page in forms?

Ex: there is 4 pages we want to display footer in 4th page

there is 3 pages we want to display footer in 3rd page

there is 1 page we want to display footer in 1st page

2. What is table controls in BDC?

Ans. When working with BDC for Table Control you require work around to get next page of table control. You need to use the BDC OKCODE =P+.BCD_OKCODE is for Page down that can be used for scrolling down in table control. so you can fill data in to table grid.

Ans 2. BDC table control is an area on the screen in which you can display data in tabular form. You process it using a loop. Table controls are comparable to step loop tables. While a table control consists of a single definition row, step loop blocks may extend over more than one row. Table controls are more flexible than step loops, and are intended to replace them.

When you need to handle a scenario like in sales order, it may contain more than one material, if you have more than one material we have to use table control, it will have number of columns and number of rows.Table controls allow you to enter, display, and modify tabular data easily on the screen3. There is a chance to do multiple transactions in call transaction?

Ans. Yes, but at a time it is not possible. After completion of first transaction4. What is protect and end protect in scripts?

Ans. You can specify either in the style or in the layout set that a particular paragraph should not be split in two by a page break. If the page protect attribute is set then the complete paragraph is always output on a single page. This property applies only to that particular paragraph. SAP Script provides the PROTECT... ENDPROTECT command pair to allow you to define the areas to be protected against a page break on an individual basis. Thus the PROTECT/ENDPROTECT commands may be regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines enclosed between the two commands fit in the space remaining in the current main window.5. change pointer technique in ale/idocs?

6. what is message type and idoc type?

7.how to find suitable badi for u r requirement?

8. how to use select-option without ranges?

9.what is external subroutine?

10.how to use tables in function modules?

11. how to display alv output in 3 blocks using normal alv reports( like header part , middle part, footer part)?

12. What are events in alvs?

13. What is the difference between BDC_OKCODE and BDC_CURSOR?BDC_OKCODE:is used for storing commands during the recording. Like '/00' is the command for 'ENTER' Key.

BDC_CURSOR:contains the cursor position. It contains the field in which cursor will be.Example code:Perform bdc_field using 'BDC_CURSOR' 'PROJ-PSPID'.Perform bdc_field using 'BDC_OKCODE' '=BU'.Accneture(client):1. How can u show the difference in ur tech spec from others?

2. How can you take care of performance of a abap program?

3. pre-requisit for for all entries? what happened if above internal table was not filled?

4. Which parameter in a function module will u prefer to export tables?

5. What is IN UPDATE TASK? Ans. Update task mode in function module

We can call a function module in Update task mode by using IN UPDATE TASK" statement. It allows you to call a function module but it will not be executed/called until an update task is initiated by the 'COMMIT WORK' statement in the report. This means that the program logic after calling the FM will immediately continue with the next line of ABAP code and the function module will wait for the commit work statement and after that it will be executed/called.

Example:CALL FUNCTION 'ZAU_FUNCTION' IN UPDATE TASKEXPORTING P_UNAME = sy-uname.Loop at it_mara to wa_mara."Program continues without executing the function.endloop.commit work. "Commits all work to database and also starts all FM's running in update task

Why its used ?Suppose you need to call / perform some actions only after database updation and not before that.

6. How can u find out a Badi?

7. Process to find out a user exit?

8. Tell me the Badi name u had used?

9. Any one of the Bapi name u had used?

10. How can we transalate language of sf standard text?11. How can we create update fm?

Ans. Creating Update Function Modules

To create a function module, you first need to start the Function Builder. Choose Tools ABAP Workbench, Function Builder. For more information about creating function modules, refer to the ABAP Workbench Tools documentation.

To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:

Update with immediate start:Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.

Update w. imm. start, no restart:Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.

Update with delayed startSet this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.

To display the attributes screen in the Function Builder, choose Goto Administration.

Defining the Interface

Function modules that run in the update task have a limited interface:

Result parameters or exceptions are not allowed since update-task function modules cannot report on their results.

You must specify input parameters and tables with reference fields or reference structures defined in the ABAP Dictionary.

12. Instead of using commit and rollback why u r using IN UPDATE TASK?

13. Some tables of customer master?

14. Which module u are working?

15. Have u worked on pricing in sd?

16. Have u write any formulas?

17. Have u worked on currency conversions?

18. vbpa Table description?

19. Have u worked on IDOCS?

20. Have u knowledge on Adobe forms?

21. Have u worked on enhancements frame work?

22. ALV FM'S?

Wipro

1. Difference b/w scripts and Smartforms?

Ans. 1) Script is Client Dependent whereas SMARTFORM is client Independent.

2) We can't cave script without Main window but SMARTFORM we can.

3) After executing SMARTFORM it generates a function module Script doesn't.

4) We can set background Image to SMARTFORM but not in Script

5) We can add color in SMARTFORM but not in Script.

6) In Script we can maintains up to 99 main windows but in SMARTFORM can maintain only one Main window.

We cannot create sap script without main window.

But we can create smart form without main window.

2. Difference b/w classical and interactive reports?

3. Difference b/w user-exit and customer exit?

Ans. 1.USER EXITS are FORMS and are called by SAP standard programs using PERFORMS (subroutines). CUSTOMER EXITS are FUNCTIONS so they are called using CALLFUNCTION (function modules)

2. Inside the form (user exit) you can read and change almost any global data from host program.

Inside a function (customer exit) you can only access your import/export/changing/tables parameters.

3. User exits are more flexible because you have more information to use in your code but on the other hand, it is very easy to manipulate erroneously global data and lead the standard program to a dump or even to make database inconsistent.Customer exits are more restrictive but you are sure any change you can make to any parameters will never lead to inconsistency.4. User-exit doesnt have any classification.

In customer-exit we have function-module exit, screen exit, menu exit.

5. User exits are basically designed For SD module.

Customer exits are available for MM, SD, FI, HR..Basically designed for all modules.

4. Tell me about roles and responsibilities of your project?

5. Events in reports?

Ans. LOAD OF PROGRAM

INITIALIZATION

AT-SELECTION SCREEN ON

AT-SELECTION SCREEN

START-OF-SELECTION

TOP-OF-PAGE

END OF SELECTION

END OF PAGE

Q. Difference b/w RFCs and BAPIs ?Bapi can't handle exceptions, the calling program has to handle it whereas RFC fm can handle it.

Every BAPI is a RFc whereas every RFC is not a BAPI.

Rfc enabled are basically for sap systems whereas BAPI are for non sap systems like i want to access data via java or vb.

Ans 2. -- BAPI are RFC enabled function modules. -- The difference between RFC and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. In this case u only specifies the business object and its method from external system in BAPI there is no direct system call. -- While RFC are direct system call 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.6. Difference b/w BDC and Bapi?

Ans.

BDC stands for Batch Data Communication; Through BDC you are going to update screens.

BAPI stands for Business Application Programming Interface.Through bapi you are going to update Data Base Tables directly.

(Whenever screen of a particular transaction changes, you need to redo the work in case of BDC.

(Whereas in case of BAPI SAP will take care as it will update the Database Tables Directly.

(BAPI is directly updated the database instead BDC run through the screen flow.

So BAPI can't handle all the flow logic checking and enhancement put by programmer to facilitate the user requirement.

(BAPI is a higher end usage for transferring the data from SAP to non-SAP and vice-versa. for ex: if we are using VB application, where in that we want to connect to SAP and retrieve the data, and then change and update the data in SAP for that purpose we can use that.

(There is one more advantage using BAPI instead of BDC. When we go for up gradation, there might be possibility to change the screen elements for transactions depending on the requirement.

( In that case, our BDC program may or may not work (depending on the screen changes they have made).

BAPI is used only when it is available for the particular transaction like Delivery Sales order. But BDC can be used for any transactions which have screen and fields.

7. How to handle errors in call transaction method in bdc? Ans. Errors while updating the database using call transaction technique are trapped using a structure bdcmsgcall, whose field msgtyp become e when an error record is encountered. Those records are formatted using format_message function call in the desired format and stored in an internal table for listing of all error records in one shot.

----------------------------------------

1. Diff b/w call transaction and session methods?

Ans. Here the differences between session and call transaction

Call transaction:

1) Synchronous process

2) Asynchronous /synchronous update

3) Single transaction only handled

4) Small amount of data uploaded.5) Explicit error handling (Means all the error records move to internal table and validate)

6) Time requirement is low.

Session method:

1) Asynchronous process.2) Synchronous update.3) Multiple transactions can be handled (Means u can upload the data at a time for more than one t-code).4) Huge amount of data can be uploaded.

5) Implicit error handling (Means for errors SM35)

6) Execute the session on a specific date. (By using hold date parameter)

7) Time requirement is more

2. Events in alv reports?

These are the main events that are used in an ALV report.

1. USER_COMMAND 2. TOP_OF_PAGE

3. PF_STATUS_SET 4. TOP_OF_LIST

5. END_OF_PAGE

6. END_OF_LIST

7. SUBTOTAL_TEXT

3. Purpose of start-of-selection and end-of-selection and when they are triggered?

Ans. START-OF-SELECTION: this will trigger after leaving the selection-screen and before extracting data.Purpose: it is used to extracting the data

END-OF-SELECTION: this is used to process the data and display the data. This will trigger after extracting the data before processing the data.

4. Where we can write the at line selection screen event (how it works)?

5. How to display color for particular field in ALV?

EMPHASIZE is the command to provide the colors in ALV report.

Syn: CXYZ

C for getting color

X color number

Y intensity of color

Z foreground/background (1-back ground, 0- foreground)

6. How to find BADIS?

Ans. Scenario: Need to find the name of the BADI available in a transaction

1. Go to Transaction SE24 2. Enter the Object Type CL_EXITHANDLER and click on Display. 3. Double Click on method "GET_INSTANCE". 4. Put a Break-point on Call method cl_exithandler=>get_class_name_by_interface 5. Run any Transaction for which you need enhancements. 6. The execution will stop at the break point. Check the values of variable 'exit_name', it will give you the BADI name called at that time. This way you will find all the BADIs called on click of any button in any transaction.

Ans 2. There are several ways to find BADIs in the program.

1. Set a break-point in method CL_EXITHANDLER=>GET_INSTANCE. Because old BAID technology will always call this method to get the BADI instance.

2. Search string CL_EXITHANDLER=>GET_INSTANCE in the program. This drawback of this method is that the program may call another program in the runtime. In this case, you will be able to find the BADI in another program.

3. You can also go the t-code SPRO, you can also find plenty of BADIs in the related area.

4. You can also find the BADI call using ST05. Below are the steps:

Go to ST05, then choose table buffer trace and activate the trace.

Run the t-code from where you want to find the BADI.

Deactive the trace and then display trace.

Using selection criteria object V_EXT_IMP and V_EXT_ACT and then you can get called BADI list.

This analyzing technique is based on the fact that all BAdIs are registrated in SAP database tables. So for each BAdI call these database tables will be accessed. The BAdI database tables are SXS_INTER, SXC_EXIT, SXC_CLASS and SXC_ATTR. These tables are always accessed by the views V_EXT_IMP and V_EXT_ACT. So these two ABAP views (T: SE11) will be the basis for the trace.

Ans 3. FIND A BADIthese steps should enable you to find any BADI related to any transaction in a matter of minutes.1) Go to the transaction SE37 to find your function module.2) Locate the function SXV_GET_CLIF_BY_NAME.3) Put a breakpoint there.4) Now open a new session.5) Go to your transaction.6) At that time, it will stop this function.7) Double click on the function field EXIT_NAME.8) That will give you name of the BADI that is provided in your transaction.

OR

GOTO SE24 - CLASS BUILDERGo the class CL_EXITHANDLERgo to its method GET_INSTANCE

and put a breakpoint in this line calling the methodCALL METHOD CL_EXITHANDLER = > GET_CLASS_NAME_BY_INTERFACE7. Diff b/w BDC and BAPI?

Ans. A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate

with each other at the Business Object / Process level.

Check this link to know more about BAPI.

http://www.sapgenie.com/abap/bapi/example.htmhttp://sappoint.com/abap/

Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a

typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.

BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form

of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The

transaction is then started using this internal table as the input and executed in the background.

In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.

It can also be used for real-time interfaces and custom error handling & logging features. .

To know more about BDC,

check the link.

http://sappoint.com/abap/

Main differences are...

In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap system.

Where as bapi's are remotely enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.

not only that...

when you plan to upgrade your system version then bdc will not support those upgradation where as bapi's will support.

7. Anything is stored in DB while creating VIEWS?

Ans. data of a view is derived from one or more tables, but not stored physically.( is it possible to bring select option in module pool screens?Ans. Create SELECT-OPTIONS in module pool screen using two methods as shown.

Method 1:-a) Create a subscreen area in your screen layout where you want to create the select options.

b) In the top include of your module pool program declare a selection screen as a subscreen e.g.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.Select-options s_matnr for mara-matnr. SELECTION-SCREEN END OF SCREEN.c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).

CALL SUBCREEN sub_area INCLUDING

This CALL SUBSCREEN statement is necessary for transport of values between screen and program.

Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.

Method 2:-a) Create 2 separate fields in your screen layout one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.

continued

struc_tab_and_field-fieldname = con_cust. KUNNRstruc_tab_and_field-tablename = con_kna1. KNA1.CALL FUNCTION COMPLEX_SELECTIONS_DIALOG EXPORTING*TITLE = text = g_titl1 Customerstab_and_field = struc_tab_and_fieldTABLES RANGE = rng_kunnrEXCEPTIONSNO_RANGE_TAB = 1CANCELLED = 2INTERNAL_ERROR = 3INVALID_FIELDNAME = 4OTHERS = 5.IF NOT rng_kunnr[] IS INITIAL.* Read the very first entry of the range table and pass it to* dynpro screen field*READ TABLE rng_kunnr INDEX 1.IF sy-subrc = 0.g_cust = rng_kunnr-low.ENDIF.ENDIF.You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.

Honey Well

1. Use of driver program in smart forms?

Ans. This is used to process the data and to pass the data to form (Layout).2. Use of FM in driver program of SF?

4. what are the fields displayed in Purchase Order creation, where you get those fields?

5. Which BAPI your used?

Ans. Both standard and user defined6. COMMIT and ROLL BACK in bapi?

Ans. Commit is the thing which saves the changes you made to the database .it is an interface technique it is a direct input method.

for example you have inserted some data into one table by using this BAPI technique but you not done the Commit BAPI then what happens is the changes u made to the database cannot been seen in the table these will get effective once u have Done the Commit BAPI.Rollback

see by taking the above example only we can know what is Rollback it is nothing but UNDO option in ms office se until saving if we want one step back we will do it by undo option am i right.

Similarly until commit in i.e. nothing until saving the changes made u can delete the modified change.Call function 'BAPI_PO_CREATE1'

'....................

After that

If u wants to do commit, just add this statement.

COMMIT WORK.If u wants to do roll back, just add this statement

ROLLBACK WORK.

9. Names of Development, testing, quality servers?

10. What is LOCK OBJECT?

Ans. The SAP System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

There are 3 types

1. READ LOCK(Shared lock)

It allows read access for other transactions but not write access to locked area of table data

2. WRITE LOCK

It allows write access for other transactions but not read access to locked area of table data

3. Enhanced lock

This is advance write lock

Whenever lock object applies on a table, two function modules will work.

Those are 1) ENQUE: It is used to lock the table while a command is working on table. 2) DEQUE: It is used to unlock the table after command working is complete.11. Before Developing Objects we are create transforms/transports, who created those transforms/transports?12. T.Code for transports creation?

Ans. The main transactions used to create/maintain a Transport Request are: Tx SE01, Tx SE09 and Tx SE10. With Development and Configuration Transport Requests are usually created automatically then use Tx SE09 or Tx SE10 to release the Request and Task.IGATE1. Different types of internal tables?

Ans. Internal tables are 2 types 1) INDEX 2) Hashed

Index internal tables are again two types: 1) Standard int table

2) Sorted int table

STANDARD int table:

It allows duplicate records

No need to maintain unique or non-unique key

Record will be added to int table with APPEND key word

Records will be searched using linear search

Internal table table will be sorted using SORT key word explicitly

Syntax: Data: like STANDARD table of .

SORTED int table

It doesnt allows the duplicate records

At least one field should be unique/non-unique key

Records will be added to int table using INSERT key word

Binary search is used to search the records from int table

No need to sort the int table because as a default int table will be sorted

Syntax:

Data: like SORTED table of with UNIQUE/NON-UNIQUE KEY .

2) HASHED int table

It also doesnt allows the duplicate records

At least one field should be unique

Records will be added using INSERT key word

Mid- point algorithm is used to search the records from int table.

Syntax:

Data: like HASHED table of WITH UNIQUE KEY .

2. Inner Join syntax?

Ans. Select t001~bukrs too1~butxt too1~ort01 t001~land1 knb1~kunnr knb1~erdat into it_final from too1 innerjoin knb1

On t001~bukrs = knb1~bukrs

Where t001~bukrs in s_bukrs.

3. FMs in outbound side of idocs?

4. How you can display data using TBC(connection from one layer to another layer)?

-------------------------------------------------------------------1. Different types of invoices?

2. What are indexes?

Indexes allow the database application to find data fast; without reading the whole table.

An index can be created in a table to find data more quickly and efficiently.

The users cannot see the indexes, they are just used to speed up searches/queries.

Note: Updating a table with indexes takes more time than updating a table without (because the indexes also need an update). So you should only create indexes on columns (and tables) that will be frequently searched against.

3. If bdc_close_group FM is not written in session method then whats the effect?

Ans. 1. BDC_OPEN_GROUP - This FM is used to create a session in Application Server.

2. BDC_INSERT - This FM is used to insert the internal table records into

Session memory.

3. BDC_CLOSE_GROUP - This FM is used to save the records in session

Memory and close it to process later.4. If records are 200 or 300 in that case secondary indexes are not working then what can u do?

5. What is flow of projects?

6. Tcode for quotation

Robert Bosch1. ASAP methodology in sap abap?

Ans. ASAP Roadmap

Use

The ASAP Roadmap provides the methodology for implementing and continuously optimizing your SAP System. It divides the implementation process into five phases and offers detailed Project Plans to assist you (in Microsoft Project format). The documentation stored at each level of the Roadmap tree structure contains recommendations on implementing your SAP System and links to helpful tools and accelerators.

Purpose

When you install the Implementation Assistant you can choose from several Roadmap types and flavors.

Roadmap typesRoadmap flavors

ImplementationR/3 System (Continuous Improvement)

BW

APO

Business-to-Business Procurement

Global ASAPR/3 System

UpgradeR/3 System

In your implementation project (Roadmap type: Implementation), you can bring together several Roadmap flavors in one Roadmap. The Implementation Assistant also helps you to implement a combination of software implementation projects.Features

The implementation of your SAP System covers the following phases:

1. Project PreparationIn this phase you plan your project and lay the foundations for successful implementation. It is at this stage that you make the strategic decisions crucial to your project:

Define your project goals and objectives

Clarify the scope of your implementation

Define your project schedule, budget plan, and implementation sequence

Establish the project organization and relevant committees and assign resources

2. Business BlueprintIn this phase you create a blueprint using the Question & Answer database (Q&A db), which documents your enterprises requirements and establishes how your business processes and organizational structure are to be represented in the SAP System. You also refine the original project goals and objectives and revise the overall project schedule in this phase.3. RealizationIn this phase, you configure the requirements contained in the Business Blueprint. Baseline configuration (major scope) is followed by final configuration (remaining scope), which can consist of up to four cycles. Other key focal areas of this phase are conducting integration tests and drawing up end user documentation.

4. Final PreparationIn this phase you complete your preparations, including testing, end user training, system management, and cutover activities. You also need to resolve all open issues in this phase. At this stage you need to ensure that all the prerequisites for your system to go live have been fulfilled.

5. Go Live & SupportIn this phase you move from a pre-production environment to the live system. The most important elements include setting up production support, monitoring system transactions, and optimizing overall system performance.

After your system has gone live, you can use a separate Roadmap with six work packages, in order to optimize your SAP System continuously.

These phases are the main milestones for your SAP System implementation project. Each phase has:

Work packages, which consist of activities, for which project teams are responsible.

Activities, which consist of tasks, which are processed by one or more team members.

Tasks, which are carried out by a project team member. You can also access the How-to sections and accelerators at this level.

2. Difference b/w supporting/up gradation and implementation project in detail?3. Purpose of hide statement?

Ans. You use the HIDE technique while creating a list level to store line-specific information for later use. To do so, use the HIDE statement as follows:HIDE .

This statement places the contents of the variable for the current output line (system field SY-LINNO) into the HIDE area. The variable must not necessarily appear on the current line.

To make your program more readable, always place the HIDE statement directly after the output statement for the variable or after the last output statement for the current line.

As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored. A line can be selected

By an interactive event.

For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.

By the READ LINE statement.

You can think of the HIDE area as a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table.

4. Different types of alv reports?

Ans. There are 3 types of alv reports are there

1. Simple ALV reports 2. Blocked alv reports: In this case more than one independent block is displayed in the output. This is generally used when we need to display data from two internal tables in the same list where the structure of the table isdifferent. The following FM r used.

REUSE_ALV_BLOCK_LIST_INIT

REUSE_ALV_BLOCK_LIST_APPEND

REUSE_ALV_BLOCK_LIST_DISPLAY3. Hierarchical alv reports: Hierarchical ALV are used to display the header and item data in a single layout. i.e., we are displaying data like TREE.

>>>Header data at top level

>>> Item data at next level

>>> Sub item data at child level...5. Events in smart forms?

Ans. 1. AT-FIRST: This is used when we want to execute the statements before records are processed.

2. AT-NEW: This event is used when we want to execute the statement before group of records are processed.3. AT-END: This event is used when we want to execute the statements after processing of group of records.

4. AT-LAST: This event is used when we want to execute the statements after all records are processed.

6. Diff b/w table and structure in smart forms?

Ans. template -- Template is fixed in size.

--Template is Output of a table containing static data

-- These are the possible direct successors-All except window, page, table, and template nodes

-- Template is used for proper alignment of data which table is used for displaying multiple data.

--We can say Template is for static data

Table

--Table - Output of a table containing application. --Data and these are the possible direct successors-as with template node. --And Table is for dynamic data. Table extends dynamically.

Suppose we have a requirement in which we have to align the customer address in such a way as shown below:-

Ex: Name- Krishna Company- WIPRO Location- Chennai

Design- S/W Native - Mumbai

Then for proper alignment we can create a template and split that into 3 columns and 2 rows and create text elements for each cell display a proper aligned data at the output.

When we include a template inside a loop it gives the same property as a table.

When we have multiple data which is to be extended to the next page like, when we display all employee details in a company we use table.

Table has 3 sections, HEADER, ITEM, and FOOTERThe header section will be executed once and it will loop at the item level. At the end footer will be executed.

7. What is company code?

8. How many secondary lists in interactive reports?

Ans. 1 basic list and 20 secondary lists

9. Diff b/w reports and interactive reports?

Ans. Classical ReportsThese are the simplest reports. It is just an output of data using the Write statement inside a loop.

Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.Interactive Reports As the name suggests, the user can interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.

And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.

We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).

10. How to develop variable window in smart forms?

11. In which case you use SD?

12. How to edit alv report after displaying the report?

Ans. In ALV Reports, the output is displayed by using the function module:

REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY

Input for the above function modules is program name and fieldcatalog and data internal table.

You can edit the records in the output list by using EDIT = 'X' option in the field catalog.

While filling the field catalog we have to consider the field EDIT = 'X'.

But this is used for print purpose only we cannot save into database.

Ntt data:1. Which syntax is used for BDC in application server?

Ans. u can use open dataset syntax

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.

open dataset, read dataset, close dataset are used to read and place the data in the application server.

--OPEN DATASET IS USED TO OPEN THE DATASET.Syntax: open dataset for input/output in text/binary mode encoding/ascii default.--CLOSE DATASET is used to close the dataset.Syntax: close dataset .2. Steps in ASAP methodology?

Ans. It would be helpful to go through the help document of ASAP Methodology.

The following information may clarify some doubts/requirements you have.

ASAP is Accelerated SAP, a methodology being used to complete an SAP implementation from End to End. Means, it has five phases and starts with

1) Project Preparation : where the SAP consultants try to understand the AS IS business process of the industry for which implementation is being done. The hardware and software requirements are analysed. Infact all the basic preparation is done at this stage.

2) Blue Print : After the AS IS study is made a TO BE process is evolved where in the client business is put in technically as to how it would be like in SAP. Blue is a binding between the implementor and Client. So, there is a sign off from the client on what is going to be done.

3) Realization : Here the blue print is configured on the system. For some processes where SAP cannot do as it is,like when there is a difference between AS IS and TO BE called a GAP , we use developers(ABAP) . The functional guys give the functional spec based on which the ABAP'rs prepare technical specs and fulfill the object ( may be reports, user exits, enhancements and so on). Also the unit and integration testing is done here.

4) Final Preparation : Here the enduser, core user training is completed on how he has to use the sap system. Master data uploads into the production server. In a way the system is getting for going live. And just before the go live date the data that needs to be put into sap is fixed and the remaining transactions of the business are recorded may be in a flat file or sometimes they are taken off so that upto date data in the production server is maintained.

5) Go Live and Support : Here finally the SAP system goes live and followed by some support as agreed upon in the service level agreements.

Q. Events in interactive report?

Events associated with Interactive Reports are:

1) AT LINE-SELECTION: It will trigger when ever user double click on any record of any list.

Advantage: It is used to pass the list number on which double clicked to the next list.

2) AT USER-COMMAND: It will trigger when we click on any menu items.

3) AT PF-STATUS: it will trigger when we click on any function keys

4) TOP-OF-PAGE DURING LINE-SELECTION : it will trigger at the top of secondary list

Advantage: it is used to provide the header in the secondary list.

4. Diff b/w normal and interactive reports?

5. Diff b/w session and call transaction

IBM1. How to give accessing of report to another person?

Ans. Using authorization objects

Creating authorization object1. To create the authorization object, choose the SU21 transaction.

2. First double-click an object class to select it.

3. Provide the name of the object and relevant text.4. Add the fields that should be included in the new authorization object.

5. Hit Save.. Once you click on save it'll ask for package details (select the relevant package from the drop down list) and save again.

6. New auth objected is created now.

7. Click on permitted activities to select the activities and save the changes.

Ans 2. Authorization Objects are used to manipulate the current users privileges for specific data selection and activities from within a program.

We could always create our own authorization objects and implement it in our own abap programs. As an example, we will create our own authorization field similar to TCD used in S_TCODE Authorization object.

Steps to create authorization field1. Go to transaction code SU202. Click the create new button on the application toolbar.3. Enter ZTCODE in the Field Name and TCODE in the Data Element, then hit Enter.4. Click the save button on the system toolbar.

Next step is to create the authorization class (see #1 in figure 1) and authorization object (see #2 in figure 1).

Steps to create authorization class1. Go to transaction code SU212. Click on the Create buttons drop down icon and select Object Class.3. Enter ZTRN on the Object Class field.4. Give it a description and save it.

Steps to create authorization object1. Again in SU21, in the list of authorization class (folder icon), click the one that weve created(ZTRN).2. Click on the Create buttodrop down, this time selecting Authorization Object.3. Enter Z_TCODE on the Object field and give it a description.4. On the authorization fields section, enter ACTVT and ZTCODE. ACTVT is used to set and limit the activity of the user, while the ZTCODE is the authorization field that weve created earlier which is responsible for holding a list of tcodes.5. On the Further Authorization Object Settings, click on Permitted activities button. Here we will select the specific activities that we want to be available for our authorization object.6. As an example, we will select 01(Create), 02(Change), and 03(Display).7. Save and Exit.

Now were done creating our own authorization object, let us now use and assign it to a user.

Steps to create a role(see figure 2)1. Go to transaction code PFCG.2. Enter ZAUTHTEST on Role field and click the Single Role button.3. Now give it a description, click the save button and click the Authorization tab.4. Click the Change Authorization Data button inside the authorization tab.5. Then click the Manually button on the application toolbar and type in the name of the authorization object that weve created earlier(Z_TCODE) and press enter.6. Expand all the nodes, double click on the input field of the Activity and select activity 01 and 02.7. Enter the tcode of our own abap program in ZTCODE field, in our example I used ZCOMM .8. And also dont forget to add the S_TCODE authorization object and enter ZCOMM on its field.9. Now Click on the Generate button in the application toolbar and press enter on the pop-up screen.10. press the back button and assign a specific user on the user tab and click User Comparison button.11. Now create another role by repeating steps 1 to 9 but this time select activity 03 on step 6.12. Then assign this 2nd role to another user.

(Figure 2)Now lets implement this authorization in our ABAP program. Let say we have a dialog program (ZCOMM) wherein we have a button on the screen that when clicked, the user will go to the Create/Edit screen(1000) if hes authorized. On the other hand, he will go to display only screen (2000) if hes not authorized. To do that, simply add the code below on your program.

AUTHORITY-CHECK OBJECT Z_TCODEauthorization object that weve createdID ACTVT FIELD 01Activity = 01, authorized to createID ZTCODE FIELD ZCOMM.tcodes that we wants to check for authorizationIF sy-subrc EQ 0.CALL SCREEN 1000.The user is authorized to createELSE.CALL SCREEN 2000.User is not authorized to create (Display only)ENDIF.

2. How to run a report?

3. What is authorization?

4. Validation in module pool?

5. Chain and end chain in module pool?

If the validation has to be done for more than one field those fields are included between chain and end chain.

Ex

In PAI if you want to validate group of fields put in chain and End chain statement. You can declare fields in the chain endchain.CHAIN.

FIELD chk_ABC.

FIELD chk_DEF.

FIELD chk_GHI.

FIELD CHK-JKL.

MODULE CHK_screenfields.

ENDCHAIN.

MODULE CHK_screenfields INPUT.

CLEAR okcode.

okcode = sy-ucomm.

CASE okcode.

WHEN 'ENTER' OR 'EXECUTE'.

IF chk_ABC IS INITIAL AND chk_DEF IS INITIAL AND CHK_GHI

IS INITIAL .

MESSAGE e000(zo_spa) WITH text-017. " Enter VALUES'

ELSE.

.....

ENDIF.

ENDIF.

ENDMODULE. " modify_screenfields INPUT

6. How to know the errors using bapi while uploading data?

Ans. A BAPI should be able to record and classify all possible errors that may occur a function Module BAPI_MESSAGE_GETDETAIL is used to handle the Error Messages.

You have to create a parameter named Return for every BAPI. This parameter returns exception messages or success messages to the calling program.

BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding. In particular they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter. Otherwise the BAPI will not be processed correctly and control may not be given back to the calling program.

All error messages or indeed any message that may be returned by the BAPI, must be defined in message table (Tools ABAP Workbench Development Programming environment Messages) and described in the documentation for the return parameter. This also applies to the most important or most likely error messages generated by other programs that can be indirectly passed via the BAPI to the application program.

You must not use exceptions in BAPI interfaces.

When a termination message (message type A) is triggered, a database rollback is executed in the standard programming model, that is, all tasks performed since the last COMMIT WORK are canceled. When you program BAPIs, we recommend that you also execute a database rollback in the return parameter for termination messages. You must describe this process in the documentation for the Return parameter. For messages of type E (error), the calling program performs the error handling.

Application developers are provided with two service BAPIs to diagnose and process error messages from BAPI calls:

BapiService.MessageGetDetail () displays the short and long texts of BAPI error messages.

BapiService.ApplicationLogGetDetail (), with which information in application logs can be displayed.

Features

The export parameter Return can be implemented as follows:

As a structure, whereby it must be defined in the function module as an export parameter, as well as in the method in the BOR.

As a table, whereby it must be defined in the function module as a table parameter, as well as in the method in the BOR as an export parameter.

Before filling the Return parameter you should either initialize the structure with CLEAR or the table with REFRESH and CLEAR.

If the return parameter is not set or is set to an initial value this means that no error has occurred.

The Return parameter may be based on the following reference structures:

BAPIRET2

You must use this reference structure when developing new BAPIS.

BAPIRET1, BAPIRETURN

These reference structures are still partly used in old BAPIs.

Both structures must be filled in the logon language.

7. Diff b/w sorted and hashed internal 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.

8. How to use NACE transaction (configuration)?

Ans. NACE is the t. Code to configure the form and driver program.Example: if we create a form and driver program related to BILLING (invoice) or if we want to identify the Form and program name of an application (Purchase order, sales order, billing, delivery note etc).

Goto NACE t.code Select Billing (V3)

|

Click on Output types

|

Now scroll down and identify the required output type (Ex: invoice) and select it

|

Now double click on Processing routines

|

Now click on Change icon to include our form name and program name

|

Save

9. What are the methods to debug the scripts?

Ans. Two ways to debug sap script.

first way is go to SE 71 and from menu bar select Utilities->activate debugger .then go to SE38 execute the print program ,it automatically goes to debugging mode.

The other way is, run the program RSTXDBUG in se38. Execute it. A message will show that debugger is activated .now open the print program in se38.u will notice that the print program is automatically diverted to debugging mode.

10. Procedure of uploading data using bapi?

11. Difference b/w elementary search help and collective search help?

Ans. 1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. Collective search help thus can offer Several alternative search paths.

3) An elementary search help defines the standard flow of an input help.4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with collective search help.5) A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.6) 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.

12. Diff b/w function module and remote function module(RFCS)?

13. ENHANCEMENT FRAME WORK? Ans. The Enhancement Framework enables you to add functionality to standard SAP software without actually changing the original repository objects and to organize these enhancements as effectively as possible.

The basic idea of the Enhancement Framework is to make modification-free enhancements of development objects such as programs, function modules, global classes, and Web Dynpro components. It is the new state-of-the-art technology that SAP recommends to enhance and change SAP programs. These technologies and the new kernel-based BAdIs are now integrated in one framework that has the following features:

Enhancements of existing development objects on different levels - for example, in an industry solution, in the IT department of the customer, and in a customer's company.

Better upgrade support Switching of enhancements with the Switch Framework

Support for grouping enhancements and appropriate tool support for documentation.

An enhancement project needs even more planning than a normal development project because it combines the customer code with the code of the underlying application. Enhancements are changes at a very low technical level and should be performed very carefully so that they do not violate the logic of the program they enhance. It is highly recommended to set up a process that defines who is allowed to design and implement enhancements.

Scope and Limitations

The new Enhancement Framework is intended to integrate existing enhancement and modification concepts and addresses recent developments such as Web Dynpro. The classic technology for appends and includes cooperates perfectly with the Enhancement Framework but is not yet integrated in it. If you want to be able to enhance all layers of an application, the classic append technology is still necessary.

Integration

The main tool for performing enhancements is the Enhancement Builder, which is integrated in the ABAP Workbench.

The enhancements can be switched using the Switch Framework. An enhancement takes effect when the package in which the above enhancement components are defined is assigned to a switch of the Switch Framework and this switch is not deactivated.

14. What is the main difference between Enhancements and BADI?

Ans. Main difference Between: Enhancements is Client Dependent BADI is client in-dependent.

Classic enhancements can have only one Implementation. Whereas BADI can have Multiple Implementations, Enhancement means to modify the standard transaction based on the user requirements. But BADI isone part of enhancement. Its full and full oops oriented concept.ACCENTURE1. HOW TO EDIT THE DATABASE TABLE?

Ans.

How to edit entries of table in se11 ?

To update the data of any table, go to transaction SE16N, type &SAP_EDIT. It will activate SAP editing function.

---

Go to table and press Ctrl+ shift + F10 where you will go to table entries. Click on F8 (execute).

And then select the entries that you want to edit by selecting the checkbox and goto menu Table entry - > select change. There you edit and save the entries.

---

You cannot edit entries in SE11 unless it contains a Table maintenance generator.

So just build a Table maintenance generator.

Do not delete any entries using &SAP_EDIT...it is not recommended.

---

You can edit through debugging.

How to delete a record in SE16 ?

To delete the records from particular table its easy.

Goto : se11

- Give the table name

- Execute the table with the selection fields

- Then data (list) screen will be displayed.

- Now select the record which has to be deleted

- Select that and switch 'on' the Debugging mode press enter

- Then press F6 goes to subroutine where there is field called display

- Instead change it to edit and then save the changes then it will take you to the screen where you can edit that records & also delete that particular records.

Note:

After displaying the contents of the list.

Switch ON the Debug Mode the select the particular record then click display then it will take u to Debug Screen when there is a program for sy-ucomm then click F7 Button and then Change Code = EDIT then save the code the afterwards it will take u to edit mode of that particular record.

How can I insert new data in the table?

Give the transaction code as se11

In that give the table name and press display

Then in that field name above there is delivery and maintenance click the same and change it as display maintenance allowed.

KPMG1. What are different types of DB tables?2. Different types of FUNCTION MODULES? And use of function modules in ABAP?

3 types of Function modules.

Normal

Remote-enabled (RFC)

Update

NORMAL FUNCTION MODULE:

Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together, Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library, unlike subroutines, you do not define function modules in the source code of your program.

REMOTE FUNCTION MODULE (RFC):

RFC (Remote Function Call) is an extension of CALL FUNCTION in a distributed environment. Existing function modules can be executed from within a remote system (R/2 or R/3) via an

RFC Call. Adding a Destination clause to the CALL FUNCTION statement does this.

The destination parameter displays an entry in the RFCDES table (which is defined with t.code SM59). This entry contains all necessary parameters to connect to and log in the destination system. The RFC API on OS/2, Windows, Windows NT and all R/3 based UNIX platforms makes it

possible to use the RFC functionality between an SAP System and a non SAP System.

UPDATE FUNCTION MODULE:

These function modules are used to update the database tables. Using the function module in updating the database table helps in updating the database without any irregularities.

3. what is UPDATE function module in sap bap? How to create it? And whats the use of UPDATE function module?

4. difference b/w normal function modules and BAPis?

5. how to upload the data using BDCs?

6. what is module pool? What you done in MODULE POOL?

7. t.codes for reports and table maintenance generator?

8. HOW TO upload the 1000 records of excel sheet using Table Maintanace Genereator?

9. how to edit the classical reports?

10. how to copy the reports from one client to another client?

Mindtree & hcl

1. Prerequisite for read and for all entries?

Ans. Prerequisite for READ statement is, we must sort the internal table before reading. Read statement is basically to read an internal table...while mentioning the key they should be in the same order as they appear...we can use binary search statement

as well in READ. But the perquisite for it is that the table should be sorted as per the key...

FOR ALL ENTRIES is used to replace nested select loops by operations on internal tables.

Things to be considered when working with 'for all entries':

1) Make sure that the select contains atleast the primary key fields

2) IF NOT IS INITIAL. is a mandatory check before FOR ALL ENTRIES.

2. How to fill segments in IDOC( randomly or one by one if there are 1 parent and 2 child segments)?

3. How SAP handles Child Idoc segment data insertion automatically ?

4. Function modules in IDOCS?

5. What is constructor?

6. When u prefer call transaction and when u prefers session method?

7. When u go for BDC and when u go for BAPI ?

8. How to edit alv reports output?

Ans. In ALV Reports, the output is displayed by using the function module:

REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY

Input for the above function modules is program name and fieldcatalog and data internal table.

You can edit the records in the output list by using EDIT = 'X' option in the field catalog.

While filling the field catalog we have to consider the field EDIT = 'X'.

But this is used for print purpose only we cannot save into database.

Questions asked in InterviewsAfter Observing many interviews. Finally I come up with the following questions which are mostly asked in all the big companies including SAP Labs, Accenture, IBM, Deloitte, TCS, and Infosys etc

8. What is partner selection?Ans. This concept is mainly used in IDOC where u select the partner profile using Tcode We20 .with Tcode SM59 you create RFC(remote function call) to create communication link to a remote system.

10. What is occurs in internal table?Ans. Occurs addition to the Declaration will give initial size to that table. Occur statement allocates 8kb of memory to the internal table.

12. What is the difference between scrolling a table horizontally and vertically..??Ans. In table control when you scroll a table vertically presentation server needs to call application server to fetch the next record and display in the table while in case of horizontal scroll there is no need to call application server.

13. What are Field Groups?Ans. A group that combines several fields fewer than one name, at runtime, the INSERT command is used to define which data fields are assigned to which field group are called Field Groups. It should always be a HEADER field group that defines how the extracted data will be sorted; the fields grouped under the HEADER field group sort the data.

ii. Field group is old method of creating a array processing.. Like the internal tables..From help..

A field group combines related fields together into a meaningful unit. It provides you with a preselect ion, so that you do not have to search through all fields of a data source just to produce a simple list.This means that the end-user only has access to precisely those fields assigned to a field group. Fields must be assigned to a field group before they can be used in queries.

14. List the events in ABAP/4 Language?Ans: The events in ABAP/4 are Load of program,Initialization,AT Selection Screen,AT Selection Screen On,Start of Selection, Top of page,

End of Selection, End of page,

Line selection, User command, End, First.

15. How the values will be passed to RFC Function module PassbyValue or passbyreference?Ans: always pass by Value.

RFC is Remote Function call so it cant access the values with Pass by reference.

16. Buffering concept usage?Ans: There are three type of buffer

1 single record buffering2 generic buffers3 full buffer

Buffering is use for improve performance. it improves performance 10 to 100 times more

17. Select up to 1 row and select single difference?Ans: Select single fetches first matching record. If more than one matching records are there then only the first matching record will be considered other records will not be taken into account. (It is based on primary key). Whereas select up to 1 rows will fetch all the matching records from the database.(Again it will assign only One Record to the internal table/Work area).(it is based on all records).Ans2: Select Single * will pick up only one matching record from the database into the buffer, and returns the same to the internal table. Select up to 1 row will pick up all the records matching the condition into the buffer, but return the top record to the internal table.

18. What are the different buffering methods?There are two different buffering methods

The system ensures that data transfer between the R/3 System and the database system is as efficient as possible. To do this, it uses the following techniques:

Table buffering: The program accesses data from the buffer of the application server.

Database request buffering: Individual database entries are not read or passed to the database until required by an OPEN SQL statement.

19. Different types of locks?Read lock (shared lock)

Protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table.

Write lock (exclusive lock)

Protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.

Enhanced write lock (exclusive lock without cumulation)

Works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.

20. CHAIN END CHAIN?Ans: Chain and end chain are used for multiple field validation in Module pool programming .It is written inside the screen flow logic.

21. How to Debug RFC Function module?Ans: SE38 > Utilities > Settings > ABAP Editor > Debugging

Activate the external debugging and choose the New Debugger option in ABAP debugger.

Go to the particular place in the code and put break point, pop will appear then choose the HTTP break point.

If you are triggering the RFC from SAP portal make sure that both the user ID should be same

If the users are different then provide the XI/Portal User ID in the users field.

23. Difference between user exit and BADIs?Ans: User exit is for single implementation and it is procedural approach while BADIs are for multiple implementations and object oriented approach.

Multiple implementations means Reusability because we use OOPS Concepts for BADI.

24. Control break events in ABAP:-1. AT-FIRST: This is used when we want to execute the statements before records are processed.

2. AT-NEW: This event is used when we want to execute the statement before group of records are processed.

3. AT-END: This event is used when we want to execute the statements after processing of group of records.

4. AT-LAST: This event is used when we want to execute the statements after all records are processed.

25.I am uploading 100 records out of which say 59th record has error so what will happen if i am using synchronous or asynchronous method of BDC? Can we update the database using local update mode how?26. Suppose i am writing following code then what will be output?LOAD-OF-PROGRAM.WRITE:/HELLO.Ans: HELLO(Explain the importance of LOAD-OF-PROGRAM Event. If you dont know Tell the interviewer as this event is used in such cases when you want to clear sum buffers or something Before calling that Program)

27. What is TMG?Ans. TMG stands for Table Maintenance generator. It is a tool available in abap by which we can add or delete multiple records at a time and it is executed or triggered by the transaction code SM30.28. Difference between select option and ranges?Ans. The main difference between select option and Ranges is that ranges implicitly or automatically creates internal table with fields like OPTION, LOW, HIGH, SIGN, etc.

Where as in case of select option we have to explicitly create internal table.

When u declares select options it will implicitly declare an internal table (ranges) for you.

While using RANGES syntax u can declare internal table explicitly.

The only need of declaring ranges is when you r not taking input from the user but you want make limit based selection at that time it will be use full e.g. SELECT ** from ** where MATNR in val_range.

Here u can use select-option or ranges: val_range.

29. Is it possible to bring select option in module pool screens?Ans. Create SELECT-OPTIONS in module pool screen using two methods as shown.

Method 1:a) Create a subscreen area in your screen layout where you want to create the select options.

b) In the top include of your module pool program declare a selection screen as a subscreen e.g.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.Select-options s_matnr for mara-matnr. SELECTION-SCREEN END OF SCREEN.c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).

CALL SUBCREEN sub_area INCLUDING

This CALL SUBSCREEN statement is necessary for transport of values between screen and program.

Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.

Method 2:-a) Create 2 separate fields in your screen layout one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.

continued

struc_tab_and_field-fieldname = con_cust. KUNNRstruc_tab_and_field-tablename = con_kna1. KNA1.CALL FUNCTION COMPLEX_SELECTIONS_DIALOG EXPORTING*TITLE = text = g_titl1 Customerstab_and_field = struc_tab_and_fieldTABLES RANGE = rng_kunnrEXCEPTIONSNO_RANGE_TAB = 1CANCELLED = 2INTERNAL_ERROR = 3INVALID_FIELDNAME = 4OTHERS = 5.IF NOT rng_kunnr[] IS INITIAL.* Read the very first entry of the range table and pass it to* dynpro screen field*READ TABLE rng_kunnr INDEX 1.IF sy-subrc = 0.g_cust = rng_kunnr-low.ENDIF.ENDIF.You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.

30. how we can retrieve data using secondary index. Explain with simple exampleAns: First create secondary indexes on required fields of a particular database table.

We can create one primary index and 15 secondary indexes. Once the respective secondary indexes are created write select queries and within select queries specify secondary indexes field name with where clause.

31.How can we handle table control in BDC?Ans. We can handle table control using line index

Line index indicates which line of Table control is to be use for BDC transaction

Ex - perform bdc_field using RC29K-AUSKZ(01)

Indicates 1st line of table control is going to be used for transaction which is Line index of Table Control

32. If i want to execute a BDC program only in background not in foreground is there any option for this?Ans. 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.

33.How Can We upload a text file having Delimiters in to Legacy SystemAns. For up loading text file we use the pre-defined FM gui_upload. in that FM we have the parameter has_field_seperator for that we assign the default delimiter x.

HAS_FIELD_SEPERATOR X

X can provide the Whatever delimiter we used in flat