SAP---ABAP

Monday, May 12, 2008

ABAP/4 Interview Qns and Answers

111) What are control events in a loop?

Ans Control level processing is allowed within a LOOP over an internal table. This means that we can divide sequences of entries into groups based on the contents of certain fields.

AT .

ENDAT.


You can react to the following control level changes:


Meaning

FIRST

First line of the internal table

LAST

Last line of the internal table

NEW

Beginning of a group of lines with the same contents in the field and in the fields left of

END Of

End of a group of lines with the same contents in the field and in the fields left of


112) How to debugg a script?

Ans Go to SE71, give layout set name, go to utilities select debugger mode on.


113) How many maximum sessions can be open in SAPgui?

Ans There are maximum 6 sessions open in SAPgui.


114) SAP Scripts and ABAP programs are client dependent or not? Why?

Ans


115) What are System Variable?

Ans System variables have been predefined by SAP. We can use these variables in formulas or, for example, to pass on certain pieces of information to a function module. How the function called by the function module behaves depends on the type of information passed on.

At present, we can use the following system variables:

System Variable

Use

Meaning

SY_MODE

In function modules

Current mode of the PI sheet

SY_TEST

In function modules

Status of the PI sheet (test or active)

SY_ROW

In function modules

Current table line

SY_VALUE or X

Generally

Refers to the immediately preceding input value

116) Is it compulsory to use all the events in Reports?

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

No comments: