abap.abap 962 B

123456789101112131415161718192021222324252627282930313233343536
  1. ***************************************
  2. ** Program: EXAMPLE **
  3. ** Author: Joe Byte, 07-Jul-2007 **
  4. ***************************************
  5. REPORT BOOKINGS.
  6. * Read flight bookings from the database
  7. SELECT * FROM FLIGHTINFO
  8. WHERE CLASS = 'Y' "Y = economy
  9. OR CLASS = 'C'. "C = business
  10. (...)
  11. REPORT TEST.
  12. WRITE 'Hello World'.
  13. USERPROMPT = 'Please double-click on a line in the output list ' &
  14. 'to see the complete details of the transaction.'.
  15. DATA LAST_EOM TYPE D. "last end-of-month date
  16. * Start from today's date
  17. LAST_EOM = SY-DATUM.
  18. * Set characters 6 and 7 (0-relative) of the YYYYMMDD string to "01",
  19. * giving the first day of the current month
  20. LAST_EOM+6(2) = '01'.
  21. * Subtract one day
  22. LAST_EOM = LAST_EOM - 1.
  23. WRITE: 'Last day of previous month was', LAST_EOM.
  24. DATA : BEGIN OF I_VBRK OCCURS 0,
  25. VBELN LIKE VBRK-VBELN,
  26. ZUONR LIKE VBRK-ZUONR,
  27. END OF I_VBRK.