Función para solicitar valores en pantalla en una dynpro.
DATA: t_fields TYPE TABLE OF sval,
w_fields TYPE sval,
l_return,
l_datum like sy-datum.
w_fields TYPE sval,
l_return,
l_datum like sy-datum.
CLEAR t_fields. REFRESH t_fields.
w_fields-tabname = 'SYST'.
w_fields-fieldname = 'DATUM'.
APPEND w_fields TO t_fields.
APPEND w_fields TO t_fields.
CALL FUNCTION 'POPUP_GET_VALUES_DB_CHECKED'
EXPORTING
check_existence = ' '
popup_title = text-ti1 "titulo popup
IMPORTING
returncode = l_return
TABLES
fields = t_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
EXPORTING
check_existence = ' '
popup_title = text-ti1 "titulo popup
IMPORTING
returncode = l_return
TABLES
fields = t_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
l_fecha = w_fields-value.
EXIT.
ENDLOOP.
IF l_return = 'A' OR l_fecha IS INITIAL.
EXIT.
ENDIF.
No hay comentarios:
Publicar un comentario