Sie sind auf Seite 1von 2

Reports – Exercise 5

1) Program Name: YRxx05


(where xx is the last 2 digits of your User Id

2) Select 10 records from MARA table and store the same in an internal table. This internal
table will have Material i.e., MATNR field values. Check this internal table contain records
& for each MATNR in this internal table, fetch the Material description from MAKT table.
(Clue: 2 Internal tables shall be declared, store the first fetch in one internal table &
subsequently, use FOR ALL ENTRIES, fetch other related details and store the results in the
other one. Material description is stored in MAKT-MAKTX).

3) Assume internal tables itab1 & itab2 will have following fields.
MARA-MATNR, MARD-WERKS, MARD-LABST.
Store the following 8 records in itab1.
Watch1, 0001, 12; Watch1, 0002, 10; Watch2, 0002, 15; Watch2, 0001, 25;
Watch2, 0002, 10; Watch1, 0001, 24; Watch2, 0001, 25; Watch1, 0003, 14;
Consolidate the records from itab1 to itab2.
Also declare an internal table itab3 with the fields
MARA-MATNR, MARD-LABST.
Consolidate the records from itab1 to itab3.
Also declare an internal table itab4 with the fields
MARD-WERKS, MARD-LABST.
Consolidate the records from itab1 to itab4.
(clue: Declare a Structured data type, work area, internal tables, use append statement & for
consolidation use COLLECT statement. Understand how the records stored in internal table
when U use COLLECT statement).

4) From the internal table itab1 as in 3 above, use BETWEEN in the LOOP statement and
display the records whose WERKS values are 0002 & 0003. While displaying, use SY-
TABIX as the first field and display accordingly.

5) Define an internal table itab5 similar to the internal table itab1 as in 3 above which has got 8
records. Itab5 will have additional field MENGE (referring MARD-LABST). This field will
have value twice of the value stored under field LABST for all 8 records. (Clue: Use MOVE-
CORRESPONDING & MODIFY statement. Note the MODIFY will be used widely in
ABAP programming and hence, understand its usage here effectively).

6) From the internal table itab1 as in 3 above, use control break statements AT NEW & AT
END OF. While using AT NEW with respect to MATNR, display the new MATNR output
and similarly use MATNR with AT END OF in which case display the MATNR & total
LABST for each sub-group. (Clue: Use SUM statement for total LABST). SORT the internal
table before executing control break statements.

7) From the internal table itab1 as in 3 above, use control break statements AT FIRST & AT
LAST. While using both AT FIRST & AT LAST, display the total quantity. SORT the
internal table before executing control break statements.

Page 1 of 2
8) Use CLEAR, REFRESH & FREE statements with itab1, understand the content behaviour of
internal table itab1.

9) Execute transaction code SE01 and understand the meaning of various fields in the screen.

10) Execute transaction code SE09 and understand the meaning of various fields in the screen.

Page 2 of 2

Das könnte Ihnen auch gefallen