Ansicht
Dokumentation

CHANGEDOCUMENT_READ_HEADERS - Change document: Read change document header

CHANGEDOCUMENT_READ_HEADERS - Change document: Read change document header

Fill RESBD Structure from EBP Component Structure   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book
Function

This function module determines change document numbers with the corresponding header information for an object class. This search can be limited by specifying various parameters (see interface description).

Depending on the parameter ARCHIV_HANDLE, the change documents are read from the database (default setting) or from an archive.

In addition, the parameter LOCAL_TIME can be used to define whether a local date and a local time (with respect to the local time zone of the user) is passed or the system date and the system time (standard setting).

If the parameter TIME_ZONE is used to pass a time zone, this zone is used instead of the system time for conversions to local time. TIME_ZONE contains the time zone in which the change documents were written. The parameter TIME_ZONE is only evaluated if LOCAL_TIME = 'X'.

Internally, this function module also gets the items associated with the header information found.

If the function module CHANGEDOCUMENT_READ_POSITIONS is then called with the change document numbers read here, the associated items can be read directly from the internal tables. The database is not accessed again.

For this reason, combined calls, as in the report RSSCD100, are a good idea.

If only the header information needs to be read, the function module CHANGEDOCUMENT_READ_HDRS_ONLY can be used.

Performance Notes

To make it quicker to find the required header information, it is a good idea to specify the following search criteria (if known): OBJECTCLAS and OBJECTID. These are part of the key in the table CDHDR, where the header information is located.

If the date is passed as a parameter, the search can be made quicker by using an index in table CDHDR that also contains the date.

If possible, do not use wild cards in the parameter values.

Example call:
DATA: OBJEKT     LIKE CDHDR-OBJECTCLAS,
      OBJEKTID LIKE CDHDR-OBJECTID,
      AENDERER LIKE CDHDR-USERNAME,
      DATUM    LIKE CDHDR-UDATE,
      ZEIT     LIKE CDHDR-UTIME,

DATA: ,,BEGIN OF ICDHDR OCCURS 50.
  ,,,,  INCLUDE STRUCTURE CDHDR.
DATA: ,,END OF ICDHDR.

CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
  EXPORTING  OBJECTCLASS        = OBJEKT
            OBJECTID           = OBJEKTID
            USERNAME           = AENDERER
            TIME_OF_CHANGE     = ZEIT
            DATE_OF_CHANGE     = DATUM
  TABLES     I_CDHDR            = ICDHDR
  EXCEPTIONS ...




Parameters

ARCHIVE_HANDLE
DATE_OF_CHANGE
DATE_UNTIL
I_CDHDR
I_HOT
LOCAL_TIME
NOPLUS_ASWILDCARD_INOBJID
OBJECTCLASS
OBJECTID
READ_CHANGEDOCU
TIME_OF_CHANGE
TIME_UNTIL
TIME_ZONE
USERNAME

Exceptions

NO_POSITION_FOUND
TIME_ZONE_CONVERSION_ERROR
WRONG_ACCESS_TO_ARCHIVE

Function Group

SCD1

BAL_S_LOG - Application Log: Log header data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5217 Date: 20240523 Time: 102302     sap01-206 ( 54 ms )