cancel
Showing results for 
Search instead for 
Did you mean: 

very Urgent How to call view[Ex abc.htm] from controller do_handle_event.

0 Kudos

Hi ,

I have a view file like abc.htm. I have an method in do_handle_event(method -_maintain).If i click this button event method , i want to call the abc.htm view . am getting the error.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

would you please post more details or some code snippets.

Regards.

0 Kudos

Hi,

I have a view like popupdiaply.htm

Popupdiaplay.htm

=============

<%@page language="abap"%>

<%@extension name="bsp" prefix="bsp" %>

<%@extension name="htmlb" prefix="htmlb" %>

<%@page language="abap"%>

<%@extension name="bsp" prefix="bsp" %>

<%@extension name="htmlb" prefix="htmlb" %>

<htmlb:content design = "design2002+design2003"

rtlAutoSwitch = "true"

forceEncode = "ENABLED" >

<htmlb:page title = "BSP Extension: HTMLB / Element: tableView">

<htmlb:textView id = "tv2"

text = "<b>Here you can edit or maintain your own entries.If you Click 'Confirm'option, your maintained assets will be saved.If you Click 'Cancel'option ,your assets are all the same.<b>"

tooltip = "Simple quick info"

encode = "true"

/>

<%

%>

<htmlb:form id='form1'>

<htmlb:group>

<htmlb:groupBody>

<htmlb:tableView

id = "tv1"

columnHeaderVisible = "TRUE"

design = "alternating"

fillUpEmptyRows = "TRUE"

footerVisible = "TRUE"

headerVisible = "TRUE"

table = "<%= t_maintain %>"

iterator = "<%= iterator %>"

visibleRowCount = "<%=CONTROLLER->G_NO_ASSETS%>"

width = "100%"

selectionMode="singleSelect"

filterButtonText = "Go"

filterButtonTooltip = "Filter content"

tableLayout = "AUTO"

/>

<htmlb:button id = "sub1"

onClientClick = "return fun();"

text = "Confirm" />

<htmlb:button id = "sub1"

onClientClick = "return fun();"

text = "Cancel" />

</htmlb:groupBody>

</htmlb:group>

</htmlb:form>

</htmlb:page>

</htmlb:content>

I have acontroller asset_new.do

=======================

In this asset.do main controller page , one button is there like maintain.If i click the maintain button the popupdiaply.htm should call.-->This is my requirement.

I created one method on_event_maintain in the do_handle_event .In this Method i called the popupdiaply.htm.through these code

  • Call popup

call method DISPATCH_INPUT.

DATA: r_view TYPE REF TO if_bsp_page.

r_view = create_view( view_name = 'Popupdisplay.htm' ).

r_view->set_attribute( name = 't_maintain' value = mt_messages ).

call_view( r_view ).

It is giving error..

Former Member
0 Kudos

Hi again,

since your view is called Popupdi<b>a</b>play.htm and not Popupdi<b>s</b>play.htm you should care about the name when you create your view.

r_view = create_view( view_name = 'Popupdi<b>a</b>play.htm' ).

Another thing for your coding is that you should put the snippet


call method DISPATCH_INPUT.

DATA: r_view TYPE REF TO if_bsp_page.

r_view = create_view( view_name = 'Popupdisplay.htm' ).
r_view->set_attribute( name = 't_maintain' value = mt_messages ).
call_view( r_view ).

to do_request not to do_finish_input.

Regards,

Sebastian

0 Kudos

Hai ,

I have given the correct view name only. It was typing mistake..

Even if i write the code in Do_request or do_handle_event like

call method DISPATCH_INPUT.

DATA: r_view TYPE REF TO if_bsp_page.

r_view = create_view( view_name = 'Popupdisplay.htm' ).

r_view->set_attribute( name = 't_maintain' value = mt_messages ).

call_view( r_view ).

I am getting the error like

"call of BSP page terminated due to error..

Note:

Following error text processed in system."

I could not able to call this view from controller class. I entered the this code do_request also and do_handle_event also.. Same error i am getting ,Please help me.. last 4 days i was in prob. In this week i need to submit this object.

Is there any other way ?? please let me know immediately

raja_thangamani
Active Contributor
0 Kudos

Do you have auto variable in your view 't_maintain'?

Check the below step by step MVC document..

<a href="http://www.sapdevelopment.co.uk/webapps/bsp/mvc_example1.htm">Step by Step MVC</a>

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

Raja T

Answers (0)