cancel
Showing results for 
Search instead for 
Did you mean: 

"ASSERT Condition" Error

Former Member
0 Kudos

Hi,

In my earlier thread, had mentioned about developing an application with 2 views, view1 and view2. This was working fine. After this I added a pop-up attribute in view2 ref to IF_WD_WINDOW. Also added an action OK in view2. Didnt write any further code.

Now when I execute the application by clicking on a button view1, I find that the application gives an error:

The ASSERT condition was violated.

I removed the popup attribute and the OK action. But still getting the same error.

What does this error mean and how do we rectify it.

Please help.

Mick

View Entire Topic
Former Member
0 Kudos

Hi, Mick,

I had yesterday the same problem as yours: assert condition is violated.

Besides the cardinality, you should check the data type that you used to map the context node or attribute. According to what I found in internet, this error is caused by the populated value to context node or attribute.

For example, in my own case: the inputfield UI binds to a data element. The error shows up when the data element is defined as NUMC(2). When I changed it to Char(2), the error disappears.

I hope this can help you.

Best regards,

Fan

Former Member
0 Kudos

The probelm of the ASSERT error is solved. Dont exactly know what was the problem.But deleted the table in the view and then added it again. It worked.

However I have a new issue now. To the table I have added input fields. Therefore each cell of the table is an input field. However when the view is displayed, the cells of the tables are not editable, ie the user cannot enter any value in the cells.

How do we rectify this problem?

Mick

pranav_nagpal2
Contributor
0 Kudos

Hi Mick,

Only adding input fields in table cells wont make them editable you have to initialize it as well.. here is a sample code for same........

DATA lo_nd_cn_table TYPE REF TO if_wd_context_node.
DATA lt_table TYPE wd_this->elements_cn_table.
DATA ls_table TYPE wd_this->element_cn_table.


lo_nd_cn_table = wd_context->get_child_node( name = wd_this->wdctx_cn_table ).

do 5 times.
clear ls-table.
append ls_table to lt_table.
enddo.

lo_nd_cn_table->bind_table( lt_table ).

this code will make file rows editable...

regards

Pranav

Former Member
0 Kudos

Thanks Pranav. This solved the problem. Points awarded.

pranav_nagpal2
Contributor
0 Kudos

Welcome