You can define logic in function module assigned to "Rules for Sample determination"
Spro>QM>Basic Data>Sample SPC>Define sample determination>Adapt rules for sample
determination
You can create new sampling Type, create function module with logic to read container / Drum
data in it ,and adopt it in rule,create sampling procedure using new sampling type
Hope this will help
Thanks
Diwakar