Code: Alles auswählen.
OPEN CURSOR WITH HOLD l_cursor FOR
SELECT * FROM (l_toaco-connection)
CLIENT SPECIFIED
WHERE mandt IN so_mandt
AND sap_object IN so_sapob
AND object_id IN so_ob_id
AND archiv_id IN so_ablag
AND arc_doc_id IN so_docid
AND ar_object IN so_docar
AND ar_date IN so_ablgd
AND del_date IN so_deldt
AND reserve IN so_doctp.
...........
..........
..........
do.
FETCH NEXT CURSOR l_cursor
APPENDING TABLE connections PACKAGE SIZE l_package_size.
IF sy-subrc <> 0.
EXIT.
ENDIF.
LOOP AT connections ASSIGNING FIELD-SYMBOL(<lfs_records>).
CALL FUNCTION 'ARCHIVOBJECT_STATUS'
EXPORTING
archiv_doc_id = <lfs_records>-arc_doc_id
archiv_id = <lfs_records>-archiv_id
* SIGN = ' '
* DOC_TYPE = ' '
* SIGNATURE = 'X'
IMPORTING
archiv_object_status = lc_rfcstatus
* AR_DATE =
* AR_TIME =
document_type = lc_docclass
TABLES
al_components = it_components
EXCEPTIONS
error_archiv = 1
error_communicationtable = 2
error_kernel = 3
OTHERS = 4.
endloop.
enddo.
IF NOT l_toaco IS INITIAL.
CLOSE CURSOR l_cursor.
ENDIF.