I have developed a transaction that creates an "Attendance" registration in HR. The same as transaction PA61 does !!
In my program I have used BAPI 'BAPI_PTMGRATTABS_MNGCREATION' and that works fine !
But in transaction PA61 you can create a text by choosing Edit ==> Maintain text.... So what I am looking for is a BAPI or a Function module that I can use to create this text from the transaction that I have developed !
When I have to upload some kind of a long text, I normally use function module SAVE_TEXT.
Important here is that ou use the correct import parameters. For parameter HEADER, you can find the necessary information in the text editor by going in the menu to GOTO- HEADER; the ones you are name, language, id (like 0001 for instance for sales text) and object (MVKE for sales text for instance).
You put the long text in an internal table and map it with table parameter LINES.
Hope this helps you,