SAP BAPI_CTRACPSINVDOC_PRINT Function Module for Print Invoicing Document









BAPI_CTRACPSINVDOC_PRINT is a standard bapi ctracpsinvdoc print SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Print Invoicing Document processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi ctracpsinvdoc print FM, simply by entering the name BAPI_CTRACPSINVDOC_PRINT into the relevant SAP transaction such as SE37 or SE38.

Function Group: FMCA_INV_BOR
Program Name: SAPLFMCA_INV_BOR
Main Program: SAPLFMCA_INV_BOR
Appliation area:
Release date: 10-Oct-2007
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_CTRACPSINVDOC_PRINT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_CTRACPSINVDOC_PRINT'"Print Invoicing Document
EXPORTING
INVDOCHEADER = "BAPI: Input Structure for Invoicing Document (Header)
* X_PRINT_SIMULATE = "Simulate Printing of Invoicing Document
* X_PRINT = "Print Invoicing Document
* X_GETPDF = "Generate PDF File for Invoicing Document

IMPORTING
PDF_SAP_OBJECT = "SAP ArchiveLink: Object type of business object
PDF_OBJECT_ID = "SAP ArchiveLink: Object ID (Object Identifier)

TABLES
* INVDOCPDF = "BAPI: Invoice in PDF Format (128 Bytes per Line)
* INVDOCPDF2 = "BAPI: Invoice in PDF Format (1024 Bytes per Line)
RETURN = "Return Parameter(s)
.



IMPORTING Parameters details for BAPI_CTRACPSINVDOC_PRINT

INVDOCHEADER - BAPI: Input Structure for Invoicing Document (Header)

Data type: BAPI_CTRACPSINVDOC_H
Optional: No
Call by Reference: No ( called with pass by value option)

X_PRINT_SIMULATE - Simulate Printing of Invoicing Document

Data type: BAPI_CTRACPSINVDOC_PRNT-X_SIMULATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_PRINT - Print Invoicing Document

Data type: BAPI_CTRACPSINVDOC_PRNT-X_PRINT
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_GETPDF - Generate PDF File for Invoicing Document

Data type: BAPI_CTRACPSINVDOC_PRNT-X_GETPDF
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_CTRACPSINVDOC_PRINT

PDF_SAP_OBJECT - SAP ArchiveLink: Object type of business object

Data type: BAPI_CTRACPSINVDOC_PDF_LINK-PDF_SAP_OBJECT
Optional: No
Call by Reference: No ( called with pass by value option)

PDF_OBJECT_ID - SAP ArchiveLink: Object ID (Object Identifier)

Data type: BAPI_CTRACPSINVDOC_PDF_LINK-PDF_OBJECT_ID
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_CTRACPSINVDOC_PRINT

INVDOCPDF - BAPI: Invoice in PDF Format (128 Bytes per Line)

Data type: BAPI_CTRACPSINVDOC_PDF
Optional: Yes
Call by Reference: Yes

INVDOCPDF2 - BAPI: Invoice in PDF Format (1024 Bytes per Line)

Data type: BAPI_CTRACPSINVDOC_PDF2
Optional: Yes
Call by Reference: Yes

RETURN - Return Parameter(s)

Data type: BAPIRET2
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_CTRACPSINVDOC_PRINT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_invdocpdf  TYPE STANDARD TABLE OF BAPI_CTRACPSINVDOC_PDF, "   
lv_invdocheader  TYPE BAPI_CTRACPSINVDOC_H, "   
lv_pdf_sap_object  TYPE BAPI_CTRACPSINVDOC_PDF_LINK-PDF_SAP_OBJECT, "   
lt_invdocpdf2  TYPE STANDARD TABLE OF BAPI_CTRACPSINVDOC_PDF2, "   
lv_pdf_object_id  TYPE BAPI_CTRACPSINVDOC_PDF_LINK-PDF_OBJECT_ID, "   
lv_x_print_simulate  TYPE BAPI_CTRACPSINVDOC_PRNT-X_SIMULATE, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_x_print  TYPE BAPI_CTRACPSINVDOC_PRNT-X_PRINT, "   
lv_x_getpdf  TYPE BAPI_CTRACPSINVDOC_PRNT-X_GETPDF. "   

  CALL FUNCTION 'BAPI_CTRACPSINVDOC_PRINT'  "Print Invoicing Document
    EXPORTING
         INVDOCHEADER = lv_invdocheader
         X_PRINT_SIMULATE = lv_x_print_simulate
         X_PRINT = lv_x_print
         X_GETPDF = lv_x_getpdf
    IMPORTING
         PDF_SAP_OBJECT = lv_pdf_sap_object
         PDF_OBJECT_ID = lv_pdf_object_id
    TABLES
         INVDOCPDF = lt_invdocpdf
         INVDOCPDF2 = lt_invdocpdf2
         RETURN = lt_return
. " BAPI_CTRACPSINVDOC_PRINT




ABAP code using 7.40 inline data declarations to call FM BAPI_CTRACPSINVDOC_PRINT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single PDF_SAP_OBJECT FROM BAPI_CTRACPSINVDOC_PDF_LINK INTO @DATA(ld_pdf_sap_object).
 
 
"SELECT single PDF_OBJECT_ID FROM BAPI_CTRACPSINVDOC_PDF_LINK INTO @DATA(ld_pdf_object_id).
 
"SELECT single X_SIMULATE FROM BAPI_CTRACPSINVDOC_PRNT INTO @DATA(ld_x_print_simulate).
 
 
"SELECT single X_PRINT FROM BAPI_CTRACPSINVDOC_PRNT INTO @DATA(ld_x_print).
 
"SELECT single X_GETPDF FROM BAPI_CTRACPSINVDOC_PRNT INTO @DATA(ld_x_getpdf).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!