on 02-11-2008 8:38 AM
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.
have you included this Web Template as an object in another WAD???
Then I think you need to assign a dataprovider to the Web Item.
Once you do this then along with other code you can also see the following code.
<param name="DATA_PROVIDER" value="DP"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in general, if you inherit from an item of SAP you need to copy all Parameters of RSRRENDERERATR of that specific item to your item.
Because, when SAP creates the instance of your item it will call SET_ITEM method of you base class. When this class references Objects whoich could not be initialized due to missing parameters you will get this error. If you would like to create an item without relation to a dataprovider you should inherit from Class CL_RSR_WWW_ITEM and override methods Set_item and Render_data or Render.
Also make sure that you base class also needs no dataprovider binding.
best regards,
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I don't need to assign a dataprovider, because in the table RSRRENDER, I haven't put true for the field 'WITH_DATABIND'. (Anyway I can't specified an infoprovider in webitem properties)
My webtemplate is very simple, I just have put (by drag and drop) my webitem in a new webtemplate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.