kotireddy


{ City } hyderabad
< Country > india
* Profession * sapabap student
User No # 118711
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 3
Users Marked my Answers as Wrong # 0
Questions / { kotireddy }
Questions Answers Category Views Company eMail




Answers / { kotireddy }

Question { Wipro, 27057 }

what is the use of FOR ALL ENTRIES in an internal table?


Answer

1. This statement is used to replace select with joins.
2. Because JOINS statement cannot be used for more than three tables.
3. If we use more than three tables it puts heavy load on the Database, because the data has to be selected by comparing each table in the database server.
4. So it takes the long time for execution.
5. In such cases we go for SELECT FOR ALL ENTRIES.
6. This statement will never put load on the database. Because only two tables (Internal table and database tables) are compared
SYNTAX:
Select F1 F2 F3…..
From
Into table Where .
If ITAB1[] is not initial.
Select F1 F2 F3…..
From
Into table
For all entries in
Where F1 = AND F2 = .
Endif.

Is This Answer Correct ?    0 Yes 0 No

Question { Unilogic Software, 12940 }

what is the default event that is triggers in report?


Answer

hi friends.....
what is the first event that will be triggered in a report?
answer:load-of-program.
what is the default event that is triggers in report?
answer:start-of-selection

Is This Answer Correct ?    1 Yes 0 No


Question { TCS, 33107 }

control break statements in ABAP?


Answer

Control break statements:

Control break statements are like events inside the loop. There are 5 control break statements in ABAP. These are used within loop.(Except ON CHANGE OF which can be used outside the loop as well)


• AT FIRST - ENDAT
• AT NEW - ENDAT
• AT END OF - ENDAT
• AT LAST - ENDAT
• ON CHANGE OF


Explanation:

AT FIRST : Will trigger at the first run of the loop.

AT LAST: Will trigger at the last run of the loop.

The below 3 events are normally used when the table is sorted.


AT END OF : When we use At end for a field, it will trigger whenever there is any change in any of the fields from the left to that of the particular field. The trigger point will be the at the last occurrence of the same value for the field.

AT NEW: When we use At new for a field, it will trigger whenever there is any change in any of the fields from the left to that of the particular field.The trigger point will be the at the first occurrence of the new value for the field.

ON CHANGE OF: On change of it triggers only when there is any change in the particular field.
On change of can be used outside the loop too


Example Program:

Here is an example program which gives you the practical understanding of all control break statements.

Example Program for Control Break Statements
NOTE: It is important to note that we need a temporary work-area apart from the work-area used in loop for the last 3 control break statements. If we directly use the work-area of the loop, then we will get **** value and not the output we are expecting.
*&---------------------------------------------------------------------*
*& Report ZAU_CONTROLBREAK
*&
*&---------------------------------------------------------------------*
*& NEW TO SAP CONTROL BREAK EXAMPLE
*& http://www.newtosap.info
*&
*&---------------------------------------------------------------------*

REPORTzau_controlbreak.
TYPES: BEGIN OFty_marc,
matnr TYPE marc-matnr,
werks TYPE marc-werks,
END OFty_marc.

DATA: it_marc TYPE STANDARD TABLE OFty_marc,
wa_marc TYPEty_marc,
wa_temp TYPEty_marc.

SELECTmatnrwerks FROM marc INTO TABLEit_marc UP TO 10 ROWS WHEREmatnrge40.
SORTit_marc BY matnr.
FIELD-SYMBOLS : typematnr.

WRITE:/'FULL TABLE'.
LOOP ATit_marc INTOwa_marc.
wa_temp = wa_marc.
WRITE: / sy-tabix ,wa_temp-matnr, wa_temp-werks.
ENDLOOP.

WRITE:/'AT FIRST AND LAST'.
LOOP ATit_marc INTOwa_marc.
wa_temp = wa_marc.
AT FIRST.
WRITE:/'First Entry'.
WRITE:/wa_temp-matnr, wa_temp-werks.
ENDAT.
AT LAST.
WRITE:/'Last Entry'.
WRITE:/wa_temp-matnr, wa_temp-werks.
ENDAT.
ENDLOOP.


WRITE:/'AT END OF'.
LOOP ATit_marc INTOwa_marc.
wa_temp = wa_marc.
AT END OFmatnr.
WRITE: / sy-tabix ,wa_temp-matnr, wa_temp-werks.
ENDAT.
ENDLOOP.

WRITE:/'AT NEW'.

LOOP ATit_marc INTOwa_marc.
wa_temp = wa_marc.
AT NEW matnr.
WRITE: / sy-tabix ,wa_temp-matnr, wa_temp-werks.
ENDAT.
ENDLOOP.

WRITE:/'ON CHANGE OF'.
LOOP ATit_marc INTOwa_marc.
wa_temp = wa_marc.
ASSIGNwa_marc-matnr TO.
ON CHANGE OFwa_marc-matnr.
WRITE: / sy-tabix ,wa_temp-matnr, wa_temp-werks.
ENDON.
ENDLOOP.

Is This Answer Correct ?    2 Yes 0 No