Dopo chiamata al FM ssf_read_errors Si loopa sulla tabella ottenuta per leggere gli errori trovati ed aggiornare di conseguenza i protocolli NAST
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
importing job_output_info = ls_job_info
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
*
DATA: LT_ERRORTAB TYPE TSFERROR.
FIELD-SYMBOLS: <FS_ERRORTAB> TYPE LINE OF TSFERROR.
*
* get smart form protocoll
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
ERRORTAB = LT_ERRORTAB.
*
* add smartform protocoll to nast protocoll
LOOP AT LT_ERRORTAB ASSIGNING <FS_ERRORTAB>.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = <FS_ERRORTAB>-MSGID
MSG_NR = <FS_ERRORTAB>-MSGNO
MSG_TY = <FS_ERRORTAB>-MSGTY
MSG_V1 = <FS_ERRORTAB>-MSGV1
MSG_V2 = <FS_ERRORTAB>-MSGV2
MSG_V3 = <FS_ERRORTAB>-MSGV3
MSG_V4 = <FS_ERRORTAB>-MSGV4
EXCEPTIONS
OTHERS = 1.
ENDLOOP.
ELSE.
*
*
ENDIF.