Did not find something?Try google!!!

Custom Search

God is great !

God is great !
Make the most of what god has given you!

About Me

Hey guys .... How yall doing? Well I am a ABAP professional having more that 7 years of experience in SAP. I wanted to share my experiences in this field with other people so Welcome aboard ...share your opinions with others and give us your insights about different things in life ...ABAP and non-ABAP ..

Reports/Transactions

ABAP/4 Questions

Reports and Transactions:

1. What is LDB. Disadvantages of LDB and also advantages.
Logical Database is special ABAP program. It’s nested select statements.
Advantages: If you use LDB, it retrieves data as per foreign key relations from different tables. You need not know the relations among tables.
Disadvantages: Runtime will be increased if you use LDB.

2. What are the events associated with LDB and their purpose.
GET and GET LAST. GET will be triggered for each record and retrieves a record. GET LAST will be triggered at end of each record.

3. In which order they will be triggered.
First Get and then Get last of same table.

4. How will you change the selection screen of a LDB.
Selection screen can be changed through you add selection screen option in the program, these will be automatically added to LDB selection screen for this program.

5. Where you attach the LDB to a report.
One is Attributes, two at report header.

6. How many LDBs you can use in a Report.
Only one.

7. Order of events triggered during execution of report program.
Initialization, selection-screen, at selection-screen, start-of-selection etc

8. How to get help and/or possible values for selection screen fields
Events AT SELECTION-SCREEN ON HELP REQUEST and AT SELECTION-SCREEN ON VALUE REQUEST.

9. How many secondary lists you can have in a report.
20 secondary list and 1 basic list.

10. What are events, which triggers secondary lists.
At line-selection, At PFnn, At User-command.

11. What is the purpose of HIDE statement. Any other methods other than HIDE for same purpose.
Hide will help in transferring data from basic list to secondary list or one list to other list. Other methods are GET CURSOR and SY-LISEL.

12. What are the different techniques for Data processing/refining in ABAP reports.
1. Internal Tables. 2. Extracts (Field Groups)

13. Can you put a SQL Join statement in ABAP? If yes, How
Through alias (only in 4.0 and above versions)

14. What is the system variable, which tells about number database records handled.
SY-DBCNT

15. What are different techniques available for modularization.
Internal Subroutines, External Subroutines, Macros, Function modules and Include programs.

16. What are different types of internal tables and their usage.

Standard Internal Tables
Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to the number of table entries.
Sorted Internal Tables
Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables.
This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
Hashed Internal Tables
Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and using internal tables that are similar to database tables.


17. One of my users has access to SE38 transaction, and so he can run the program developed by you. You have attached this report/transactional program to a particular Z* transaction. To restrict the users to Execute this program, what you do it from programming side?

Check for Authorization object S_TCODE with value “Z----” in initialization event.
(Code:
Authority-check object 'S_TCODE'
id 'TCD' field 'ZBC_REQ'.)

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

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

19. When we create a customer the information is updated in structure RF02D and the
Some tables like KNA1 are updated. How can we find the tables for master data transactions?
Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> (or SE81 transaction code) follow the customizing based tree for your application. Double click on a lowest level to get for the correct marked development class. Then, here you can find all the tables, views, logical databases etc..,