Skip to Content
0
Jan 14, 2008 at 05:18 AM

Need help on a TABLEVIEW ITERATOR - CONSTRUCTOR method (Ref :Brians Blog)

23 Views

Hello:

I was creating a tableview iterator by following the instructions given in the blog written by Brian.

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

I dont have much experience on SE24 ie creating classes. I'm learning along with the BSP. I have a difficulty in the below step while creating the CONSTRUCTOR. I have purchased his book "Adv BSP Programming" but here too I didnt find the steps to complete the CONSTRUCTOR method.

I have seen many people in this form who have done many Iterators. One of you should be able to help me. This might be simple...but I'm sorry..I'm caught here!! The issue I have is in below section.

"For currency, we are again only interested in handling the Edit mode. For this, we want to render a dropdown listbox. There are a number of techniques to fill the data. For this test, we created a name/value table (type TIHTTPNVP) in the class constructor, and already filled it with the currencies that we support. A reference to this table is stored in m_currencies_ref (ABAP statement “GET REFERENCE OF var INTO ref”)."

What I did was :

In se24...after creating IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS

IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START

IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START,

I added the code as given in the blog. They all work fine.

BUT for constructors...the instructions didnt help me.

I clicked the CONSTRUCTOR icon and I have got:

method CONSTRUCTOR .

endmethod.

I'm not sure what do I write here. I can create a internal table

like t_TIHTTPNVP and fill it with some currencies. But not sure where to declare the table? Also where do I apply this " A reference to this table is stored in m_currencies_ref (ABAP statement “GET REFERENCE OF var INTO ref”)."

Could someone help me clearly what I need to do here, this will solve my problem and I will be doing my FIRST table view Iterator!!

PLEASE ADVISE.

Appreciate your help!

Regards

PK