Mysql query to fetch records which are not matched form both tables
From both tables I have change in ean field and in quantity field


To solve THIS task you must use the next query:

SELECT t1.asn, t1.ean, t2.ean oldean, t1.belegnr, t1.quantity, t2.quantity Oldqty
FROM temp_table t1, details t2
WHERE t1.asn = t2.asn
  AND t1.belegnr = t2.belegnr
  AND (    t1.ean != t2.ean
        OR t1.quantity != t2.quantity )


BUT...

Looking at your example data and desured result I see that you want to get the record pairs when ean OR quantity is changed.

You can obtain the shown result from shown source data using the next query:

SELECT t1.asn, t1.ean, t2.ean oldean, t1.belegnr, t1.quantity, t2.quantity Oldqty
FROM temp_table t1, details t2
WHERE t1.asn = t2.asn
  AND t1.belegnr = t2.belegnr
  AND (   (     t1.ean = t2.ean
            AND t1.quantity != t2.quantity )
       OR (     t1.ean != t2.ean
            AND t1.quantity = t2.quantity ))


fiddle