P. 1
Collect

Collect

|Views: 0|Likes:
Published by swayam
Collect
Collect

More info:

Published by: swayam on Dec 01, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

12/01/2013

pdf

text

original

Lecture 11 Collect

*&---------------------------------------------------------------------*
*& Report ZDEMO_CONTROL_BREAK
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDEMO_CONTROL_BREAK.
TYPES : BEGIN OF TY_MAkt,
matnr type matnr,
spras type spras,
maktx type maktx,
qty TYPE i,
amt TYPE i,
END OF ty_makt.
data : it_makt TYPE STANDARD TABLE OF ty_makt,
wa_makt TYPE ty_makt.
wa_makt-matnr = '100'.
wa_makt-spras = 'e'.
wa_makt-maktx = 'soap'.
wa_makt-qty = 1.
wa_makt-amt = 10.
*append wa_makt to it_makt.
COLLECT wa_makt into it_makt.
wa_makt-matnr = '200'.
wa_makt-spras = 'e'.
wa_makt-maktx = 'paste'.
wa_makt-qty = 1.
wa_makt-amt = 20.
*append wa_makt to it_makt.
COLLECT wa_makt into it_makt.
wa_makt-matnr = '300'.
wa_makt-spras = 'e'.
wa_makt-maktx = 'brush'.
wa_makt-qty = 1.
wa_makt-amt = 15.
*append wa_makt to it_makt.
COLLECT wa_makt into it_makt.
wa_makt-matnr = '100'.
wa_makt-spras = 'e'.
wa_makt-maktx = 'soap'.
wa_makt-qty = 1.
wa_makt-amt = 10.
*append wa_makt to it_makt.
COLLECT wa_makt into it_makt.
wa_makt-matnr = '200'.
wa_makt-spras = 'e'.
wa_makt-maktx = 'paste'.
wa_makt-qty = 1.
wa_makt-amt = 20.
*append wa_makt to it_makt.
COLLECT wa_makt into it_makt.
LOOP at it_makt INTO wa_makt.
at FIRST .
write : / ' At first triggered ',sy-tabix.
ENDAT.
at LAST.
write : / ' At first triggered ',sy-tabix.
ENDAT.
Endloop.

write : / ' ENDAT. write : / ' ENDAT.COLLECT wa_makt LOOP at it_makt at FIRST . at LAST. into it_makt. INTO wa_makt.sy-tabix. At first triggered '.sy-tabix. At first triggered '. Endloop. .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->