Skip to Content

In the past few days, a number of people have expressed interest in writing a weblog (I wonder why:), and had some reservations about the complexity in getting the weblog online. Some stopped by, and asked me for a detailed description of everything that I do. Let me take a few minutes to quickly describe how complex this can be! The first step is brewing a cup of coffee. One moment….hmm!

Step 1: Writing

Some people prefer to write their weblogs using Notepad, and manually adding arcane HTML markup sequences. They can spell perfectly, type blind and know HTML better than the W3C committee. Then there are the meister of writing weblogs: VI or nix.

Mere mortals, like me, prefer to use Microsoft Word! Its good editor supports me with good onscreen formatting, a spell checker and most important, a thesaurus. This allows me to express my pleasure in writing this text as a delight, an enjoyment, state of happiness or even pure satisfaction. Must be the coffee.

The only rule that I follow is to flag all text with a special set of paragraph classes. Later on, the Word document will be converted into an SDN weblog. These classes are: sdn_heading1 for the title text, sdn_heading2 for section headings, sdn_normal for paragraphs of text, sdn_bullet as a clone of the bullet class and sdn_code to list bits of source code (using Courier font and indented). This paragraph is flagged as sdn_normal.

The exact formatting of each class isnot important. Do not pay any attention to things such as fonts, and spacing. All of this is later handled by the style sheets used in SDN. Important is to flag the text correctly, so that later accurate (“correct” improved on by thesaurus) HTML can be generated.

If you wish, you can use my template.

Coffee is finished, so we can start writing. Within Word, the following features are used:

Feature Description
Text This is the fluff to fill the page. All text is flagged with one of the sdn_* paragraph classes.
Images Images are screen grabbed using any tool available. Thereafter they are pasted into a bitmap editor ( ) and cropped. All unnecessary detail is deleted, and only the essence is left. This is important to reduce bandwidth. Very important: for SDN the maximum picture size is 600 by 400 pixels. Do not exceed this. Cut away as much clutter as much as possible. Also, do not scale the picture smaller. It really makes it more difficult to enjoy later on. Just cut away not needed detail. Thereafter, the picture is placed into the Word document with cut-and-paste. Do not worry about things such as JPEG or PNG formatting, with separate files, or anything. Just paste the picture into the document and continue.
Bullets Use the paragraph class sdn_bullet.
Code Very important part of any document. This is a developer network, and the best way for a developer to express himself is with source code. Source code is also pasted into the document and just completely flagged as paragraph class sdn_code.
Tables Use only very simple tables. For this table, I just defined a new table of 2 columns. The first row is the heading row. The text is not flagged in any special way. Just bold it. Nothing more.

Do not worry about the onscreen formatting in Word. For example, for source code (sdn_code) a Courier 9 point font is used with about 1cm indentation. All of this formatting will be stripped later, and in the published weblog will only be the source code in a

sequence.

So the time flies, the page counter jumps, the coffee is already long forgotten and the pleasure is in the creative work. Just use Word and let the fingers fly!

Step 2: Proof Reading

Although not often though about, proof reading is a very important step in the production step. Keep in mind that the hours invested in writing stand in no relationship to the hours that other people spend in reading.

Recommended are two levels of proof reading. For the use of language, ask somebody that speaks native English (the more official language for use in SDN). SDN has an open offer to help with the English aspects. This small step alone on my weblogs has finally convinced everyone that I am English native speaker. This is far from the truth!

At the same time, also ask a colleague to proof read the document for technical content. It helps to catch simple mistakes.

Often during the proof reading steps, changes are made in the Word document, with “Track Changes” active. You can review the changes (and at the same time learn more English!). Thereafter, accept all changes (I usually do) and then switch off this feature again. In addition, delete all comments from the document after reading and following the suggestions. This information should not be published!

Step 3: Publishing

Publishing is the simplest and easiest step.

As a first step, save the document to have the .DOC version of the weblog still available.

Immediately thereafter, save the document a second time in an HTML version. Use the menu sequence “File->Save as Web Page”. A new .HTM version of the document is written to disk, and all the pictures are exported in .JPG, .GIF or .PNG format into a subdirectory.

Most important, immediately close Word afterwards. Otherwise, all new changes will land in the .HTM version of the document.

Now we have on disk both the .DOC and the .HTM versions of the document. In addition, we also have all the exported pictures.

The problem with this .HTM content is that it contains a lot of styles and other markup information that does not work very well with SDN. What we would like to do is strip the file down to an absolute minimum of HTML without any style information.

The first time I did this was by hand. It took a few hours. Thereafter, I developed a small program in a well-chosen language to do this work quickly. (Just so that there are no disappointments among all NetWeaver hackers, ABAP is still alive and in use by a few of us!)

Just download the program, paste it into SE38 and run it quickly. (For SAP internal users, the program is available on our sandbox system B6M under the name SDN_DOC_TO_HTML.) One small warning: this program is the result of only one weekend of tinkering. It works for me, but there are no guarantees. Feel free to adapt it to your requirements. If you should sell it, send my share of the profits to my manager!

The program asks for the SDN weblog user number. This will be used to generate URLs that already point directly into SDN. If the field is left empty, the pictures will be loaded directly from disk.

