Escolar Documentos
Profissional Documentos
Cultura Documentos
* Variaveis
DATA o_root TYPE REF TO cx_root.
DATA v_texto TYPE string.
**********************************************************************
* Seleção de dados
SELECT *
FROM ztpagamentos_hdv
INTO TABLE t_paga
WHERE gjahr IN s_gjahr
AND idapt IN s_aprtmt
AND idpre IN s_predio.
IF sy-subrc = 0.
SORT t_paga BY gjahr idapt idpre.
ELSE.
"Não foram encontrados dados para a seleção indicada
MESSAGE s789(m7) DISPLAY LIKE 'E'.
RETURN.
ENDIF.
* Pop-Up
CALL FUNCTION 'STC1_POPUP_WITH_TABLE_CONTROL'
EXPORTING
header = 'Atualizar Dados de Pagamentos'
tabname = 'ZTPAGAMENTOS_HDV'
* NO_INSERT = abap_on
no_delete = abap_on
no_button = abap_false
TABLES
table = t_paga
EXCEPTIONS
no_more_tables = 1
too_many_fields = 2
nametab_not_valid = 3
handle_not_valid = 4
OTHERS = 5.
IF sy-subrc <> 0.
"Erro ao gerar popup de Ataulização de Dados
MESSAGE s023 DISPLAY LIKE 'E'.
RETURN.
ENDIF.
ENDTRY.
ELSE.
"Não foi possivel obter o lock do registo
MESSAGE s020 DISPLAY LIKE 'E'.
ENDIF.