Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Generate XML/XSD from BAPI using ABAP code

Former Member
0 Likes
2,798

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,644

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

Read only

0 Likes
1,644

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