Hi Firefighter,
Thank you for your answer... It was interesting reading... And your answers along with going through the QC02_INSP_CHAR_SPECS_BEFORE provided more understanding.
Technically, this is how the above FM (which is called during COA generation for QM Certificates (QMMaster Inspection characteristic , QCVM-KATEGORIE = '1') work... This FM calls the BWUL (and BWUL results are exploded based on the control parameters including the explosion level set at certificate profile and Stock transfer flag). The batch explosion FM keeps finding the source for the batch (CHVW table). When the stock transfer flag is turned off, Batch explosion is stopped as soon as the source of the batch hits the Purchase Order. This FM returns all the source batches pertaining to input material, plant and batch (based on control parameter).
BWUL List is filtered based on the materials in the material list (on the certificate profile). This results set provides the batches. In example, my certificate profile had 5 materials (One of the materials in the list was actually a component of the first material). My BWUL had returned 2 batches for Material 'X' and its component Material 'Y' (both of which were in the certificate profile) and was selected.
The FM QC02_INSP_CHAR_SPECS_BEFORE, takes above list of batches and checks if there is an inspection lot results for first batch and input characteristics. If it finds the characteristic level, it does not look at the second batch. If it does not find the inspection lot /results for the first batch, it goes onto the next batch.
In my example scenario, the batch on source material itself had the inspection lot results (for all the characteristics) and it did not require to go down further batches (as you had indicated in your previous post).
Now I need to check with business how they have set up their inspection process (Is this something typically configured at material level or is this user discretion)?