‎2015 Dec 08 12:07 PM
Hi All,
I need to generate XSDs describing an ABAP function (the interface) using ABAP code. The output should be a valid XSD document containing all the parameters (input, export, ...) including the data types (string, integer, ...). Is there anything available which I can use or do I need to write everything from scratch?
Thanks
Konrad
‎2015 Dec 08 1:49 PM
You may want to explore FMs under Function group SDIXML.
SAP uses SDIXML_IDOC_TO_SCHEMA to generate the xsd for Idoc . Your requirement might be different.
Have a look specially SDIXML_SCHEMA_CREATE and SDIXML_SCHEMA_ELEMENT_CREATE.
R
‎2015 Dec 08 2:12 PM
Hi,
Thanks for your answer. I already found these function modules but I do not know how to use them. How can I get the XSD lets say as a string which I can then write to disc or give back to the calling function?!
I tried e. g. SDIXML_FULI_TO_SCHEMA with BAPI_MATERIAL_GETALL as input but I cannot use the exports "ELEMENT" and "ELEMENTS" as I'm used to.
Do you have an example for me?
Thanks a lot!
Konrad