cancel
Showing results for 
Search instead for 
Did you mean: 

The ASSERT condition was violated.

Former Member

Hi All,

I have a WD component in which there are 2 views v1 ,v2 . V2 have a view container containing v1 . v1 contains 3 button.On clicking one continue button from v2 another view opens up as pop-up.Now the problem is whenevr i keep a viewcontainer for v1 in the pop-up "The ASSERT condition was violated" is shown while closing the pop-up.Please help.

thnxx in advance.

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

the issue will be regarding different id names which might be mismatching..

check the  id names being given by you in layout and the one in code

0 Kudos

Hi All,

While Executing the web dynpro ABAP ,I got the below short dump as " ASSERTION_FAILED" .

Please help me to sove that issue.

It shows error area in the below code

    >> UCA STANDARD|DROPDOWN_BY_KEY|E_COMBOBOXSELECTIONCHANGE|UCA_HANDLE_EVENT

    check IFUR_NW7_COMBOBOX~ITEMCOUNT > 0.
    read table mv_VALUE_SET transporting no fields with key value = value.
    assert sy-subrc = 0. " sanity check: selected value really existing
    if value is initial.
      " Set default value and isNull if applicant

  element = get_bound_element( WD_DROPDOWN_BY_KEY->bp_SELECTED_KEY ).
  i_update_data->update_attribute(
    view           = WD_DROPDOWN_BY_KEY->view
    element        = element
    value          = VALUE
    is_external    = abap_true
    property_type = 'STRING' "#EC NOTEXT
    attribute_name = WD_DROPDOWN_BY_KEY->bp_SELECTED_KEY->attribute_name
  ).
    else.

  element = get_bound_element( WD_DROPDOWN_BY_KEY->bp_SELECTED_KEY ).
  i_update_data->update_attribute(
    view           = WD_DROPDOWN_BY_KEY->view
    element        = element
    value          = VALUE
    is_external    = abap_false
    property_type = 'STRING' "#EC NOTEXT
    attribute_name = WD_DROPDOWN_BY_KEY->bp_SELECTED_KEY->attribute_name
  ).
    endif.
*   >> END_UCA STANDARD|DROPDOWN_BY_KEY|E_COMBOBOXSELECTIONCHANGE|UCA_HANDLE_EVENT
    assert IFUR_NW7_COMBOBOX~ENABLED = abap_true and
           IFUR_NW7_COMBOBOX~READONLY = abap_false.
  concatenate wd_DROPDOWN_BY_KEY->_component->id '.' wd_DROPDOWN_BY_KEY->view->name into view_name. "#EC NOTEXT
  command = wd_DROPDOWN_BY_KEY->get_ON_SELECT( ).
  if command is not initial.
      create object server_event
        exporting
            source           = wd_DROPDOWN_BY_KEY
            command          = command
            type             = if_wd_event=>co_action_event
            view_name        = view_name
            ui_element_id    = wd_DROPDOWN_BY_KEY->id
            ui_element_event = 'ON_SELECT'. "#EC NOTEXT
    wd_DROPDOWN_BY_KEY->mapped_ON_SELECT( importing parameters = _l_event_param_mappings ).
      server_event->add_parameters( _l_event_param_mappings ).
      server_event->set_parameter( name = 'ID' value = wd_DROPDOWN_BY_KEY->id ). "#EC NOTEXT
      server_event->set_parameter( name = 'CONTEXT_ELEMENT' object = m_context_element type = CL_ABAP_TYPEDESCR=>TYPEKIND_OREF ). "#EC NOTEXT

Message was edited by: Surya S

Former Member
0 Kudos

Hi all,

I having the same problem,- the HCM form is displaying a dump

I looked where the call stack is pointing and clicked-

Control block - BREA - source code - CL_HRASR00_DATA_CONTAINER====CM00G

the code

DATA fscnflds TYPE TABLE OF t5asrfscnfld.

DATA values_of_fields TYPE hrasr00_values_of_field_tab.

DATA field_states TYPE hrasr00_field_state_tab.

DATA values_of_fields_wa TYPE hrasr00_values_of_field.

DATA field_states_wa TYPE hrasr00_field_state.

FIELD-SYMBOLS <fscnflds_wa> TYPE t5asrfscnfld.

  • The Data Conatiner can be constructed using xml/content/form scenario

  • Assert more than one of them is not passed

ASSERT

( form_scenario IS NOT INITIAL AND xml IS INITIAL AND data_content IS INITIAL ) OR

( form_scenario IS INITIAL AND xml IS NOT INITIAL AND data_content IS INITIAL ) OR

( form_scenario IS INITIAL AND xml IS INITIAL AND data_content IS NOT INITIAL ).

How should I go about soving this problem

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I hope that everyone on this thread really understands what an ASSERT is. ASSERT is just a way of testing for and producing an error message. Just because two different people get the same message that an ASSERT Condition was violated, doesn't mean that they have anything to do with one another. Its like saying "You got and error message and I got an error message, therefore our problem must be the same". The ASSERT message itself is absolutely meaningless other than to tell you that something went wrong. It is the condition that was being checked that is important. In all three of the cases listed in this thread, the assert conditions were completely different and in different applications. If people try to turn this thread into some general QA for everything that throws an ASSERT, I will Lock it!

Former Member
0 Kudos

hey,

If you have the problem, you have just delete the view and recreate it again, and its wel works.

Former Member
0 Kudos

Hi,

I am also having the same issue - there is no OSS message that relates to this so I am interested to know how you resolved the issue with cardinality?

The crm_ui_frame/WD gives a http-500 error and the associated ST22 dump gives

"ASSERTION_FAILED" " "

"SAPLCRM_ORDER_API" or "LCRM_ORDER_APIU05"

"CRM_ORDER_MAINTAIN"

There is no indication of any custom coding so I assume that this is a SAP bug - any assistance appreciated

Regards

Johno

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi,

> I am also having the same issue - there is no OSS message that relates to this so I am interested to know how you resolved the issue with cardinality?

>

> The crm_ui_frame/WD gives a http-500 error and the associated ST22 dump gives

> "ASSERTION_FAILED" " "

> "SAPLCRM_ORDER_API" or "LCRM_ORDER_APIU05"

> "CRM_ORDER_MAINTAIN"

>

> There is no indication of any custom coding so I assume that this is a SAP bug - any assistance appreciated

>

> Regards

> Johno

Johno, I think you have attached your question to the wrong thread and even the wrong forum. You mention CRM_UI_FRAME. CRMUI is NOT Web Dynpro ABAP. It is a separate development model that this based upon BSP, not Web Dynpro ABAP. Question related to CRMUI do not belong in the Web Dynpro ABAP forum.

Former Member
0 Kudos

thanxx guys...the problem is solved

Former Member
0 Kudos

Hi tubai, can you tell me how you solved the problem? I got the same problem with the navigation between two views.. one contains a tree?? i´ve checked all cardinalities and tried several combinations.. but it doesnt work

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Is there a short dump with the ASSERT Condition message? Check ST22. In the short dump look at the call stack and the lines of code that threw the assert and provide the details back here. This will tell us more about what caused the error. ASSERT Condition by itself is like saying "I got an error, what should I do" You need to know what the error message was at least.

Former Member
0 Kudos

Hi,

I do not know the exact solution for your issue but in general Assert Condition Violation occurs whenever the cardinality of the node mismatches..

Thanks

Mallika

arjun_thakur
Active Contributor
0 Kudos

Hi,

Check the cardinality of the node which is binded with pop up view, set it 0:n. Are you using tree or table UI element in it?

Regards

Arjun

Former Member
0 Kudos

hi Arjun,,

it's still not working. Same error is being shown.In the pop up i am using only input fields

arjun_thakur
Active Contributor
0 Kudos

Hi,

I am not sure why the error is still persisting. Sometimes this type of error gets resolved by re-creating the view. May be you can give it a try....

Regards

Arjun