Hi Nithish,
You need to call these bapi, and follow code based implementation in order to create a gw service. You cannot change to bapi. You need to call these FMs in your code and pass the output in er_entity or et_Entityset, based on your requirement.
Regards,
Tejas