Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Iterator Doubt

Hi Experts,

Now Im studying BSP table Iterator.

For that I used [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.

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-->  class CL_BCM_SDN_ITERATOR implementation.
<!--code-->    endmethod.
<!--code-->    endmethod.
<!--code-->    endmethod.
<!--code-->  endclass.

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

Former Member

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"



You can write the code in above methods.

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

Raja T

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question