ABAP – How to Spool SD Output Documents

Home / SAP / ABAP Coding / ABAP – How to Spool SD Output Documents

Well, this is a continuation of my post from yesterday, so if you missed it, I talked about using the ABAP Web Dynpro Download element to display documents on your web application.  What I talked about yesterday was completely based on having a spool job to convert.  So…  today I’ll talk about how you can Spool SD Output Documents again and again, and easily retrieve them.

SUBMIT RSNAST00
WITH S_KAPPL = i_kappl
WITH S_OBJKY = i_objky
WITH S_KSCHL = i_kschl
WITH P_AGAIN = ‘X’
WITH P_SUFF2 = lv_suff2
AND RETURN.

You might already be familiar with the program RSNAST00, but who knew you could use it for this (I didn’t…  =>  ).  You’ll notice, it’s a pretty simple program.  You give the Output type, the document key, and you can even using define a special key field (SUFF2) that makes it easier to retrieve.

After you run the program, simply go to table TSP01 and enter in the enough criteria to pull out the spool. Then you simply assign this to a context element, and link it to your download element.  And by doing this it will give you another popup window in your favorite web browser showing your output.

Now for my shameless plug.  I’ve done this all in Rapier now (it’ll be released in version 2 this fall), but thanks to this technique, I’ve been able to output Order Confirmations, invoices, etc…  directly onto the customer website, so they pull their own documents anytime they want.  If you’re interested in seeing this in action, let me know and I’ll be happy to setup a demo to show you.  Rapier 2.0 is gonna be really cool.  I’ve been putting a lot of hours into this recently, so you’ll want to check it out.  And, remember, if you’re in the market and you buy now, you get the charter customer price, and the ability to influence functionality that will be officially released this fall.    Ok… commercial over… =)

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,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *