Ansicht
Dokumentation

BAPI_DOCUMENT_CHECKOUTVIEWX - Dokumente zur Anzeige auschecken

BAPI_DOCUMENT_CHECKOUTVIEWX - Dokumente zur Anzeige auschecken

TXBHW - Original Tax Base Amount in Local Currency   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
Diese Dokumentation steht unter dem Copyright der SAP AG.
SAP E-Book

Funktionalität

Dieser Funktionsbaustein ermöglicht es, mehrere Dokumente auf einmal zum Anzeigen auszuchecken.

Sie haben zwei Möglichkeiten:

  • Sie können Dokumente in der Tabelle Documents auflisten und in der Tabelle WSApplication die Workstation-Applikationen angeben, die die auszucheckenden Originale näher spezifizieren.
Es werden die Daten der Dokumente gelesen. Es wird das erste gefundene Original ausgecheckt, dessen Workstation-Applikation mit einer Workstation-Applikation in der Tabelle WSApplication übereinstimmt.
  • Es besteht die Möglichkeit, Originale explizit in der Tabelle DocumentFiles anzugeben.

Einschränkungen:

  • Zusatzdateien werden nicht unterstützt.

Beispiel

DATA: lt_documentdata LIKE bapi_doc_draw2 OCCURS 0 WITH HEADER LINE,

lt_documentfiles_in LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,

lt_documentfiles_out LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,

lt_wsapplication LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,

DATA: return LIKE bapiret2.

CLEAR lt_documentdata.

REFRESH lt_documentdata.

(a)

lt_documentdata-documentnumber = 'dd01'.

lt_documentdata-documenttype = 'drw'.

lt_documentdata-documentversion = '00'.

lt_documentdata-documentpart = '000'.

APPEND lt_documentdata.

lt_documentdata-documentnumber = 'dd01'.

lt_documentdata-documenttype = 'drw'.

lt_documentdata-documentversion = '01'.

lt_documentdata-documentpart = '000'.

APPEND lt_documentdata.

lt_documentdata-documentnumber = 'dd01'.

lt_documentdata-documenttype = 'drw'.

lt_documentdata-documentversion = '02'.

lt_documentdata-documentpart = '000'.

APPEND lt_documentdata.

CLEAR lt_wsapplication.

REFRESH lt_wsapplication.

lt_wsapplication-wsappl = 'ASM'.

APPEND lt_wsapplication.

lt_wsapplication-wsappl = 'PRT'.

APPEND lt_wsapplication.

CLEAR: lt_documentfiles_out.

REFRESH: lt_documentfiles_out.

CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEWX'

EXPORTING

getcomponents = '1'

originalpath = 'C:\TEMP\trash\'

hostname = ' '

IMPORTING

return = return

TABLES

documents = lt_documentdata

documentfiles_out = lt_documentfiles_out

wsapplication = lt_wsapplication.

(b)

CLEAR: lt_documentfiles_in, lt_documentfiles_out.

REFRESH: lt_documentfiles_in, lt_documentfiles_out.

lt_documentfiles_in-originaltype = '1'.

lt_documentfiles_in-documentnumber = 'dd01'.

lt_documentfiles_in-documenttype = 'drw'.

lt_documentfiles_in-documentversion = '00'.

lt_documentfiles_in-documentpart = '000'.

lt_documentfiles_in-originaltype = '1'.

APPEND lt_documentfiles_in.

lt_documentfiles_in-originaltype = '1'.

lt_documentfiles_in-documentnumber = 'dd01'.

lt_documentfiles_in-documenttype = 'drw'.

lt_documentfiles_in-documentversion = '01'.

lt_documentfiles_in-documentpart = '000'.

lt_documentfiles_in-originaltype = '1'.

APPEND lt_documentfiles_in.

lt_documentfiles_in-originaltype = '1'.

lt_documentfiles_in-documentnumber = 'dd01'.

lt_documentfiles_in-documenttype = 'drw'.

lt_documentfiles_in-documentversion = '02'.

lt_documentfiles_in-documentpart = '000'.

lt_documentfiles_in-originaltype = '1'.

APPEND lt_documentfiles_in.

CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEWX'

EXPORTING

getcomponents = '1'

originalpath = 'C:\TEMP\trash\'

hostname = ' '

IMPORTING

return = return

TABLES

documentfiles_in = lt_documentfiles_in

documentfiles_out = lt_documentfiles_out

wsapplication = lt_wsapplication.

IF return-type CA 'EA'.

ROLLBACK WORK.

WRITE: / '**************** FEHLER ******************'.

WRITE:/ return-message.

ELSE.

COMMIT WORK.

WRITE: / '**************** ERFOLG ******************'.

ENDIF.





Parameter

COMPONENTS
DOCUMENTFILES_IN
DOCUMENTFILES_OUT
DOCUMENTS
GETCOMPONENTS
HOSTNAME
ORIGINALPATH
PF_FTP_DEST
PF_HTTP_DEST
RETURN
WSAPPLICATION

Ausnahmen

Funktionsgruppe

CVBAPI

PERFORM Short Reference   Vendor Master (General Section)  
Diese Dokumentation steht unter dem Copyright der SAP AG.

Length: 6429 Date: 20240523 Time: 100459     sap01-206 ( 59 ms )