Fonction SAP BAPI_DOCUMENT_GETLIST - Find Document

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
AUTHORITYGROUP BAPI_DOC_AUX-AUTHGR C 4 SPACE X Authorization Group
CADINDICATOR BAPI_DOC_DRAW-CADINDICATOR C 1 '*' X CAD Indicator
DATACARRIER BAPI_DOC_DRAW-DATACARRIER1 C 10 SPACE X Data Carrier
DELETEINDICATOR BAPI_DOC_AUX-DELFLAG C 1 SPACE X Deletion Indicator
DESCRIPTION BAPI_DOC_DRAW-DESCRIPTION C 40 SPACE X Short Text (Always in Logon Language)
DOCUMENTPART BAPI_DOC_AUX-DOCPART C 3 SPACE X Document Part
DOCUMENTTYPE BAPI_DOC_AUX-DOCTYPE C 3 SPACE X Document Type
DOCUMENTVERSION BAPI_DOC_AUX-DOCVERSION C 2 SPACE X Document Version
ECNUMBER BAPI_DOC_DRAW-ECNUMBER C 12 SPACE X Change Number
LABORATORY BAPI_DOC_DRAW-LABORATORY C 3 SPACE X Lab/Office
LANGUAGE BAPI_DOC_DRAT-LANGUAGE C 1 SY-LANGU X Language for Short Text Search
LANGUAGEISO BAPI_DOC_DRAT-LANGUAGE_ISO C 2 SPACE X Language for Short Text Search
MAXROWS BAPI_DOC_AUX-MAXROWS I 4 0 X Maximum Number of Data Records
STATUSEXTERN BAPI_DOC_DRAW-STATUSEXTERN C 2 SPACE X Status Abbreviation (External)
STATUSINTERN BAPI_DOC_DRAW-STATUSINTERN C 2 SPACE X Status (Internal)
USERNAME BAPI_DOC_DRAW-USERNAME C 12 SPACE X Agent
WSAPPLICATION BAPI_DOC_AUX-WSAPPL C 3 SPACE X Workstation Application

Paramètre Reférence Type Long. Description
FOUNDROWS BAPI_DOC_AUX-MAXROWS I 4 No. of Data Records Found
RETURN BAPIRET2 u 548 BAPI Return

Paramètre Reférence Long. Facultatif Description
DOCNUMBERSELECTION BAPI_DOC_SELNR 53 X Value Range for Document Number
DOCUMENTLIST BAPI_DOC_DRAW 1364 List of Document Info Records

Functionality
You can use this BAPI to find one or more documents.
The result is a list of documents that match the selection criteria.
You can use the following data as search criteria:

  • Document type

  • Document number (as a value range from ... to ...)

  • Document part

  • Document version

  • Description

  • User

  • Authorization group

  • Laboratory/office

  • Change number

  • Deletion indicator

  • Data carrier

  • CAD indicator

  • Application

  • Document status

  • You can use the MAXROWS parameter to restrict the hit list ofdocuments selected. As a result, it may be the case that not all thedocument info records in the system that match the selection criteriaare displayed.
    The number of records actually found is returned in parameter#FOUNDROWS#.
    BAPI_DOCUMENT_GETLIST2 contains further selection criteria.

    Example
    Example program
    ********************************************************************
    ***
    **Declare variables
    ********************************************************************
    ***
    DATA: lf_documentversion LIKE bapi_doc_draw-documentversion.
    DATA: ls_return LIKE bapiret2,
    lf_foundrows LIKE bapi_doc_aux-maxrows.
    DATA: lt_documentlist LIKE bapi_doc_draw occurs 0 with header line.
    ********************************************************************
    ***
    **Assign data
    ********************************************************************
    ****
    lf_documentversion = '10'.
    ********************************************************************
    *
    **Call BAPI
    ********************************************************************
    **
    CALL FUNCTION 'BAPI_DOCUMENT_GETLIST'
    EXPORTING
    DOCUMENTVERSION = lf_documentversion
    IMPORTING
    RETURN = ls_return
    FOUNDROWS = lf_foundrows
    TABLES
    documentlist = lt_documentlist.

    Description
    Indicates the number of data records that were selected.
    If the maximum number of data records has been limited using MaxRows,
    the number of found rows may be larger than the number of delivered
    data records.

    Description
    Return structure for publishing message texts

    Description
    The authorization group allows for access restrictions for certainobjects.
    Users can execute certain activities only when they have theauthorization to do so for the actvity and the authorization group.

    Description
    Indicator displays whether the document was created or changed in aCAD system. The data transport into the SAP System was done via the CADinterface.

    Description
    Logical name for the data carrier where the original application fileis saved.

    • When originals are checked in using the Knowledge Provider it is a
    • frontend computer that can be accessed directly using the file system.
      • When originals are not checked in using the Knowledge Provider the
      • following data carriers are supported:
        Archive, vault, server
        External document management system

        Description
        The parameter DELETEINDICATOR displays whether the document is deletedduring the next reorganization run.

        Description
        Language-dependent description
        Unlike the matchcode search, a distinction is made between capital and
        and small letters.

        Description
        Document part as part of the document key.
        Data form the document key is:

        • Document type

        • Document number

        • Document part

        • Document version
        • Description
          Document type as part of the document key.
          Data from the document key is:

          • Document type

          • Document number

          • Document part

          • Document version
          • Description
            Document version as part of the document key.
            Data from the document key is:

            • Document type

            • Document number

            • Document part

            • Document version
            • Description
              Number of the change master record that is linked to documents for achange and may be a summary for other SAP Objects (such as BOM, routingor, material).

              Description
              Key of the enginnering/design office or lab responsible.
              The keys are defined in Customizing of Document Management (
              Define lab and office).

              Description
              Language for the description search

              Default
              Logon language

              Description
              Language for the description search

              Default
              Logon language

              Description
              Restriction of the maximum number of data records
              You can use the MAXROWS parameter to restrict the number of datarecords selected. If the user does not enter a value the functionmodule delivers all documents back that meet the selectionrequirements.

              Description
              External (language-dependent) status abbreviation
              If the internal status is adopted, it always has priority over the
              external status abbreviation.

              Description
              Internal document status
              If the internal status is adopted, it always has priority over the
              external status abbreviation.

              Description
              Name of processor

              Description
              Key for a workstation application

              Description
              Document number range
              You can enter the document number as a range for the search.

              Description
              List of document info records