What the program does is to load the HTM file from disk, strip it down, and write it under a new name. The new name consists of only the camels in the CamelCase name! For example, from the title of this document “The-123-Steps-To-Producing-A-Weblog” the short name “T123STPAW” will be constructed. The new .HTM file is saved. In addition, only the used images are copied over and supplied with new names. This is important, as image names must be unique, and using image001 as the name will cause problems when the second weblog is published. (There will be a second weblog!)

The final step in publishing the Weblog, is just to upload all of this quickly. When you registered as a blogger, you received an URL that is to be used for creating new weblogs.

Just select the Create option. Enter the title of the Weblog, select a category and type in a small description. Finally load the converted text into Notepad (from the short named HTML file) and paste it into the Text editor. Leave the status at draft. Submit the Weblog.

The last step is to quickly upload all the images. Just select the Upload option. Each image is selected and submitted. Only upload the images that the conversion program has changed the names of. For this example, I uploaded all the T123STPAW_nnn.* files.

One small warning: The names of the images are case sensitive! The name format used in the document must match exactly the name format used for uploading. The conversion program will do this correctly.

As the final step, list your draft Weblogs, quickly check that everything is fine, and Mark as Final. Your first Weblog is done!

In Summary

See also the interesting Weblog from Mark: Weblog formatting Tips and Tricks

Even although this step-by-step description is slightly long, it is only because of the detailed description. These few steps always take less than fifteen minutes!

  • Write using Word and a few selected sdn_* paragraph classes. Use images as they add spice. Just crop them to maximum 600x400 pixels.
  • Proof read!
  • Save, Save as Web Page and then Exit!
  • Run conversion program
  • Paste text into SDN and upload pictures.

That is all there is to it. Although this weblog has contained no technical information, I do hope that it has taken away any last reservations about blogging! It is simple and immense fun!

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Thomas Jung
    I found the ABAP program for formatting the Weblogs very useful.  I just saved a ton of time on the latest weblog I wrote by using this program.  Thanks!
    (0) 
  2. Lutz Morrien
    Thank you for this brilliant blog,
    I am currently using Microsoft Frontpage to write on (since it automatically generates Html in the background). However, I think that it does lack the more important part you mentioned, the word correction. It is hard enough to get your ideas out and in the computer anyway.

    The vast useage of sensful images (like in this weblog) makes difficult matters much easier to understand. I will try doing the same in my weblogs.

    Lutz Morrien

    (0) 
  3. Dagfinn Parnas
    I actually just use the web interface, but as you say, it does require that you know some hmtl. But generally all you need to know is the elements h3, h4, a, b, and maybe textarea for code examples.

    I most admit though, that I some times use an external spelling tool as I sorely need this.

    (0) 
  4. John Cyrus, PMP
    Hi

    I liked the blog. I compiled the code. Just a couple of issues. The following methods dont exist in my system:

    cl_gui_frontend_services=>gui_upload
    cl_gui_frontend_services=>gui_download
    cl_gui_frontend_services=>file_ copy

    Any ideas ?

    Thanks John C

    (0) 
    1. Marilyn Pratt
      Hi John,
      Which R/3 version are you working with?  Do you have access to classes and ABAP Objects? If not,  I’m thinking that you could probably use function modules for gui_download and gui_upload to achieve the same goals as the methods.
      cheers,
      Marilyn
      (0) 
    2. Brian McKellar Post author
      The cl_gui_frontend_services=>gui_upload/download methods are just wrappers around CALL FUNCTION ‘GUI_UPLOAD’ / ‘GUI_DOWNLOAD’ ABAP code. You could consider to use the functions directly.
      (0) 
  5. Brad Williams
    Hi Brian,

    When I run the supplied ABAP program on an ECC 5.0 Unicode system I just get corrupted results.  It seems that reading in binary mode on a Unicode system restricts your ability to subsequently perform strong manipulation on the populated internal table (although you can upload and then download a file in binary mode without performing changes without corruption). 

    I made the following changes to the program to get it to work on my system:

    ** In Upload file subroutine
    .
    .
      CALL METHOD
        cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename     = filename
          filetype     = ‘ASC’      ** Changed from BIN
          read_by_line = ‘X’
        CHANGING
          data_tab     = content.   ” Changed from data_tab

    ** Also commented out the loop..endloop and split commands following the gui_upload.

    Cheers,

    Brad

    (0) 
    1. Community User
      Over the time since this blog was writing many of the custom formatting and styles have all been removed from the blog system as people got carried away and many a blog ended up not fitting into “frame” of the site anymore.

      The best option you have is to attempt the limited use of the style tag for the particular table cells.

      Sorry about that we are working to make life easier for everyone just a little more time.

      (0) 
  6. Bjorn-Henrik Zink
    Hi,

    clicking on the link “download the program” results in “403 The requested operation is forbidden for this resource. You do not have the permissions required to access this resource”

    I had no problem accessing the .DOT template.

    /Elvez

    (0) 
  7. Aditya Palekar
    Hi Brian,

    When I click on the “my template” link I downloaded a word document, but it doesn’t seem to contain the paragraph formats mentioned like sdn_normal, etc.

    When I open the word document, I see a message saying

    “This file contains example source code for the weblog:
    ”  The 1-2-3 Steps to Producing a Weblog
    ”  The 1-2-3 Steps To Producing a Weblog

    “Please refer to the weblog for details on how to apply this sample code.

    Please help

    Regards,
    Aditya

    Regards,
    Aditya

    (0) 

Leave a Reply