How to get Released Product Variants with product Category and sub Category from AX Using X++

Dear All,

How can I get released product with product variant and product sub category (Level 3) .

thanks in advance.