Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
craigcmehil
Community Manager
Community Manager
0 Kudos

Building your views



This brings us to our Views. Views are basically HTML documents that display variables, nothing more nothing less, although you can include some ABAP code like in normal Pages with Flow Logic.

As you recall in the DO_REQUEST of each controller we told it to create a view and we gave the htm file. We now will create those files.

So jump down into your application and choose "create", "page". You can go ahead create each of those pages, once in place we can go back through and add in our code and attributes.

Pages
  • faq.htm
  • info/intro.htm
  • obj/cat.htm
  • obj/index.htm
  • obj/sdn.htm
  • obj/sdnlinks.htm
  • obj/subject.htm
One major difference these pages have to those we created in the first series is that they have no type definitions or event handlers, that is all handled in the controllers. Here have our Attributes and our Page Layout.

Now the Attributes must correspond to those we defined in the controller, the ones that we gave to the "default_view" in our DO_REQUEST method.

faq.htm

lv_tabTypeSTRING

info/intro.htm

N/A

obj/cat.htm

IteratorType Ref ToIF_HTMLB_TABLEVIEW_ITERATOR
lv_dataTypeZFAQCATTAB
lv_descTypeSTRING
lv_editTypeCHAR1
lv_idTypeSTRING
lv_nameTypeSTRING
lv_srcTypeSTRING
sriTypeI

obj/subject.htm

IteratorType Ref ToIF_HTMLB_TABLEVIEW_ITERATOR
lv_dataTypeZFAQSUBJECTTAB
lv_descTypeSTRING
lv_editTypeCHAR1
lv_idTypeSTRING
lv_nameTypeSTRING
sriTypeI

obj/sdnlinks.htm

IteratorType Ref ToIF_HTMLB_TABLEVIEW_ITERATOR
lv_dataTypeZFAQSDNRSSLINKTAB
lv_linkTypeSTRING
lv_editTypeCHAR1
lv_idTypeSTRING
lv_nameTypeSTRING
sriTypeI

obj/sdn.htm

IteratorType Ref ToIF_HTMLB_TABLEVIEW_ITERATOR
lv_dataTypeZFAQSDNRSSTAB
sdnlinksTypeZFAQSDNRSSLINKTAB
selectedTypeSTRING
sriTypeI

obj/index.htm

IteratorType Ref ToIF_HTMLB_TABLEVIEW_ITERATOR
lv_authorTYPESTRING
lv_catTYPESTRING
lv_cat_idTYPESTRING
lv_dataTYPEZFAQFAQTAB
lv_editTYPECHAR1
lv_IDTYPESTRING
lv_long_descTYPESTRING
lv_ratingTYPESTRING
lv_rating_imageTYPESTRING
lv_short_descTYPESTRING
lv_subjectTYPESTRING
lv_subject_idTYPESTRING
lv_table_catTYPEZFAQCATTAB
lv_table_subjectTYPEZFAQSUBJECTTAB
lv_titleTYPESTRING
lv_urlTYPESTRING
lv_visibleTYPESTRING
sriTYPEI

Now that we have our Attributes in place we can freely put our page layouts in.