on 04-19-2018 12:15 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
Garcia
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,
Garcia
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.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.