Ans
117) What is the difference between sum and collect?
Ans Sum: You can only use this statement within a LOOP. If you use SUM in an AT - ENDAT block, the system calculates totals for the numeric fields of all lines in the current line group and writes them to the corresponding fields in the work area. If you use the SUM statement outside an AT - ENDAT block (single entry processing), the system calculates totals for the numeric fields of all lines of the internal table in each loop pass and writes them to the corresponding fields of the work area. It therefore only makes sense to use the SUM statement in AT...ENDAT blocks.
If the table contains a nested table, you cannot use the SUM statement. Neither can you use it if you are using a field symbol instead of a work area in the LOOP statement.
Collect:
118) What are session method and call transaction method and explain about them?
Ans Session method – Use the BDC_OPEN_GROUP to create a session. Once we have created a session, then we can insert the batch input data into it with BDC_INSERT. Use the BDC_INSERT to add a transaction to a batch input session. We specify the transaction that is to be started in the call to BDC_INSERT. We must provide a BDCDATA structure that contains all the data required to process the transaction completely. Use the BDC_CLOSE_GROUP to close a session after we have inserted all of our batch input data into it. Once a session is closed, it can be processed.
Call Transaction -
In this method, we use CALL TRANSACTION USING to run an SAP transaction. External data does not have to be deposited in a session for later processing. Instead, the entire batch input process takes place inline in our program.
119) If you have 10000 records in your file, which method you use in BDC?
Ans Call transaction is faster then session method. But usually we use session method in real time...because we can transfer large amount of data from internal table to database and if any errors in a session, then process will not complete until session get correct.
120) What are different modes of Call Transaction method and explain them?
Ans There are three modes of Call Transaction method:
1) A – Display All Screens
2) E – Display Errors
3) N – Background Processing
--------------------------------------------------------------------------------------------------------------------
121) What is the typical structure of an ABAP program?
Ans HEADER, BODY, FOOTER.
122) What are field symbols and field groups? Have you used "component idx of structure" clause with field groups?
Ans Field Symbols – They are placeholder or symbolic names for the other fields. They do not physically reserve space for a field, but point to its contents. It can point to any data objects.
Field-symbols
Field Groups – Field groups does not reserve storage space but contains pointers to existing fields.
An extract dataset consists of a sequence of records. These records may have different structures. All records with the same structure form a record type. You must define each record type of an extract dataset as a field group, using the FIELD-GROUPS statement.
Field-groups
123) What should be the approach for writing a BDC program?
Ans STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE
to internal table CALLED "CONVERSION".
STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED
"SAP DATA TRANSFER".
STEP 3: DEPENDING UPON THE BDC TYPE
i) Call transaction (Write the program explicitly)
ii) Create sessions (sessions are created and processed. If success, data will transfer).
124) What is a batch input session?
Ans BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
Create session – BDC_OPEN_GROUP
Insert batch input – BDC_INSERT
Close session – BDC_CLOSE_GROUP
125) What is the alternative to batch input session?
Ans Call Transaction Method & Call Dialog
126) A situation: An ABAP program creates a batch input session. We need to submit the
program and the batch session in background. How to do it?
Ans Go to SM36 and create background job by giving job name, job class and job steps
(JOB SCHEDULING)
127) What is the difference between a pool table and a transparent table and how they are
stored at the database level?
Ans Pool Table -
1) Many to One Relationship.
2) Table in the Dictionary has the different name, different number of fields, and the fields have the different name as in the R3 Table definition.
3) It can hold only pooled tables.
Transparent Table –
1) One to One relationship.
2) Table in the Dictionary has the same name, same number of fields, and the fields have the same name as in the R3 Table definition.
3) It can hold Application data.
128) What are the problems in processing batch input sessions? How is batch input process
different from processing on line?
Ans Two Problems: -
1) If the user forgets to opt for keep session then the session will be automatically removed from the session queue (log remains). However, if session is processed we may delete it manually.
2) If session processing fails, data will not be transferred to SAP database table.
129) Is Session Method, Asynchronous or Synchronous?
Ans Synchronous
130) What are the different types of data dictionary objects?
Ans Different types of data dictionary objects:
1) Tables
2) Views
3) Data elements
4) Structure
5) Domains
6) Search Helps
7) Local Objects
8) Matchcode
131) How many types of tables exist and what are they in data dictionary?
Ans 4 Types of Tables:
Transparent tables - Exists with the same structure both in dictionary as well as in database exactly with the same data and fields. Both Open SQL and Native SQL can be used.
Pool tables
Cluster tables - These are logical tables that are arranged as records of transparent tables. One cannot use Native SQL on these tables (only Open SQL). They are not manageable directly using database system tools.
Internal tables
132) What is the step-by-step process to create a table in data dictionary?
Ans Steps to create a table:
Step 1: creating domains (data type, field length, Range).
Step 2: creating data elements (properties and type for a table field).
Step 3: creating tables (SE11).
133) Can a transparent table exist in data dictionary but not in the database physically?
Ans No, Transparent table do exist with the same structure both in the dictionary as well as in the database, exactly with the same data and fields.
134) In SAP Scripts, how will u link FORM with the Event Driven?
Ans In PAI, define function code and write code for the same.
135) Can you create a table with fields not referring to data elements?
Ans YES. e.g.:- ITAB LIKE SPFLI.
Here we are refering to a data object (SPFLI) not data element.
136) What is the advantage of structures? How do you use them in the ABAP programs?
Ans GLOBAL EXISTANCE (these could be used by any other program without creating it again).
137) What does an extract statement do in the ABAP program?
Ans Once you have declared the possible record types as field groups and defined their structure, you can fill the extract dataset using the following statements:
EXTRACT
When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset
EXTRACT HEADER.
When you extract the data, the record is filled with the current values of the corresponding fields.
As soon as the system has processed the first EXTRACT statement for a field group
By processing EXTRACT statements several times using different field groups, you fill the extract dataset with records of different length and structure. Since you can modify field groups dynamically up to their first usage in an EXTRACT statement, extract datasets provide the advantage that you need not determine the structure at the beginning of the program.
138) What is a collect statement? How is it different from append?
Ans Collect : If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.
Append – Duplicate entries occurs.
139) What is OPEN SQL vs NATIVE SQL?
Ans Open SQL – These statements are a subset of standard SQL. It consists of DML command (Select, Insert, Update, Delete). It can simplify and speed up database access. Buffering is partly stored in the working memory and shared memory. Data in buffer is not always up-to-date.
Native SQL – They are loosely integrated into ABAP. It allows access to all functions containing programming interface. They are not checked and converted. They are sent directly to the database system. Programs that use Native SQL are specific to the database system for which they were written. For e.g. to create or change table definition in the ABAP.
140) What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
Ans To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
EXEC SQL [PERFORMING
No comments:
Post a Comment