Skip to Content
0
Former Member
Feb 11, 2008 at 08:38 AM

Problem with my first WebItem creation

19 Views

Hello,

I'm trying to create a new webItem, but I have some problem. I have created one row in RSRRENDERER table :

REN NAME : ZCL_WWW_LAYOUT

REN CLASS : GRID

POSN : 0

blank for other fields of the row.

In the RSRRENDERERATR table :

REN NAME : ZCL_WWW_LAYOUT

ATR NAME : NAME

ATR TYP : RENDERER

CHR MAX LEN : 0

VALUE : ZCL_WWW_LAYOUT

POSN : 0

CAPTION : caption

DESCRIPTION : description

blank for other fields of the row.

I'm have created a new class ZCL_WWW_LAYOUT (super class: CL_RSR_WWW_ITEM_TEXT_ELEMENTS) and I have redefined public method RENDER with this code :

method RENDER.
CALL METHOD SUPER->RENDER
  EXPORTING
    I_R_PARAMETER        = i_r_parameter
    I_NO_SNIPPET_MARKERS = i_no_snippet_markers
  EXCEPTIONS
    X_MESSAGE            = 1
    NO_PROCESSING        = 2
    NO_SNIPPET_POSSIBLE  = 3
    others               = 4
        .

n_sx_output-string = '<h1>Hello World</h1>'.

endmethod.

In the WAD, i have created a webtemplate with this code :

...
<P><object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="WEBITEM_1"/>
         <param name="ITEM_CLASS" value="ZCL_WWW_LAYOUT"/>
         <param name="CAPTION" value="test webitem"/>
         <param name="GENERATE_LINKS" value=""/>
         <param name="CLOSED" value="X"/>
         ITEM:            WEBITEM_1
</object></P>
...

And when I lunch my webtemplate I've got an error (not very explicit !) ...

Messages: 
 Error loading item WEBITEM_1. 

What is the step I have forgetten in the creation of my webitem ?

Thanks for your help,

GC.