When developing SAP Gateway projects using the SEGW t-code, I always try to import entity sets from function modules / BAPIs.

Besides being very fast and useful, I am - mostly - also able to map the data sources to the CRUD-Q operation methods of the data provider class. This mapping works very well with many FM / BAPI provided by SAP. 

Sadly, I don't know how to write function groups / function modules on my own that are also very well 'mappable'. Usually, I get GetEntitySet mapped, but none of the others (create, delete, etc.). I don't know what importing / exporting parameters, or what else, is required to write well 'mappable' function modules.