Skip to Content

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

bsp extension element

Hi,

I am working on the bsp extension elements by going through the weblog by Brain McKellar on bsp Extension elements.I am getting this error...

The following error text was processed in the system IGT : An exception that could not be caught occurred.

The error occurred on the application server iga03019b_IGT_00 and in the work process 0 .

The termination type was: RABAX_STATE

The ABAP call stack was:

Form: IF_BSP_ELEMENT~RAISE_ERROR of program CL_BSP_ELEMENT================CP

Form: RAISE_ERROR of program CL_BSP_BEE_XML================CP

Form: IF_BSP_BEE~RENDER of program CL_BSP_BEE_XML================CP

Form: IF_BSP_ELEMENT~DO_AT_END of program CL_BSP_BEE_ELEMENT============CP

Form: ONLAYOUT of program CLO23FIORLV8AVQRVY9ZWXBSG3OSZCP

Form: %_ONLAYOUT of program CL_O23FIORLV8AVQRVY9ZWXBSG3OSZCP

Form: DO_REQUEST of program CL_BSP_PAGE===================CP

Form: ON_REQUEST of program CL_BSP_RUNTIME================CP

Form: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_HTTP_EXT_BSP===============CP

Form: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP

I have written the following code in my application...

In the layout

-


<%@page language="abap"%>

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

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

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

<htmlb:content design="design2002">

<htmlb:page>

<htmlb:form>

<xhtmlb:toolbar id="tbbg1" >

<xhtmlb:toolbarItem>

<xhtmlb:buttonGroup id = "buttons" onClick = "buttonPressed" >

<xhtmlb:buttonGroupItem key = "single" text = "Single" />

<xhtmlb:buttonGroupItem key = "html" text = "HTML" />

<xhtmlb:buttonGroupItem key = "table" text = "Table" />

<xhtmlb:buttonGroupItem key = "xml" text = "XML" />

</xhtmlb:buttonGroup>

</xhtmlb:toolbarItem>

</xhtmlb:toolbar>

<bsp:bee bee = "<%= bee %>" />

</htmlb:form>

</htmlb:page>

</htmlb:content>

In the onInputProcessing

-


url = 'http://www.sap.com'.

DATA: event TYPE REF TO if_htmlb_data,

buttongroup TYPE REF TO cl_xhtmlb_buttongroup.

event = cl_htmlb_manager=>get_event_ex( runtime->server->request ).

IF event IS NOT INITIAL AND event->event_name =

cl_xhtmlb_buttongroup=>co_event_name.

buttongroup ?= event.

CASE buttongroup->buttonclicked.

WHEN 'single'.

DATA: tag_if TYPE REF TO cl_htmlb_inputfield.

tag_if = cl_htmlb_inputfield=>factory( id = 'text' value = text ).

bee = tag_if.

WHEN 'html'.

DATA: bee_html TYPE REF TO cl_bsp_bee_html.

CREATE OBJECT bee_html.

bee_html->add( html1 = `<input name="text" id="text" `

html2 = `title="Inputfield for text" `

html3 = `value="`

html4 = text

html5 = `">`

html6 = `<BR>` ).

bee_html->add( html1 = `<input name="url" id="url" `

html2 = `title="Inputfield for url Disabled" `

html3 = `value="`

html4 = url

html5 = `" `

html6 = `readonly style="background-color:#ABABAB">` ).

bee = bee_html.

WHEN 'table'.

DATA: tag_if_text TYPE REF TO cl_htmlb_inputfield,

tag_if_url TYPE REF TO cl_htmlb_inputfield.

tag_if_text = cl_htmlb_inputfield=>factory( id = 'text' value =

text ).

tag_if_url = cl_htmlb_inputfield=>factory( id = 'url' value = url

disabled = 'TRUE' ).

DATA: tag_gl TYPE REF TO cl_htmlb_gridlayout,

tag_glc_text TYPE REF TO cl_htmlb_gridlayoutcell,

tag_glc_url TYPE REF TO cl_htmlb_gridlayoutcell.

tag_gl = cl_htmlb_gridlayout=>factory( columnSize = '1'

rowSize = '2' ).

tag_glc_text = cl_htmlb_gridlayoutcell=>factory( columnIndex = '1'

rowIndex = '1' ).

tag_glc_url = cl_htmlb_gridlayoutcell=>factory( columnIndex = '1'

rowIndex = '2' ).

DATA: bee_table TYPE REF TO cl_bsp_bee_table.

CREATE OBJECT bee_table.

bee_table->add( level = 1 element = tag_gl ).

bee_table->add( level = 2 element = tag_glc_text ).

bee_table->add( level = 3 element = tag_if_text ).

bee_table->add( level = 2 element = tag_glc_url ).

bee_table->add( level = 3 element = tag_if_url ).

bee = bee_table.

WHEN 'xml'.

DATA: xml_string TYPE STRING.

CONCATENATE '<bee:root>'

' <htmlb:gridLayout columnSize ="1" rowSize ="2"> '

' <htmlb:gridLayoutCell columnIndex="1" rowIndex="1">'

' <htmlb:inputField id ="text" value ="<%=text%>" />'

' </htmlb:gridLayoutCell> '

' <htmlb:gridLayoutCell columnIndex="1" rowIndex="2">'

'<htmlb:inputField id ="url" value ="<%=url%>" disabled = "TRUE"/>'

' </htmlb:gridLayoutCell>'

' </htmlb:gridLayout> '

'</bee:root> '

INTO xml_string SEPARATED BY CL_ABAP_CHAR_UTILITIES=>CR_LF.

DATA: xml_parms TYPE TABLE_BSP_BEE_PARMS.

FIELD-SYMBOLS: <xml_parm> TYPE BSP_BEE_PARM.

INSERT INITIAL LINE INTO TABLE xml_parms ASSIGNING <xml_parm>.

<xml_parm>-name = 'text'.

<xml_parm>-value = text.

INSERT INITIAL LINE INTO TABLE xml_parms ASSIGNING <xml_parm>.

<xml_parm>-name = 'url'.

<xml_parm>-value = url.

DATA: bee_xml TYPE REF TO cl_bsp_bee_xml.

CREATE OBJECT bee_xml.

bee_xml->set( EXPORTING xml = xml_string

parms = xml_parms

IMPORTING xml_errors = xml_errors ).

bee = bee_xml.

ENDCASE.

ENDIF.

IF LINES( xml_errors ) > 0.

DATA: table_ref TYPE REF TO DATA.

GET REFERENCE OF xml_errors INTO table_ref.

bee = CL_HTMLB_TABLEVIEW=>FACTORY( id = 'tview' table = table_ref ).

ENDIF.

page attributes

-


bee TYPE REF TO IF_BSP_BEE

text TYPE STRING (auto fill)

url TYPE STRING (auto fill)

xml_errors type TIXMLTERR

Regards,

Azaz.

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question