cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ALV-Table: attruibut not found

gerd_hotz
Contributor
0 Kudos

Hello experts,

I've created an input-view with an alv-table as output list.

I've mapped the alv-table called 'daten' with the component controller 'daten'.

Check is ok, but when I start the application I get shortdump:

attribut 'daten' not found.

Method: IF_WD_CONTEXT_NODE_INFO~GET_ATTRIBUTE of program CL_WDR_CONTEXT_NODE_INFO======CP

Method: IF_WD_CONTEXT_ELEMENT~GET_ATTRIBUTE of program CL_WDR_CONTEXT_ELEMENT========CP

Method: GET_ATTRIBUTE_INTERNAL of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP

Has anybody an idea what this could be ?

Thanks

Gerd

Accepted Solutions (0)

Answers (4)

Answers (4)

gerd_hotz
Contributor
0 Kudos

Hi,

problem is solved !!!!!!!

For using an alv I do not need a additional table in the view, the alv - viewcontainerelement

does map this structure automatically.

SOLVED !

CLOSED !

gerd_hotz
Contributor
0 Kudos

Here the code where the error exists:

1 method if_wd_context_node_info~get_attribute .

2 data:

3 rtti type ref to cl_abap_typedescr.

4 field-symbols: <attr_info> type wdr_context_attribute_info.

5

6 if me->attributes is initial.

7 me->map_node_info( ).

8 endif.

9

10 read table me->attributes->* into attribute_info with table key name = name.

11 if sy-subrc <> 0.

12 if me->_all_attributes_read = abap_false.

13 getall_attributes( ).

14 read table me->attributes->* into attribute_info with table key name = name.

15 if sy-subrc <> 0.

>>> raise exception type cx_wd_context exporting textid = cx_wd_context=>attrib

17 endif.

18 else.

19 raise exception type cx_wd_context exporting textid = cx_wd_context=>attribut

20 endif.

21 endif.

22

23 if attribute_info-rtti is initial.

24 data: attr_ref type ref to wdr_context_attribute_info.

25 attr_ref = me->_get_attribute_rtti(

26 attr_name = name

27 ).

28 if attr_ref is not bound.

29 raise exception type cx_wd_context exporting textid = cx_wd_context=>no_valid

30 endif.

31 attribute_info = attr_ref->*.

32 endif.

33

34 endmethod.

Regards

Gerd

gerd_hotz
Contributor
0 Kudos

Hi,

this is all code I've yet written:

METHOD wddoinit .

  • data lr_node type ref to if_wd_context_node.

  • Data lt_el_datensaetze type wdr_context_element_set.

*

  • lr_node = wd_context->get_child_node( 'DATENSAETZE' ).

  • lt_el_datensaetze = lr_node->get_elements( ).

**************************************************************

DATA: ls_smot005t TYPE smot005t,

lt_smot005t TYPE TABLE OF smot005t.

DATA lo_nd_laender TYPE REF TO if_wd_context_node.

  • navigate from <CONTEXT> to <OPPORTUNITY_STATUS> via lead selection

lo_nd_laender = wd_context->get_child_node( name =

wd_this->wdctx_laender ).

      • Länderkennzeichen auslesen und an Context übergeben

*----

-


SELECT * FROM smot005t INTO ls_smot005t WHERE spras = 'DE' ORDER BY

landx ASCENDING.

IF sy-subrc = 0.

APPEND ls_smot005t TO lt_smot005t.

ENDIF.

ENDSELECT.

lo_nd_laender->bind_table( new_items = lt_smot005t ).

lo_nd_laender->set_lead_selection_index( index = 40 ).

ENDMETHOD.

BR

Gerd

uday_gubbala2
Active Contributor
0 Kudos

Hi Gerd,

Can you please check in ST22 as to from which line the error is getting triggered from? If its pointing to a line from of your own source code then it would make things much easier to analyse.

Regards,

Uday

Former Member
0 Kudos

Hi, Can you paste your code here... Radhika.