Advertisement
jenniferleigh52

Basic Select Loop Pulling from a Table

Mar 10th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.69 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  z_employee_list_01 from Udemy                               *
  3. *& Pulling from a table and displaying information                                                                     *
  4. *&---------------------------------------------------------------------*
  5. *&                                                                     *
  6. *&                                                                     *
  7. *&---------------------------------------------------------------------*
  8.  
  9. REPORT z_employee_list_01 LINE-SIZE 132       .    "The line will hold up to 132 charachters
  10.  
  11. TABLES zemployees.
  12. ************************************************************************
  13. SELECT * FROM zemployees.                          "Basic Select Loop
  14.     WRITE zemployees.
  15. ENDSELECT.
  16.  
  17. ULINE.                                             "Adds a line in the output
  18.  
  19. SELECT * FROM zemployees.                          "Basic Select Loop with a LINE-BREAK
  20.     WRITE / zemployees.
  21. ENDSELECT.
  22.  
  23. ULINE.
  24.  
  25. SELECT * FROM zemployees.                          "Basic Select Loop with a LINE-BREAK after first row is displayed
  26.     WRITE zemployees.
  27.     WRITE /.
  28. ENDSELECT.
  29.  
  30. ULINE.
  31.  
  32. SKIP 2.
  33. SELECT * FROM zemployees.                          "Basic Select Loop with a SKIP Statement to Skip 2 lines at the top
  34.     WRITE / zemployees.
  35. ENDSELECT.
  36.  
  37. ULINE.
  38.  
  39. SKIP 2.
  40. SELECT * FROM zemployees.                          "Basic Select Loop with individual fields being displayed
  41.     WRITE / zemployees-surname.
  42.     WRITE / zemployees-forname.
  43.     WRITE / zemployees-DOB.
  44. ENDSELECT.
  45.  
  46. ULINE.
  47.  
  48. SKIP 2.
  49. SELECT * FROM zemployees.                           "Basic Select Loop with a Chain Statement
  50.     WRITE: / zemployees-surname,
  51.              zemployees-forname,
  52.              zemployees-DOB.
  53. ENDSELECT.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement