on 07-11-2008 10:11 PM
Hi Friends,
I am getting error when i try to execute the code. please let me know what should i do to solve it. The error is:
Method ONACTIONACTION_FIND
The type "ELEM_NODE_ALV" is unknown, but there are the following types with similar names: "ELEMENT_NODE_VBAK" and "ELEMENTS_NODE_VBAK" . . .
AND THE CODE IS:
method ONACTIONACTION_FIND .
DATA: node_node_vbak TYPE REF TO if_wd_context_node,
elem_node_vbak TYPE REF TO if_wd_context_element,
stru_node_vbak TYPE if_input_view=>element_node_vbak .
navigate from <CONTEXT> to <NODE_VBAK> via lead selection
node_node_vbak = wd_context->get_child_node( name = if_input_view=>wdctx_node_vbak ).
get element via lead selection
elem_node_vbak = node_node_vbak->get_element( ).
get all declared attributes
elem_node_vbak->get_static_attributes(
IMPORTING
static_attributes = stru_node_vbak ).
DATA: ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_vbak TYPE STANDARD TABLE OF vbak.
create where condition
IF NOT stru_node_vbak-vbeln EQ ''.
CONCATENATE 'VBELN = ''' stru_node_vbak-vbeln '''' INTO ls_where.
APPEND ls_where TO lt_where.
ENDIF.
IF NOT stru_node_vbak-erdat EQ '00000000'.
CONCATENATE 'ERDAT = ''' stru_node_vbak-erdat '''' INTO ls_where.
IF stru_node_vbak-vbeln NE ''.
CONCATENATE 'AND' ls_where INTO ls_where SEPARATED BY space.
ENDIF.
APPEND ls_where TO lt_where.
ENDIF.
SELECT VBELN ERDAT ERZET ERNAM ANGDT BNDDT AUDAT VBTYP TRVOG AUART AUGRU GWLDT SUBMI LIFSK FAKSK NETWR WAERK VKORG VTWEG SPART
VKGRP VKBUR GSBER GSKST GUEBG GUEEN FROM vbak INTO TABLE lt_vbak WHERE (lt_where).
DATA: node_node_alv TYPE REF TO if_wd_context_node,
elem_node_alv TYPE REF TO if_wd_context_element,
stru_node_alv TYPE if_input_view=>elem_node_alv .
navigate from <CONTEXT> to <NODE_ALV> via lead selection
node_node_alv = wd_context->get_child_node( name = if_input_view=>wdctx_node_alv ).
get all declared attributes
node_node_alv->bind_table( lt_vbak ).
endmethod.
Thanks !!!
Hi
Replace the statemnet
stru_node_alv TYPE if_input_view=>elem_node_alv .
with
stru_node_alv TYPE if_input_view=>element_node_alv .
It seems you have a context node NODE_ALV. So system will create as element_node_alv.
Regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks for your reply. i did the change you asked me but now its giving me the error:
Method ONACTIONACTION_FIND
The type "ELEMENT_NODE_ALV" is unknown, but there are the following types with similar names: "ELEMENT_NODE_VBAK" and "ELEMENTS_NODE_VBAK"
AND THE CODE AFTER CHANGES IS:
method ONACTIONACTION_FIND .
DATA: node_node_vbak TYPE REF TO if_wd_context_node,
elem_node_vbak TYPE REF TO if_wd_context_element,
stru_node_vbak TYPE if_input_view=>element_node_vbak .
navigate from <CONTEXT> to <NODE_VBAK> via lead selection
node_node_vbak = wd_context->get_child_node( name = if_input_view=>wdctx_node_vbak ).
get element via lead selection
elem_node_vbak = node_node_vbak->get_element( ).
get all declared attributes
elem_node_vbak->get_static_attributes(
IMPORTING
static_attributes = stru_node_vbak ).
DATA: ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_vbak TYPE STANDARD TABLE OF vbak.
create where condition
IF NOT stru_node_vbak-vbeln EQ ''.
CONCATENATE 'VBELN = ''' stru_node_vbak-vbeln '''' INTO ls_where.
APPEND ls_where TO lt_where.
ENDIF.
IF NOT stru_node_vbak-erdat EQ '00000000'.
CONCATENATE 'ERDAT = ''' stru_node_vbak-erdat '''' INTO ls_where.
IF stru_node_vbak-vbeln NE ''.
CONCATENATE 'AND' ls_where INTO ls_where SEPARATED BY space.
ENDIF.
APPEND ls_where TO lt_where.
ENDIF.
SELECT VBELN ERDAT ERZET ERNAM ANGDT BNDDT AUDAT VBTYP TRVOG AUART AUGRU GWLDT SUBMI LIFSK FAKSK NETWR WAERK VKORG VTWEG SPART
VKGRP VKBUR GSBER GSKST GUEBG GUEEN FROM vbak INTO TABLE lt_vbak WHERE (lt_where).
DATA:
node_node_alv TYPE REF TO if_wd_context_node,
element_node_alv TYPE REF TO if_wd_context_element,
stru_node_alv TYPE if_input_view=>element_node_alv .
navigate from <CONTEXT> to <NODE_ALV> via lead selection
node_node_alv = wd_context->get_child_node( name = if_input_view=>wdctx_node_alv ).
get all declared attributes
node_node_alv->bind_table( lt_vbak ).
Endmethod.
Thanks
Hi Aditya
if you have the node named NODE_ALV in the view where you are coding this method, just replace your statement
stru_node_alv TYPE if_input_view=>elem_node_alv .
with
DATA stru_node_alv TYPE wd_this->element_node_alv.
You can make use of wd code wizard(ctr+f7) to avoid these kind of errors.
Best Regards
Karthick Gopi
Edited by: KARTHICK GOPI on Mar 24, 2010 12:01 PM
Edited by: KARTHICK GOPI on Mar 24, 2010 12:01 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This problem will be solved if you click on your INPUT_VIEW, goto CONTEXT tab and
map the NODE_ALV to context INPUT_VIEW by dragging and dropping the NODE_ALV to the left side CONTEXT.
See the picture to get a better idea.
[Input view error solution|http://img232.imageshack.us/img232/230/inputviewerrorsolution.jpg]
thanks.
- Ashok Kumar
(SAP ABAP)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.