QAALE_DISTRIBUTE_QMAT_POST>. Inthis way, the BAPIs can be encapsulated.
QAALE_DISTRIBUTE_QMAT receives the data that is in the target system,removes this from the IDOC, performs some checks (depending on the QMATfor the target system), and saves the inspection setup to the database,if all inspections have been successful.
If there are errors, the table RETURN contains messages (errors andwarning messages) because exceptions are not allowed for BAPIs. TableINSPECTIONCTRL can contain optional inspection setup data.Description
The parameter 'INSPECTIONCTRL' is displayed as a table. A data recordfor this parameter contains the complete data for an inspection type.Since several inspection types can be assigned to a material/plantcombination, the table can contain several entries.
'INSPECTIONCTRL' is structured in a similar way to the database tableQMAT. As a result, the meaning of the single fields can be taken fromthe description for QMAT if required. In addition to the fields fromQMAT, 'INSPECTIONCTRL' contains a field, which specifies whether therespective inspection type reposted to the target system should bechanged or deleted.
Value range
The parameter 'INSPECTIONCTRL' should contain at least one data record,otherwise you cannot access this BAPI.
Description
This parameter is the standard parameter for the return of messages. Ifa message (any message type) is written within this function module,the message is stored in this return table.
Since exceptions are not allowed in BAPIs, this is the only way toreturn messages. If this table is empty, there are no errors. Theparameter is required for a BAPI.