Hello Koushik,
The names used while creating deep structure should be same as the names defined in the navigation property in the SEGW Model.
I see that navigation properties FORMDETSET and FORMDETTOT which are defined in the SEGW model is not used while creating the deep structure in /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_EXPANDED_ENTITYSET method.
Please correct this.
Refer the below -> You will be able to fix the problem.
Implementing Expand Entity/Entity Set
Let's code association/navigation and data provider expand in OData service!
Regards,
Ashwin