cancel
Showing results for 
Search instead for 
Did you mean: 

Iterator Doubt

Former Member
0 Kudos

Hi Experts,

Now Im studying BSP table Iterator.

For that I used https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/213. [original link is broken] [original link is broken] [original link is broken]

From this blog I can't get the Class implementation.

In principle, an HTMLB iterator is any class that implements the interface IF_HTMLB_TABLEVIEW_ITERATOR.

<!--code-->  interface IF_HTMLB_TABLEVIEW_ITERATOR public.
<!--code-->    methods GET_COLUMN_DEFINITIONS ...
<!--code-->    methods RENDER_ROW_START ...
<!--code-->    methods RENDER_CELL_START ...
<!--code-->  endinterface.
<!--code-->  

This interface supports three methods. The column definitions method is called once at the beginning of rendering, to allow an update or complete specification of all column definitions. The row and cell start methods are called at the start of a new row and cell respectively. The complete parameter list will be discussed later.

Let’s complete the last part of our test program. We need an iterator to enable custom rendering of the HTMLB tableView. For this, we use transaction SE24 (or SE80), and create a new class that implements the iterator interface. All methods are implemented initially as empty.

Our iterator class looks like this:

<!--code-->  class CL_BCM_SDN_ITERATOR definition public create public.
<!--code-->    public section.
<!--code-->      interfaces IF_HTMLB_TABLEVIEW_ITERATOR .
<!--code-->  endclass.
<!--code-->   
<!--code-->  class CL_BCM_SDN_ITERATOR implementation.
<!--code-->    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
<!--code-->    endmethod.
<!--code-->    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
<!--code-->    endmethod.
<!--code-->    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START.
<!--code-->    endmethod.
<!--code-->  endclass.
<!--code-->  

<b>I can't get this above code. Like where can write this code. In Event handler or in Class.</b>

In class means how?

I know to create a class and methods. But im confused in this coding?

Please help me,

If I not explain clearly means I will explain again.

Thanks in advance,

Points will be rewarded for all suggestions.

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

Follow the steps:

1. Create the Z class in Tcode SE24

2. Once class created, goto interface TAB, add IF_HTMLB_TABLEVIEW_ITERATOR

3. Now save the class.

4. Now goto Methods TAB where you can see methods "~GET_COLUMN_DEFINITIONS"

~RENDER_ROW_START

~RENDER_CELL_START

You can write the code in above methods.

<b>*Reward each useful answer</b>

Raja T

Answers (0)