Skip to Content

HELP - attribute CHANGEABLE if_bol_bo_property_access .

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.
  TYPES:
    BEGIN OF ty_namefull,
      name_last  TYPE bu_namep_l,
      name_first TYPE bu_namep_f,
    END OF ty_namefull.




  DATA:
    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.
    ELSE.
      lv_index = lv_index + 1.
    ENDIF.
    lo_entity      = lo_iterator->get_by_index( iv_index = lv_index ).




    lo_entity->get_properties(
                        IMPORTING
                          es_attributes = ls_crmst_vis_bol_str
                              ).


    SELECT SINGLE name_last
                  name_first
                    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 ).


    ENDIF.
  ENDDO.
* Volvemos los valores modificados
  lr_result     ?= lo_result.
ENDMETHOD.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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,
    Garcia

    Add comment
    10|10000 characters needed characters exceeded

    • 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.