Flying Blue XP are earned based in the following chart:

Note that SAS Plus is considered premium economy even on European routes where it may be booked in business booking classes.
Tickets not eligible for miles accrual don't earn XP either. List of eligible booking classes is available here:
https://www.flyingblue.com/en/earn/p...avian-airlines - I believe that in case of SAS, all revenue booking classes are eligible but don't take my word for it.
Booking class is shown when booking a flight with SAS. Not sure why you'd want to book with Booking.com instead, but if they don't show the booking class, you're out of luck.
To get flight credited to Flying Blue, enter your Flying Blue number either at the time of booking, or at check-in.