One of my recent adventures was find a way to pull documents out of SAP, and display them within my web application. This turned out to be rather challenging, but I learned some neat tricks about ABAP Web Dynpro along the way. The Web Dynpro Download Element is one of my new favorites, once I figured out how I could use it.
Let’s set the stage. You have a document withing SAP that you want to display to your web user. The Web Dynpro Download Element works perfectly for this… provided you can feed it the proper data. What I figured out is that in order to make this work, you need to get your document into an XSTRING format. I think this is a RAW string or something like that, but it’s not important. What is important is how do you get it into the XSTRING format. One of the cool tricks I found online was using the following function module:
This function will convert a spool job into the XSTRING format you need to output it. Now, getting things into the spool can be another headache, so tomorrow I’ll talk about how to get your standard SD documents into the spool again so you can read them out of the Web Dynpro Download Element.
Thanks for reading,
As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,