SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_DOCUMENT_GETLIST



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Mon Dec 22, 2008 11:54 am    Post subject: BAPI_DOCUMENT_GETLIST Reply with quote

BAPI_DOCUMENT_GETLIST - Find Document

Functionality
You can use this method to find a document and select a list of documents. A table containing the document data is
created.
You can use the "MAXROWS" parameter to restrict the number of selected documents in the hit list.

Code:
**... List of selected documents
DATA: LT_DOC_DATA  LIKE BAPI_DOC_DRAW  OCCURS 0 WITH HEADER LINE,


**... Value range for document number
      LT_DOCNR_SEL LIKE BAPI_DOC_SELNR OCCURS 0 WITH HEADER LINE,


**... Bapi return structure
      LS_RETURN LIKE BAPIRET2,

**... Max.  number of data records that are returned

LF_MAXROWS LIKE BAPI_DOC_AUX-MAXROWS,

**... Number of data records (number of records in the hit list)

LF_FOUNDROWS LIKE BAPI_DOC_AUX-MAXROWS.

**----------------------------------------------------------------------

** Construct value range for document number
 CLEAR: LT_DOCNR_SEL.

 LT_DOCNR_SEL-SIGN   = 'I'.

LT_DOCNR_SEL-OPTION = 'CP'.
 LT_DOCNR_SEL-DOCUMENTNUMBER_LOW = 'JB*'.

 APPEND LT_DOCNR_SEL.

** Select documents
 CALL FUNCTION 'BAPI_DOCUMENT_GETLIST'

EXPORTING: DOCUMENTTYPE       = 'DRW'
               DESCRIPTION        = 'Gear*'

MAXROWS            = 250           " max 250 data records
    IMPORTING: FOUNDROWS          = LF_FOUNDROWS

RETURN             = LS_RETURN
    TABLES:    DOCNUMBERSELECTION = LT_DOCNR_SEL

DOCUMENTLIST       = LT_DOC_DATA.

** Errors occurred ??
 IF ls_return-type CA 'EA'.
 



MESSAGE ID '26' TYPE 'E' NUMBER '000'
           WITH ls_return-message.
   EXIT.
 ENDIF.

 LOOP AT LT_DOC_DATA.
  ....
  ....
ENDLOOP.


Notes
You can use the following data as search criteria:
Document type
Document number (as value range from ... to ...)
Document part
Document version
Description
Person responsible
Authorization group
Office/laboratory
Change number
Deletion flag
Data carrier
CAD indicator
Work station application
Document status
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.