I have an idea to use BTP as a service for another ABAP code generation.
For that purpose generated code needs to be formatted.
Do you think is possible to enable PRETTY_PRINTER FM / or alternative class for use on class to be able to format code from the provided strings?
judging from your question I assume that you are making use of the Generation APIs for classes of the XCO Library Cloud Platform edition to generate classes in the BTP ABAP environment.
The topic of pretty printing is part of the internal backlog of the XCO Generation APIs for classes and interfaces. Unfortunately, I currently cannot make a statement as to when this functionality will become available as we do not yet have a concrete roadmap for this feature.