Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.69 KB | None | 0 0
  1. REPORT  ztesteuni.
  2.  
  3. TABLES: te422.
  4.  
  5. SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
  6.  
  7. SELECT-OPTIONS s_mru FOR te422-termschl. "OBLIGATORY.
  8.  
  9.  
  10.  
  11. SELECTION-SCREEN END OF BLOCK b1.
  12.  
  13.  
  14. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
  15.  
  16. PARAMETERS: b_marca RADIOBUTTON GROUP gr1,
  17.           b_desma RADIOBUTTON GROUP gr1,
  18.           b_pesq RADIOBUTTON GROUP gr1.
  19.  
  20. SELECTION-SCREEN END OF BLOCK b2.
  21.  
  22.  
  23.  
  24. TYPES: BEGIN OF ty_zteste_danilo,
  25.   mru TYPE zteste_danilo-mru,
  26.   usuario TYPE zteste_danilo-usuario,
  27.   data TYPE zteste_danilo-data,
  28.   hora TYPE zteste_danilo-hora,
  29.   nome_programa TYPE zteste_danilo-nome_programa,
  30.   END OF ty_zteste_danilo,
  31.  
  32.   BEGIN OF ty_te422,
  33.     termschl TYPE te422-termschl,
  34.     eroedat TYPE te422-eroedat,
  35.     END OF ty_te422.
  36.  
  37. DATA: t_preenche TYPE TABLE OF zteste_danilo,
  38.       w_preenche TYPE zteste_danilo.
  39.  
  40. DATA : t_te422 TYPE TABLE OF ty_te422,
  41.        w_te422 TYPE  ty_te422.
  42.  
  43. CLEAR: w_preenche,w_te422.
  44. FREE: t_preenche ,t_te422.
  45.  
  46.  
  47. SELECT termschl eroedat
  48.   FROM te422
  49.   INTO TABLE t_te422
  50. *  WHERE termschl = '13031103' OR termschl = '13062103' OR termschl = '14031121'.
  51.   WHERE termschl in s_mru.
  52.  
  53. IF  sy-subrc IS INITIAL.
  54.  
  55.   LOOP AT t_te422 INTO w_te422.
  56.  
  57.     w_preenche-mru          = w_te422-termschl.
  58.     w_preenche-usuario      = sy-uname.
  59.     w_preenche-data         = sy-datum.
  60.     w_preenche-hora         = sy-uzeit.
  61.     w_preenche-nome_programa = sy-repid.
  62.  
  63.     APPEND w_preenche TO t_preenche.
  64.     CLEAR w_preenche.
  65.  
  66.   ENDLOOP.
  67.  
  68.   MODIFY zteste_danilo FROM TABLE t_preenche.
  69.   IF sy-subrc IS INITIAL.
  70.     COMMIT WORK.
  71.  
  72.   ELSE.
  73.  
  74.     MESSAGE text-001 TYPE 'S' DISPLAY LIKE 'E'.
  75.     LEAVE LIST-PROCESSING.
  76.  
  77.   ENDIF.
  78. *
  79.  
  80. ENDIF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement