Skip to Content
** [Part 1 | BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20] – Introduction and beginning elements, sample data.  ** [Part 2 | BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 2] – Building the CLASSES and ITERATORS.  ** Part 3 – Putting your pages in place. 0.1.   0.2.   {code:html}BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 3a{code}  0.1.  {code:html}BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 3b{code}  0.1. Part 4 – Extended Features  0.1.   0.2.  {code:html}BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 4a{code} 0.1.  {code:html}BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 4b{code}  0.1. [Part 5 | BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 5] – Conclusions     As you’ve seen Part 1  (BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20) gave us the foundation for holding all of our data and even a very simple entry into our category list. Now as we move into Part 2 we will discuss how to handle and display that data.   image   So not to delay the process too much longer here let’s get right down to making our Class.    0.1.   0.2. Step 1: create a new class under ZCSC_FAQ called ZCSC_CL_FAQ  0.3. Step 2: create the inital 4 methods. 0.1.   0.2. GET_CAT_NAME  0.3. GET_FAQ_DATA  0.4. GET_NEXT_DATA_ID  0.5. GET_SDN_WEBLOG_BY_URL    image   0.1.   0.2. Step 3: Set the parameters for our methods.   GET_CAT_NAME image   GET_FAQ_DATA image   GET_NEXT_DATA_ID image   GET_SDN_WEBLOG_BY_URL image   By the way that default value for the URL is http://weblogs.sdn.sap.com/pub/q/weblogs_rss?x-ver=1.0 which is the RSS feed for the Recent Weblogs from SDN. It is also the only default value set. For those of you who are wondering – the parameter types in the graphics don’t show completely but they are +Importing+ and +Returning+.    Now you have your Class, methods and parameters. Let’s get the coding in place.    method GET_CAT_NAME .  SELECT NAME FROM ZFAQ_CAT  INTO value  WHERE ID = id.  ENDSELECT.endmethod.   method GET_FAQ_DATA .  select * from ZFAQ_DATA  into table DATA.endmethod.   method GET_NEXT_DATA_ID .  select max( ID ) into value from ZFAQ_DATA.  value = value + 1.endmethod.   Now some may look at this DATA_ID code and think why did he do it this way not using intervals or something like that. Well no real good reason other than pure choice. Who knows maybe I’ll change this method after we get to the advanced features?? image
To report this post you need to login first.

14 Comments

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

  1. Tiest van Gool
    Craig, I am facing a huge error here. After having defined the various iterators as described above the code in method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START results in the following error:

    The CAST operation (f1!=f2, MOVE f2 ?TO f1) is currently only supported for object references.

    I hav plenty of ABAP experience but I can not figure out how to resolve this issue. Any leads I can use to solve this issue?

    Thanks, Tiest

    (0) 
    1. Craig Cmehil
      Hi Tiest, you’ve got me confused here.  IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START  should only contain m_row_ref ?= p_row_data_ref. ???? Where are you getting the error again?
      (0) 
          1. Tiest van Gool
            Happy New Year and all the best for 2005. Yes this is exactly the error, I am working through the book ‘BSP Extensions: How to master Web reporting with HTMLB’ and exactly the same error occurs. I have patched the MiniWAS to SP47, any idea what could cause the problem? Thanks, Tiest

            By the way, can you also let me know how I can reward you points so everyone gets what he/she ‘deserves.’ Tiest

            (0) 
            1. Craig Cmehil
              To be honest, not sure. Could be a kernel problem? What Kernel level are you?

              Points you’ll have to contact SDN and ask about that, as far as I know you can only give points if you start a message and ask a question.

              (0) 
              1. Ian Stubbings
                Hi Guys

                Was this error ever resolved.  I finally got my system patched up to 47 – it appears the previous hanging at SP38 was due to the database being full.  After extending it all was well!!

                Cheers
                Ia

                (0) 
    2. Michal Bartek
      Had the exact same error.

      When it says ‘create a new attribute called M_ROW_REF and make that of TYPE ZFAQ_DATA ‘, make sure the TYPING is set to ‘Type Ref To’ instead of the default value.  (Make sure you check the attribute M_ROW_REF in both iterators).

      That fixed my compile error.

      (0) 
  2. Sigurður Njarðvík
    Hi
    I’m a total beginner to ABAP , and I’m trying to implement this tutorial on our 6.20 system. However i’m stranded on some syntax erros

    Class ZCSC_CL_FAQ, Method GET_FAQ_DATA (Row 4)
    The work area (or internal table) “DATA is not flat, or contains reference or internal tables as components.

    and
    Class ZCSC_CL_FAQ, Method GET_SDN_WEBLOG_BY_URL (ROW 67)
    The lin type of table “BLOGS” is not compatible with field symbol

    any idea on how to get past those ?

    (0) 
    1. Craig Cmehil
      Never seen these problems before, I would suggest to go through and check the variable assignment TYPE and TYPE REF OF and so forth to be sure that they match up correctly.

      (0) 

Leave a Reply