Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.36 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  ZRAP05_EXERCICIO11
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *&
  6. *& CREATED BY: Dalcy Fabrício
  7. *&---------------------------------------------------------------------*
  8.  
  9. REPORT  ZRAP05_EXERCICIO11 NO STANDARD PAGE HEADING.
  10.  
  11. TABLES: spfli.
  12.  
  13. DATA ti_spfli TYPE STANDARD TABLE OF spfli.
  14.  
  15. SELECT-OPTIONS s_carrid FOR spfli-carrid.
  16.  
  17.  
  18. START-OF-SELECTION.
  19.   PERFORM f_select_spfli.
  20.   PERFORM f_print.
  21.  
  22.  
  23.  
  24.  
  25.  
  26. *&---------------------------------------------------------------------*
  27. *&      Form  f_select_spfli
  28. *&---------------------------------------------------------------------*
  29. *       text
  30. *----------------------------------------------------------------------*
  31. *  -->  p1        text
  32. *  <--  p2        text
  33. *----------------------------------------------------------------------*
  34. form f_select_spfli .
  35.   SELECT * FROM spfli INTO TABLE ti_spfli WHERE carrid IN s_carrid.
  36. endform.                    " f_select_spfli
  37.  
  38.  
  39. *&---------------------------------------------------------------------*
  40. *&      Form  f_print
  41. *&---------------------------------------------------------------------*
  42. *       text
  43. *----------------------------------------------------------------------*
  44. *  -->  p1        text
  45. *  <--  p2        text
  46. *----------------------------------------------------------------------*
  47.  
  48.  
  49. form f_print .
  50.   DATA lwa_spfli TYPE spfli.                                            " work area local da tabela spfli
  51.  
  52.   PERFORM f_header.
  53.  
  54.   LOOP AT ti_spfli INTO lwa_spfli.
  55.     WRITE: / lwa_spfli-carrid,
  56.              lwa_spfli-connid,
  57.              lwa_spfli-countryfr,
  58.              lwa_spfli-airpfrom,
  59.              lwa_spfli-countryto.
  60.   ENDLOOP.
  61. endform.                    " f_print
  62.  
  63.  
  64. *&---------------------------------------------------------------------*
  65. *&      Form  f_header
  66. *&---------------------------------------------------------------------*
  67. *       text
  68. *----------------------------------------------------------------------*
  69. *  -->  p1        text
  70. *  <--  p2        text
  71. *----------------------------------------------------------------------*
  72. form f_header .
  73.   WRITE: / 'carrid',
  74.            'connid',
  75.            'countryfr',
  76.            'airpfrom',
  77.            'countryto'.
  78. endform.                    " f_header
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement