cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Dump while changing property of the cell

Former Member
0 Kudos

Hello I am getting a dump The ASSERT condition was violated when I am trying to change the property of a cell

below is my code can you pls let me know where I am going wrong

My situation is when, in my table I have a dropdown, when the user select 973 from the dropdown the column AUFNR should become read only.

I tried in the code in beforeaction and modifyview but I am getting the same dump. Lead selection is marked.

RETURN_NODE is the table which I have declared in component controller.

DATA : context_node TYPE REF TO if_wd_context_node,

context_element TYPE REF TO if_wd_context_element.

DATA : t_itab TYPE STANDARD TABLE OF wd_this->element_return_node,

w_itab TYPE wd_this->element_return_node.

DATA : wd_prop TYPE wdr_context_properties.

context_node = wd_context->get_child_node( 'RETURN_NODE' ).

context_node->get_static_attributes_table( IMPORTING table = t_itab ).

LOOP AT t_itab INTO w_itab.

IF w_itab-bwart = '973'.

context_element = context_node->get_element( ).

  • EXPORTING

    • index = sy-tabix

  • RECEIVING

  • node_element = .

  • CALL METHOD context_element->get_attribute_properties

  • EXPORTING

  • attribute_name = 'AUFNR'

  • RECEIVING

  • properties = wd_prop.

CALL METHOD context_element->set_attribute_property

EXPORTING

attribute_name = 'AUFNR'

property = '3'

value = 'X'.

ENDIF.

ENDLOOP.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member199125
Active Contributor
0 Kudos

Hi

that just means an error occured and the real cause/condition could be anything. Is there a short dump (ST22)? If so please post more of the details. Generally if you look at the place in the code where the ASSERT occurs you can find the condition that was checked

otherwise try by reactivating the component. ( close the app and reopen )

Regards

Srinivas

Former Member
0 Kudos

in ST22 its like

In the running application program, the ASSERT statement recognized a

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, the

activation mode is set to "abort".

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

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.

Probably the only way to eliminate the error is to correct the program.

-

If the error occures in a non-modified SAP program, you may be able to

find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following

keywords:

"ASSERTION_FAILED" " "

"CL_SALV_WD_SERVICE_MANAGER====CP" or "CL_SALV_WD_SERVICE_MANAGER====CM009"

"EXECUTE"

If you cannot solve the problem yourself and want to send an error

notification to SAP, include the following information:

1. The description of the current problem (short dump)

To save the description, choose "System->List->Save->Local File

(Unconverted)".

is the code which I have written the right way to make a alv cell read only...!!!!!!!!!!!!

Former Member
0 Kudos

Hello,

i googled about changing cell contents to enable and disable a particular cell of the alv what came across is get the columns and then loop on your internal table. if you come across the condition where you want enable or disable then loop on the columns table and then using some input interface type you can enable and disable it.

is there any simpler way to modify alv cell input/output ?

former_member199125
Active Contributor
0 Kudos

hi amit,

in st22 go down that page, you will find one arrow like >>>> before one line of your program code. That is the line it is throwing exception. So please check and let me know exact line where error occurs. Please find the arrow.

Regards

Srinivas