Evento 01
FORM atualiza_modificador.
FIELD-SYMBOLS: <lfs_field>,
<lfsw_total>.
LOOP AT total.
CHECK <action> = 'U' OR <action> = 'I'.
ASSIGN COMPONENT 'AENAM' OF STRUCTURE <vim_total_struc> TO <lfs_field>.
IF sy-subrc = 0.
<lfs_field> = sy-uname.
ENDIF.
ASSIGN COMPONENT 'AEDAT' OF STRUCTURE <vim_total_struc> TO <lfs_field>.
IF sy-subrc = 0.
<lfs_field> = sy-datum.
ENDIF.
ASSIGN COMPONENT 'AEZET' OF STRUCTURE <vim_total_struc> TO <lfs_field>.
IF sy-subrc = 0.
<lfs_field> = sy-uzeit.
ENDIF.
"Atualiza os dados na tela
READ TABLE extract WITH KEY <vim_xtotal_key>.
IF sy-subrc EQ 0.
extract = total.
MODIFY extract INDEX sy-tabix.
ENDIF.
MODIFY total.
ENDLOOP.
ENDFORM. "ATUALIZA_MODIFICADOR.
*================================================
Validar entradas na SM30
- Dentro do evento 01
TYPES: BEGIN OF tp_cont,
cont TYPE i,
END OF tp_cont.
DATA: lt_cont TYPE TABLE OF tp_cont.
DATA ls_cont TYPE tp_cont.
LOOP AT total.
CHECK <action> = 'U' OR <action> = 'N'.
IF <vim_total_struc> IS ASSIGNED.
MOVE-CORRESPONDING <vim_total_struc> TO ls_cont.
ENDIF.
ENDLOOP.
IF REDUCE i( INIT cont = 0
FOR ls_cont IN lt_cont WHERE ( cont > 1 ) NEXT cont = cont + 1 ) > 0 .
MESSAGE 'Erro' TYPE 'I' DISPLAY LIKE 'E'.
vim_abort_saving = 'X'.
ENDIF.
Nenhum comentário:
Postar um comentário