Skip to Content

HELP - attribute CHANGEABLE if_bol_bo_property_access .

Apr 19 at 11:15 AM


avatar image

lo_entity->set_properties( is_attributes = ls_crmst_vis_bol_str ). no me guarda la estructura nueva porque la propiedad CHANGEABLE y no puedo cambiarlo no encuentro el metodo para hacer el cambio. ayuda


lo_entity-> set_properties (is_attributes = ls_crmst_vis_bol_str). I do not save the new structure because the CHANGEABLE property and I can not change it I can not find the method to make the change. help

METHOD get_cells_name.
    BEGIN OF ty_namefull,
      name_last  TYPE bu_namep_l,
      name_first TYPE bu_namep_f,
    END OF ty_namefull.

    lr_typed_context     TYPE REF TO cl_bsp_wd_context,
    lr_node              TYPE REF TO cl_bsp_wd_context_node,
    lo_result            TYPE REF TO if_bol_bo_col,
    lv_size              TYPE string,
    lo_iterator          TYPE REF TO if_bol_bo_col_iterator,
    lo_entity            TYPE REF TO if_bol_bo_property_access,
    ls_crmst_vis_bol_str TYPE crmst_query_r_act_btil,
    lv_index             TYPE i,
    ls_name              TYPE ty_namefull

*Movemos a puntero auxiliar
  lo_result     ?= lr_result.
*Obtenemos el maximo del Do
  lv_size        = lo_result->size( ).
*inicializamos el index.
  CLEAR lv_index.
*Recorremos todos los elementos para su modificacion.
  lo_iterator   ?= lo_result->get_iterator( ).
*  Recuperamos la linea seleccionada de la vista Resultado
  DO lv_size TIMES.
    IF lv_index IS INITIAL.
      lv_index = 1.
      lv_index = lv_index + 1.
    lo_entity      = lo_iterator->get_by_index( iv_index = lv_index ).

                          es_attributes = ls_crmst_vis_bol_str

    SELECT SINGLE name_last
                    FROM but000
                      INTO ls_name
                        WHERE partner = ls_crmst_vis_bol_str-activity_partner

    IF sy-subrc = 0.

      ls_crmst_vis_bol_str-zznombre    = ls_name-name_first.
      ls_crmst_vis_bol_str-zzapellidos = ls_name-name_last.

      lo_entity->set_properties( is_attributes = ls_crmst_vis_bol_str ).

* Volvemos los valores modificados
  lr_result     ?= lo_result.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Bruno Garcia Apr 19 at 11:35 AM

Hi Tare,

You can try to convert your variable LO_ENTITY to class CL_CRM_BOL_ENTITY and then use the method SWITCH_TO_CHANGE_MODE to make the entity changeable. However, there are attributes that are only meant to be only in display mode, so there's no guarantees that it will work.

Kind regards,

Show 4 Share
10 |10000 characters needed characters left characters exceeded

does not change the attribute so it does not allow the change.

    lo_edit              TYPE REF TO cl_crm_bol_entity,
    lo_entity            TYPE REF TO if_bol_bo_property_access,

      lo_edit ?= lo_entity .

      lo_edit->switch_to_change_mode( )..

                        is_attributes = ls_crmst_vis_bol_str

Hi Tare,

Then most probably that entity type is not meant to be changed. Are you trying to change something inside a WebUI view? If so, you can redefine the GET_* method of desired attributes and do the calculations there.

Kind regards,


thank you end up choosing to do it in the get, and without any problems that the client tries to order by the two columns he does not order them. I understand that the ordering is done with the existing data and the get does not exist or something like that. aora ando fighting to be able to proceed to order and followed several tutorials but without results. I need to sort the name and surname fields.


Hi again :)

If you know how to work with GENIL_BOL_BROWSER tcode, you can simulate your actions there.

Just select your query entity (BTQACT?), perform a search by filling selection criteria and hit the 'find' button, select an entity from result list (double click), and check which attribute property do you get for desired attributes.

You can also simulate the 'lock' action or 'change mode' to see if you're allowed. If not, you can always try to debug and find why.

Kind regards,