Fonction SAP BAPI_MATERIAL_GETBATCHCERT - Create Quality Certificate for Batch in Portable Document Format (PDF)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
APPLICATION BAPIQCI-CONT_TYPE C 128 'application/pdf' X Presentation of certificate from browser
BATCHNUMBER BAPICHARG1-BATCH C 10 Batch number
CUSTOMER BAPIKNVVKY-CUSTOMER C 10 Customer number
MATERIAL BAPICHARG1-MATERIAL C 18 Material No.
MATERIAL_EVG BAPIMGVMATNR u 82 X
PLANT BAPICHARG1-PLANT C 4 X Plant for batch

Paramètre Reférence Type Long. Description
FILESIZE BAPIQCI-CONT_LEN I 4 Total length of MIME data
RETURN BAPIRETURN u 452 Return parameters

Paramètre Reférence Long. Facultatif Description
MESSAGETABLE BAPIRETURN 452 X Table of program messages
MIMETABLE BAPIQCMIME 255 X Data table in MIME format

Functionality
This method creates a table in MIME format. This table contains aquality certificate for a batch in edited form. Only the format PDF
(Adobe Acrobat(TM) Reader) is currently supported.
Besides the batch ID, you need to enter a customer number since thedata in the quality certificate comes from a customer-specific view.

Notes
Messages are returned in the parameter
RETURN. The parameterdocumentation contains the return values and their meanings.
If no certificate can be created, you can use the table parameterMESSAGETABLE toobtain detailed information.
If you do not know the batch you require, you can use the methodGetBatches to create a list ofbatches for a material.

Description
Size of the MIME table displayed (in bytes).

Description
The return parameter displays information on whether the SAP System cancreate a certificate for the specified criteria.

Value range
TYPE = "S" CODE = " ": Certificate created successfully.
TYPE = "E" CODE = "QC158": No certificate created.

Description
Application for an external program, such as the browser.

Value range
Currently only the PDF (Adobe Acrobat(TM) Reader) issupported.

Default
This parameter has the default value application/pdf.

Description
Key that uniquely identifies the batch in the SAP System, for which acertificate is to be created.

Description
Customer number in the SAP System.

Value range
This method does not check whether the customer number already exists inthe system.

Description
Material number of the batch, for which a certificate is to beproduced.

Value range
This method does not check whether the material number already existsin the system.

Description
Parameter for the long material number
This parameter can be used to transfer long material numbers that cancontain a maximum of 40 characters.
To use this parameter, you must activate the switch for the LAMA (longmaterial number) business function in the system.
The LAMA business function is available as part of the business functionset for DIMP.

Value range
None

Default
None

Description
If batch management takes place at plant level, an entry must be madefor this parameter to clearly identify the batch.
If batch management does not take place at plant level, then the entryis optional.
If you enter a plant, the system designates it as the sender plant thatis specifies the sender text on the certificate.

Description
If an error occurs, this table contains details of why the certificatecannot be produced.

Value range
Successful transaction:
In this case the table is empty.
Error:
In this case the table contains error messages.
The following messages relate to identifying the batch:
TYPE = "E" CODE = "QC153",,Plant is required to identify the batch
TYPE = "E" CODE = "QC154",,No batch for the material found in the plant
TYPE = "E" CODE = "QC155",,No batch for the material found
TYPE = "E" CODE = "QC156",,No batch found
If the following messages appear, no certificate can be createdfor the specified batch:
TYPE = "W" CODE = "QC030",,No certificate profile found
(This can relate to limited access).
TYPE = "W" CODE = "QC054",,No inspection lot or partial lot found
TYPE = "W" CODE = "QC090",,No specification data found for thecharacteristic
TYPE = "W" CODE = "QC091",,No results data found for the characteristic
TYPE = "W" CODE = "QC092",,No short text found for the characteristic
TYPE = "W" CODE = "QC065",,Duplication of characteristic
TYPE = "W" CODE = "QC012",,Characterisic required, but not found
The following messages are informative:
TYPE = "W" CODE = "QC031",,Certificate profile has no characteristics
TYPE = "W" CODE = "TD426",,Inconsistency between print program andlayout set
The following messages indicate serious errors in the system:
TYPE = "W" CODE = "QC055",,Customizing error
TYPE = "W" CODE = "QC056",,Customizing error
TYPE = "W" CODE = "QC057",,Customizing error
TYPE = "W" CODE = "QC058",,Customizing error
TYPE = "W" CODE = "QC070",,Customizing error
TYPE = "W" CODE = "QC071",,Customizing error
TYPE = "W" CODE = "QC102",,Error in master data maintenance for thecharacteristics
TYPE = "W" CODE = "QC103",,Error in master data maintenance for thecharacteristics
TYPE = "W" CODE = "TD420",,Print program error
TYPE = "W" CODE = "TD423",,Print program error
TYPE = "W" CODE = "TD424",,Print program error
TYPE = "W" CODE = "TD425",,Print program error
TYPE = "W" CODE = "TD427",,Print program or layout set error
TYPE = "W" CODE = "TD443",,Print program error
TYPE = "W" CODE = "TD422",,Layout set not active

Description
This table contains a quality certificate in PDF format.
You can display this certificate via the Adobe Acrobat(TM) Reader usinga reprocessing program.

Value range
The table only contains the LINE field (text line with 255 characters).
If the system cannot create a certificate the table is empty.