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 <tcode> 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 you’re 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 <int tab> LIKE TABLE OF <DB table>.
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 <WA> like line of <int tab>
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 doesn’t 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
record from 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
1. It will fetch all the records with which the 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.
lfa1 into table l_wa_lfa1. 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_<TABLE NAME> and BAPI_TE_<TABLE NAME>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+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 RFC’S?
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-CORRESPONDING
Syntax
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 screen
3. 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 transaction 4. 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?
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 TASK EXPORTING
P_UNAME = sy-uname. Loop at it_mara to wa_mara.
"Program continues without executing the function. endloop.
in update task Why it’s 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 start
Set 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
• 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 doesn’t 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 RFC’s and BAPI’s ?
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 BADI’S?
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 BADI
these 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 BUILDER Go the class CL_EXITHANDLER go to its method GET_INSTANCE
and put a breakpoint in this line calling the method
CALL METHOD CL_EXITHANDLER = > GET_CLASS_NAME_BY_INTERFACE
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.htm http://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.
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 <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method
2:——-a) Create 2 separate fields in your screen layout – one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
continued ……
struc_tab_and_field-fieldname = con_cust. ” ‘KUNNR’ struc_tab_and_field-tablename = con_kna1. ” ‘KNA1′.
TITLE = ‘ ‘
text = g_titl1 ” ‘Customers’
tab_and_field = struc_tab_and_field TABLES RANGE = rng_kunnr
EXCEPTIONS NO_RANGE_TAB = 1 CANCELLED = 2 INTERNAL_ERROR = 3 INVALID_FIELDNAME = 4 OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
* Read the very first entry of the range table and pass it to * dynpro screen field
*READ TABLE rng_kunnr INDEX 1. IF sy-subrc = 0.
g_cust = rng_kunnr-low. ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
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 defined 6. 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.
IGATE
1. 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: <int_tab> like STANDARD table of <wa>.
It doesn’t 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: <int tab> like SORTED table of <wa> with UNIQUE/NON-UNIQUE KEY <F1>.
2) HASHED int table
It also doesn’t 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: <int tab> like HASHED table of <WA> WITH UNIQUE KEY <F1>.
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. FM’s in outbound side of idoc’s?
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 what’s 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 Bosch
1. 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 types Roadmap flavors
Implementation R/3 System (Continuous
Improvement) BW
APO
Business-to-Business Procurement
Global ASAP R/3 System
Upgrade R/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 Preparation
In 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:
o Define your project goals and objectives o Clarify the scope of your implementation
o Define your project schedule, budget plan, and implementation sequence
o Establish the project organization and relevant committees and assign resources
2. Business Blueprint
In this phase you create a blueprint using the Question & Answer database (Q&A db), which documents your enterprise’s 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. Realization
In 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 Preparation
In 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 & Support
In 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 <f>.
This statement places the contents of the variable <f> for the current output line (system field SY-LINNO) into the HIDE area. The variable <f> 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 <f> 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 is different. The following FM r used.
REUSE_ALV_BLOCK_LIST_INIT REUSE_ALV_BLOCK_LIST_APPEND REUSE_ALV_BLOCK_LIST_DISPLAY
3. 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
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 FOOTER
The header section will be executed once and it will loop at the item level. At the end footer will be executed.
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 Reports
These 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.
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 <dataset name>for input/output in text/binary mode encoding/ascii default.
--CLOSE DATASET is used to close the dataset. Syntax: close dataset <dataset name>.
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,
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
IBM
1. How to give accessing of report to another person? Ans. Using authorization objects
Creating authorization object
1. 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.
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 user’s 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 field 1. Go to transaction code SU20
2. 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 class 1. Go to transaction code SU21
2. Click on the Create button’s 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 object
1. Again in SU21, in the list of authorization class (folder icon), click the one that we’ve 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
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 we’re 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 we’ve 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 don’t forget to add the S_TCODE authorization object and enter ZCOMM on it’s 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 let’s 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 he’s
authorized. On the other hand, he will go to display only screen (2000) if he’s not authorized. To do that, simply add the code below on your program.
AUTHORITY-CHECK OBJECT ‘Z_TCODE’ “authorization object that we’ve created
ID ‘ACTVT’ FIELD ‘01′ “Activity = 01, authorized to create ID ‘ZTCODE’ FIELD ‘ZCOMM’. “tcodes that we wants to check for
authorization IF sy-subrc EQ 0.
CALL SCREEN 1000. “The user is authorized to create ELSE.
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(RFC’S)? 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.