Simple loop example

Source: Internet
Author: User
Report Zmmr086.

Tables: Ska1, Skat.

Data:Begin OfItab,
SaknrLikeSKA1-SAKNR,
SakanLikeSKA1-SAKAN,
ErdatLikeSKA1-ERDAT,
ErnamLikeSKA1-ERNAM,
Txt20LikeSKAT-TXT20,
End OfItab.

Data: ItaLike Standard Table OfItabWith Header Line.

Start- Of -Selection.
Selection- Screen Begin Of Block Blk1 With Frame Title Text - 002 .
Select -Options s_saknr For SKA1-SAKNR. "SK ~ is required after the SELECT statement is selected ~ Saknr in s_saknr.
* Parameter: s_saknr like SKA1-SAKNR. "After selecting a data SELECT statement, SK ~ Saknr = s_saknr.
Selection- Screen End Of Block Blk1.

End-Of-Selection.
SelectSK ~ Saknr SK ~ Sakan SK ~ Erdat SK ~ Ernam Skat ~ Txt20Into TableItaFromSka1AsSKJoinSkatOnSK ~ Mandt = Skat ~ MandtWhereSK ~ SaknrInS_saknr.

 Loop AtITA.
Write:/ITA-SAKNR, ITA-SAKAN, ITA-ERDAT, ITA-ERNAM, SKAT-TXT20.
 Endloop.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.