- Sap Dmee Tree For Ach
- Sap Dmee Xslt Program Download
- Sap Dmee Xslt Program Free
- Sap Dmee Documentation
- Sap Dmee Levels
- Sap Dmee Xslt Programs
DMEE Configuration:Step By Step Part 1. Under Program control, set the Mapping using DME engine indicator. One additional comment – for the user functions SAP provides a template FM DMEE_EXIT_TEMPLATE_ABA that needs to be copied because it has all the right parameters in it. There is also documentation available for that function. The full DMEE documentation can be found in the SAP help help.sap.com: On the initial ‘SAP Solutions -> Overview’ screen, you select ’SAP R/3 and R/3 enterprise’ in the navigation area: On the next screen, you choose the English documentation for SAP R/3 470: This opens a new window. Graphical transformation tool XSLT_TOOL makes it easy to create XML serialization and deserialization programs in SAP. Example is a step by step guide on how to convert internal table data to XML format. After creating the transformation logic, it can be called by an ABAP program using CALL TRANSACTION.
Active1 year, 9 months ago
I need to develop import of xml files with quite complicated structure into SAP.Earlier I used DMEE format trees for export xml and it was quite easy and flexibly. And since this is called 'Data Medium Exchange Engine', so I thought that this could be used in both directions, that is, for import too. But I can't find any docs or examples of how to do it.
I've read the topicParsing XML within SAP ABAPbut before I follow it I just want to be sure that DMEE is really useless for import.
SergeySergey
1 Answer
You can use the iXML library to import and parse your xml file.
As mentioned in the help page:
When XML data is saved in strings or internal tables, it is best to use byte strings or byte-like row types and the UTF-8 code page for the representation.
Therefore, if manipulating byte strings, you can use the
CALL TRANSFORMATION
statement to convert your XML to ABAP:The
CALL TRANSFORMATION
help page has a lot of examples. You can also find more info on the following SAP help portal.DMEE does have an upload XML function. It uses the iXML library - see include
forgetaboutmeforgetaboutmeLDMEE1_ABAF50
46111 gold badge55 silver badges1616 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged xmlimportxml-parsingsapabap or ask your own question.
Some time ago, I was looking for some demonstration how to get data from SAP into an XML file and vice versa, but found nothing satisfactory on the web. So I had to start developing the 'try and error' method. By now, I believe, I've gathered enough knowledge to write that tutorial myself. Well, here it comes, and with it the complete ABAP and XSLT source code, and hopefully enough explanation that you'll be able to develop an understanding what is happening, and to use it for your own projects.
Part 1: XML to ABAP
Sap Dmee Tree For Ach
To get started, we first of all need a structure within SAP that has to be mapped onto certain XML elements and vice versa. We want to keep things very simple, so let's say a data set shall be of a type
person
with the fields customer_id
, first_name
and last_name
. Sap Dmee Xslt Program Download
It's easy to put this into an ABAP type:
It's also easy to think of an XML structure that can contain data of this type:
And now we're going to shift the data from the above XML file into an internal ABAP table of the type ts_person. The ABAP report to accomplish this task consists of two parts. The first part is a regular ABAP programme, the second part is an XSLT transformation. SAP supports this standard via
CALL TRANSFORMATION
. But more about that later. Now copy the following code into your ABAP editor, and do read the comments to understand what's going on:
Now we can launch the SAP XSLT editor by double clicking on the transformation
z_xml_to_abap
. Depending on your SAP system, you'll have to choose the transformation type. XSLT is correct here. You'll see that SAP has already created a simple XSLT frame. Replace it with the following stylesheet: XSLT is an internet standard developed by the W3 consortium. It's supported by recent versions of most internet applications and programming suites. For example, it's included in Internet Explorer, Firefox, .NET and Java. Whereas XSLT version 1.0 can't do much more than transforming XML files from one format into another, XSLT version 2.0 can be used to solve simple programming tasks. That newer version, however, isn't supported by SAP yet.
When transforming data from or to the ABAP format, a special XML dialect called ABAP-XML is used. The SAP kernel then converts this format into ABAP internal tables or the internal tables to ABAP-XML.
Now the first part is done. This programme will successfully extract the data from the XML file and import it in an internal table. Try it by saving the XML example file in the location
C:tempcustomers.xml
and run the report. You can also try to alter the XSLT and the XML file, and see how it affects the result. Part 2: ABAP to XML
Sap Dmee Xslt Program Free
The other direction from ABAP to XML works exactly the other way around. Again, we're using the type definition and the XML structure from part 1. We're appending a couple of test values to the internal table, and apply another XSLT transformation to this data. Copy the following source code into your ABAP editor, and don't forget to read the comments:
Of course, the second report also needs an XSLT stylesheet. Create it by double clicking the transformation. Then insert the following source code into the XSLT editor:
Sap Dmee Documentation
Now run your report. It'll create a valid XML file for you from the two lines of the internal table. Here you can also try to change the XSLT stylesheet, and see how your alterations affect the resulting XML file.
Final remarks
There are two more things I'd like to finally let you know. This tutorial has just shown you only the tip of the iceberg. We've used only a flat structure on the ABAP side, and the input/output XML format is also kind of flat. The XML formats in broad use are way more complex, just think of SVG, XHTML or the Microsoft Office XML files. XSLT can easily manage these complex formats as well, even from within SAP, and extract certain data from these files, or generate complex XML files containing data from the SAP tables.
The second issue I want to raise is of the code page. Of course, the code page of the XML files has to be the same one as the code page of the SAP system. Also, when downloading the generated XML file to your computer, you'll have to select the correct corresponding code page.
You can work around this restriction if you don't use string and char data types, but xstring and raw instead. In this case, you'll have to upload and download your files in binary type. It's even possible to create UTF-8 encoded XML files in a non-unicode SAP system! The examples in this tutorial are all made to work with SAP Netweaver Trial 7.02 SP6. It's possible that you'll have to adapt the choice of code pages if you want to run them on another system.
What I can offer for your company is more than three years of experience of XSLT integration in SAP, especially when it comes to generating complex XML files, or extracting data from XML files and storing it within SAP tables. I can also offer professional training for your IT department. Please get in touch and ask for a quote. Based in Cambodia, we can offer you high quality service at very good rates.
Sap Dmee Levels
Get deeper into XSLT
Although a bit old, but not the least outdated, the best XSLT tutorial and reference book I've come across is 'Inside XSLT' by Steven Holzner. If you want to parse or build deeply nested XML documents, this book will help you understand XSLT in every aspect.
Sap Dmee Xslt Programs
Every single XSLT element and XPath function is explained in detail with more than 400 code examples, for example, how to sort elements, how to use loops and
if
conditions, and how to convert data to other formats like HTML.