Skip to Content

BSP / HowTo: Exploring BSP Development and the MiniWAS 6.20 Part 2

** [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 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
You must be Logged on to comment or reply to a post.
  • 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

    • 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?
          • 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

          • 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.

          • 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!!


    • 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.

  • 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.

    The lin type of table “BLOGS” is not compatible with field symbol

    any idea on how to get past those ?