Hello Nicolas,
I have a similar problem, I have to create a rpm document in every new ITEM created in the system and so long I have not been able to.
We have been creating documents related to projects using function module "BAPI_BUS2175_DOCUMT_UPDATE", these documents are created and we can see them in table "DPR_DOCUMENT". I have to create documents related to the ITEM, and these are stored in table "/RPM/DOCUMENT".
Over the last two days I have been trying to use many classes like
/RPM/CL_DOCUMENT
/RPM/CL_DOCUMENTS
/RPM/CL_DOCUMENT_API
etc.
Without any success : ( I am going to try a little longer and then I am trying with class "/RPM/CL_UI_DOC_LOGIC". This class is the one used in the WebDynpro component "/RPM/DOCUMENT", this is the WebDynpro we use to create the documents manually but I'm not if this will work, I will try to use this as a las resort.
I find the creation of RPM documents very difficult, where you able to solve your problem? Can you give me some advice?
If I find the solution in the while I will post it here so others can use it.
Regards,
Vicent.