cancel
Showing results for 
Search instead for 
Did you mean: 

Filter table tree

TomVanDoo
Active Contributor
0 Kudos

Hello,

I've been playing with trees in WDA and i've come across some problems.

I must be able to display a tree based on a recursive node. So I use a table with a mastercolumn of type TreeByNestingTableColumn.

all good all happy.

But I also want to be able to filter the darn thing.

So I implement the OnFilter action of the table in which I dispatch to the table method handler, create the filtering node and set the filtering values.

In any normal plain table this works like a charm. I believe it even works in a TreeByKeyTableColumn case [update: it doesn't! Same problem there], but in my particular case with the recursive node, the filtering dumps on an assertion.

What happens is, that during the filtering, the fixed_row_count (actually at that point it's called row_count) is set to the amount of filtered lines.

Later on, during rendering a check is done that the fixed_row_count must be set to -1 (sap standard) because apparently a tree isn't allowed to have fixed rows. the whole thing dumps at that point (assert something = -1)

Is this intended behaviour from SAP standard, or am I missing a step?

Maybe I need to call an extra method or something...?

and on a sidenote, is there a standard function or method that I can use to export the table contents to excel?

Thanks in advance,

Tom

Edited by: Tom Van Doorslaer on Sep 1, 2008 5:43 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Tom,

How did you solve the problem? I am facing the same trouble.

Best Regards,

Guo Guo Qing

TomVanDoo
Active Contributor
0 Kudos

As far as I know, there is no fix to this problem. Filtering a tree type table is not possible (at least not in the version I was on (NW 2004s) )

maybe it's possible in later version

I think I fixed it by building my own filtering algorithm, but can't remember... (2008)

TomVanDoo
Active Contributor
0 Kudos

Dump extract:

What happened?

In the running application program, the ASSERT statement recognize

situation that should not have occurred.

The runtime error was triggered for one of these reasons:

- For the checkpoint group specified with the ASSERT statement, th

activation mode is set to "abort".

- Via a system variant, the activation mode is globally set to "ab

for checkpoint groups in this system.

- The activation mode is set to "abort" on program level.

- The ASSERT statement is not assigned to any checkpoint group.

Error analysis

The following checkpoint group was used: "No checkpoint group specified

If in the ASSERT statement the addition FIELDS was used, you can find

the content of the first 8 specified fields in the following overview:

" (not used) "

" (not used) "

code extract:

60

61 when cl_wd_tree_by_nst_table_col=>cid_tree_by_nst_table_col.

62 nst_table_col ?= m_wd_row_arrangement.

63

64 " TableTreeByNesting does not accept a fixed row count

> assert m_fixed_row_count = c_no_fixed_row_count.

66

67 concatenate m_data_source_path_name '.' into match_path.

68 len = strlen( match_path ).

Active Calls/Events

No. Ty. Program Include Line

Name

19 METHOD CL_WDR_TABLE_DATA_PROVIDER====CP CL_WDR_TABLE_DATA_PROVIDER====CM001 6

CL_WDR_TABLE_DATA_PROVIDER=>GET_TABLE_DATA

18 METHOD CL_WDR_TABLE_DATA_PROVIDER====CP CL_WDR_TABLE_DATA_PROVIDER====CM008 1

CL_WDR_TABLE_DATA_PROVIDER=>GET_VISIBLE_TABLE_DATA

17 METHOD /1WDA/L3STANDARD==============CP /1WDA/L3STANDARD==============CCIMP 89

CL_TABLE=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT

16 METHOD /1WDA/L8STANDARD==============CP /1WDA/L8STANDARD==============CCIMP 34

CL_FLOW_LAYOUT_ITEM=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT

15 METHOD /1WDA/L8STANDARD==============CP /1WDA/L8STANDARD==============CCIMP 16

CL_FLOW_LAYOUT=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT

14 METHOD /1WDA/L7STANDARD==============CP /1WDA/L7STANDARD==============CCIMP 58

CL_TRANSPARENT_CONTAINER=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT

13 METHOD CL_WDR_INTERNAL_WINDOW_ADAPTERCP CL_WDR_INTERNAL_WINDOW_ADAPTERCM007 6

CL_WDR_INTERNAL_WINDOW_ADAPTER=>CONV_VIEW_INTO_VE_ADAPTER_TREE

ME->M_FIXED_ROW_COUNT

1

0000

0001

ME->C_NO_FIXED_ROW_COUNT

-1

FFFF

FFFF

Edited by: Tom Van Doorslaer on Sep 2, 2008 8:34 AM

Edited by: Tom Van Doorslaer on Sep 2, 2008 8:35 AM

Former Member
0 Kudos

Can u post the whole dump which you are getting. Because i have done the Table with tree with the recursive nodes..