Lukasz,
You need to understand that FMs were never designed to be consumed for creating OData services. OData services and FMs have their own use cases. The tool provided in SEGW to create an entity/service out of an FM is not supposed to suit every available FM.
Outside-In data modeling approach is the key here.
It means that you would look at the UI which will consume your OData service and create your OData model in SEGW as per that (yes, manually creating entities, properties and other artifacts). Generate runtime artifacts next Then you go to the generated *DPC_EXT class, identify the right method and write your own code to call the FM and populate the return table.
Thanks
Krishna