cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP QM - RECURRING INSPECTION

0 Kudos
1,667

Recurring inspection

Requirement is - Quality team wants inspection lots to be created after the SLED date is reached.

Means first inspection date in the Batch hear master should be equal to SLED date.

After the first inspection they want to do the inspection in intervals.

Any solution for this ?

View Entire Topic
Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

In QM recurring inspection batches are selected when the expiration date or the next inspection date is reached. It means that, if the next inspection is reached first, system would automatically trigger the inspection, even if the expiration date has not been reached. This is at least the standard process executed when you run transaction QA07.

The program executed behind transaction QA07 is RQAAAS10 and you can find the logic mentioned above in the piece of code below. You can easily create your own program, as a copy of the standard program, and ask your ABAP developer to change this logic, in order to first check for the expiration date and only after reaching the expiration date consider the next inspection date.

*-- ... Chargen auf Mandantenebene
    SELECT charg vfdat qndat FROM mch1
           INTO TABLE l_mch_tab
      WHERE matnr = p_qmat-matnr
        AND charg IN s_charg
        AND zustd = space
        AND lvorm = space              "keine Löschvormerkung
        AND ( vfdat LT g_datum_mhd AND vfdat GT c_inidatum    <<<<<<<<<<
        OR    qndat LT g_datum_prf AND qndat GT c_inidatum ) .<<<<<<<<<<


*   Falls keine Charge Form verlassen    ----->
    CHECK sy-subrc IS INITIAL .
  ELSE.
*-- ... Chargen auf Werksebene
    SELECT charg vfdat qndat FROM mcha
           INTO TABLE l_mch_tab
      WHERE matnr = p_qmat-matnr
        AND werks = p_qmat-werks
        AND charg IN s_charg
        AND lvorm = space              "keine Löschvormerkung
        AND zustd = space
        AND ( vfdat LT g_datum_mhd AND vfdat GT c_inidatum    <<<<<<<<<<
         OR   qndat LT g_datum_prf AND qndat GT c_inidatum ) .<<<<<<<<<<
*   Falls keine Charge Form verlassen    ----->
    CHECK sy-subrc IS INITIAL .
  ENDIF.

Regards,
Caetano