2014 Feb 06 1:34 AM
Hi,
I am looking for a straightforward approach to merging some data in docx file. I found demo program ROOXML_DOCX_FORM_MIX_FT_TEST01, which appears to do what I would like to do.
When running the program a call is made to cl_docx_form=>merge_data and at this point the program tries to create a simple transformation and maintain it. It automatically generates GUID and assigns this as the name of the transformation and by default creates it in the $TMP package. However in the same routine it tries to maintain the transformation and then prompts me to "Register the object" before I can change it, as I'm guessing it has created the object in the SAP namespace. I can't see anyway around this, as I cannot set the name of the transformation when calling the static method.
The local test class for cl_docx_form=>merge_data has not been implemented either, so this is the only example I have in the system and the class documentation extends no further than the description of the method.
Has anyone ever used this before and got it to work? Is there another way I should be looking at instead of this using other standard APIs?
Kind Regards,
Katan Patel
2014 Feb 06 1:40 AM
In fact I a blaming this line in the method specfically
CONCATENATE 'XSLT' ls_xsltattr-xsltdesc INTO ls_xsltattr-xsltdesc.
2014 Feb 06 2:01 AM
In fact once I copied this static method to a custom local class and method. I then changed that line of code (prefixing a 'Z' instead of 'X') and everything worked fine. Although not ideal, it fixes my current problem. It's a shame this was hardcoded and not possible to change as an import parameter.