Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

One Example : My small tip about how to write simpl tool for study purpose

$
0
0

In my blog Some more technical details about SAP noteI have written a simple toolwhich allows me to get more deep understanding on SAP note.


Before I wrote that tool, I have no technical knowledge on note at all.  I will share with you how I was able to write a tool by myself by getting source code I need via debugging.


All I know is the fact that I can use tcode SNOTE to download a note in Netweaver system.


1. I click "Goto"->"Download SAP Note":


clipboard1.png

And maintain a Note number which I would like to download:

clipboard2.png

2. Create a new text file pasting the following content into it:

[FUNCTION]

Command=/H

Title=Debugger

Type=SystemCommand

 

Save the text file. Drag this file to the download popup in step1, when you see the small "+" icon, drop it.

clipboard3.png

You should see "Debugging switched on" in the bottom screen.

clipboard4.png

3. Click F8 to start download, for me since I have also activated system debugging, so the callstack below seems not so useful for me.

Double click stack11:

clipboard5.png


So from here I can know the main logic of note download is implemented in report scwn_note_download:

clipboard6.png

Set a dynamic breakpoint by clicking the line 334, and click F8. Now code has executed to line 334, we can simply click F5 to step into the report:


clipboard7.png

Within this report I learned a useful function module SCWN_NOTES_DOWNLOAD:

clipboard8.png

All I have to pass into this FM to start note download is note number, version and language:

clipboard9.png

And I continue to step into this FM, I get to know some more function modules with more fine granularity, such as SLIC_GET_LICENCE_NUMBER and SCWN_NOTE_UNPACK_XML, and it is good for me to know finally that the note download is just implemented via a RFC call:

clipboard10.png

In fact most of the source code of my tool are copied from FM SCWN_NOTE_DOWNLOAD.


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>