SAP BAPI_MATERIAL_GETBATCHCERT Function Module for Create Quality Certificate for Batch in Portable Document Format (PDF)
BAPI_MATERIAL_GETBATCHCERT is a standard bapi material getbatchcert SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Quality Certificate for Batch in Portable Document Format (PDF) 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 material getbatchcert FM, simply by entering the name BAPI_MATERIAL_GETBATCHCERT into the relevant SAP transaction such as SE37 or SE38.
Function Group: BUS1001
Program Name: SAPLBUS1001
Main Program: SAPLBUS1001
Appliation area: Q
Release date: 19-Aug-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_MATERIAL_GETBATCHCERT 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_MATERIAL_GETBATCHCERT'"Create Quality Certificate for Batch in Portable Document Format (PDF).
EXPORTING
MATERIAL = "Material No.
* PLANT = "Plant for batch
BATCHNUMBER = "Batch number
CUSTOMER = "Customer number
* APPLICATION = 'application/pdf' "Presentation of certificate from browser
* MATERIAL_EVG = "
IMPORTING
FILESIZE = "Total length of MIME data
RETURN = "Return parameters
TABLES
* MESSAGETABLE = "Table of program messages
* MIMETABLE = "Data table in MIME format
IMPORTING Parameters details for BAPI_MATERIAL_GETBATCHCERT
MATERIAL - Material No.
Data type: BAPICHARG1-MATERIALOptional: No
Call by Reference: No ( called with pass by value option)
PLANT - Plant for batch
Data type: BAPICHARG1-PLANTOptional: Yes
Call by Reference: No ( called with pass by value option)
BATCHNUMBER - Batch number
Data type: BAPICHARG1-BATCHOptional: No
Call by Reference: No ( called with pass by value option)
CUSTOMER - Customer number
Data type: BAPIKNVVKY-CUSTOMEROptional: No
Call by Reference: No ( called with pass by value option)
APPLICATION - Presentation of certificate from browser
Data type: BAPIQCI-CONT_TYPEDefault: 'application/pdf'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_EVG -
Data type: BAPIMGVMATNROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_MATERIAL_GETBATCHCERT
FILESIZE - Total length of MIME data
Data type: BAPIQCI-CONT_LENOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return parameters
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_MATERIAL_GETBATCHCERT
MESSAGETABLE - Table of program messages
Data type: BAPIRETURNOptional: Yes
Call by Reference: No ( called with pass by value option)
MIMETABLE - Data table in MIME format
Data type: BAPIQCMIMEOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_MATERIAL_GETBATCHCERT 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: | ||||
| lv_filesize | TYPE BAPIQCI-CONT_LEN, " | |||
| lv_material | TYPE BAPICHARG1-MATERIAL, " | |||
| lt_messagetable | TYPE STANDARD TABLE OF BAPIRETURN, " | |||
| lv_plant | TYPE BAPICHARG1-PLANT, " | |||
| lv_return | TYPE BAPIRETURN, " | |||
| lt_mimetable | TYPE STANDARD TABLE OF BAPIQCMIME, " | |||
| lv_batchnumber | TYPE BAPICHARG1-BATCH, " | |||
| lv_customer | TYPE BAPIKNVVKY-CUSTOMER, " | |||
| lv_application | TYPE BAPIQCI-CONT_TYPE, " 'application/pdf' | |||
| lv_material_evg | TYPE BAPIMGVMATNR. " |
|   CALL FUNCTION 'BAPI_MATERIAL_GETBATCHCERT' "Create Quality Certificate for Batch in Portable Document Format (PDF) |
| EXPORTING | ||
| MATERIAL | = lv_material | |
| PLANT | = lv_plant | |
| BATCHNUMBER | = lv_batchnumber | |
| CUSTOMER | = lv_customer | |
| APPLICATION | = lv_application | |
| MATERIAL_EVG | = lv_material_evg | |
| IMPORTING | ||
| FILESIZE | = lv_filesize | |
| RETURN | = lv_return | |
| TABLES | ||
| MESSAGETABLE | = lt_messagetable | |
| MIMETABLE | = lt_mimetable | |
| . " BAPI_MATERIAL_GETBATCHCERT | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_GETBATCHCERT
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 CONT_LEN FROM BAPIQCI INTO @DATA(ld_filesize). | ||||
| "SELECT single MATERIAL FROM BAPICHARG1 INTO @DATA(ld_material). | ||||
| "SELECT single PLANT FROM BAPICHARG1 INTO @DATA(ld_plant). | ||||
| "SELECT single BATCH FROM BAPICHARG1 INTO @DATA(ld_batchnumber). | ||||
| "SELECT single CUSTOMER FROM BAPIKNVVKY INTO @DATA(ld_customer). | ||||
| "SELECT single CONT_TYPE FROM BAPIQCI INTO @DATA(ld_application). | ||||
| DATA(ld_application) | = 'application/pdf'. | |||
Search for further information about these or an SAP related objects