Well... I didn't know what was done outside the code snipet
But in a normal scenario the create_related_entity should work
lo_btorder = lo_factory->create( lt_params ).
* Header data
lo_btadminh = lo_btorder->create_related_entity( iv_relation_name = 'BTOrderHeader' ).
This piece of code is working on my system.
Cheers!
Luis