METHOD update_data_from_be DATA lr_tto_det_data TYPE REF TO cl_dpr_ui_

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
METHOD update_data_from_be .
DATA: lr_tto_det_data TYPE REF TO cl_dpr_ui_log_task_detail,
ls_objects TYPE dpr_ts_tree_objects,
lv_root_guid TYPE dpr_tv_object_guid_char,
lv_root_type TYPE cgpl_object_type,
lt_fields_tbd TYPE dpr_tt_ui_fields,
lt_obj_fc TYPE dpr_tt_obj_fc_ui,
ls_viewdata TYPE dpr_ts_ui_task_data,
lt_viewdata TYPE TABLE OF dpr_ts_ui_task_data.
DATA lo_nd_data TYPE REF TO if_wd_context_node.
DATA lo_el_data TYPE REF TO if_wd_context_element.
DATA ls_data TYPE wd_this->element_data.
* navigate from <CONTEXT> to <DATA> via lead selection
lo_nd_data = wd_context->get_child_node( name = wd_this->wdctx_data ).
* @TODO handle non existant child
* IF lo_nd_data IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_data = lo_nd_data->get_element( ).
* @TODO handle not set lead selection
IF lo_el_data IS INITIAL.
ENDIF.
* get all declared attributes
lo_el_data->get_static_attributes(
IMPORTING
static_attributes = ls_data ).
APPEND ls_data-guid TO ls_objects-objects.
ls_objects-object_type = ls_data-object_type.
lv_root_guid = ls_data-root_guid.
lv_root_type = ls_data-root_object_type.
APPEND 'CALC_EARLY_FINISH_UI' TO lt_fields_tbd.
APPEND 'CALC_EARLY_START_UI' TO lt_fields_tbd.
APPEND 'CALC_LATE_FINISH_UI' TO lt_fields_tbd.
APPEND 'CALC_LATE_START_UI' TO lt_fields_tbd.
APPEND 'FLAG_MILESTONE_UI' TO lt_fields_tbd.
APPEND 'LONGTEXT_UI' TO lt_fields_tbd.
APPEND 'MIRRORED_TASK_UI' TO lt_fields_tbd.
APPEND 'RESP_ABSTR_ROLE_UI' TO lt_fields_tbd.
APPEND 'RESP_BUPAS_UI' TO lt_fields_tbd.
APPEND 'RESP_CONCR_ROLE_UI' TO lt_fields_tbd.
APPEND 'SHORTTEXT_UI' TO lt_fields_tbd.
APPEND 'SORT_NUMBER_UI' TO lt_fields_tbd.
APPEND 'STATTXT_UI' TO lt_fields_tbd.
APPEND 'STATUS_KEY_UI' TO lt_fields_tbd.
APPEND 'SUPROJECT_ID_UI' TO lt_fields_tbd.
APPEND 'SUBPROJECT_LINK_UI' TO lt_fields_tbd.
APPEND 'TASK_ID_UI' TO lt_fields_tbd.
APPEND 'TASK_TYPE_UI' TO lt_fields_tbd.
APPEND 'VERSION_NUMBER_UI' TO lt_fields_tbd.
lr_tto_det_data = cl_dpr_ui_log_task_detail=>get_instance( ).
CALL METHOD lr_tto_det_data->get_detail_data
EXPORTING
is_objects = ls_objects
iv_root_guid = lv_root_guid
iv_root_type = lv_root_type
it_fields_tbd = lt_fields_tbd
IMPORTING
et_detail_data = lt_viewdata
et_field_ctrl = lt_obj_fc.
READ TABLE lt_viewdata INDEX 1 INTO ls_viewdata.
DATA lo_nd_viewdata TYPE REF TO if_wd_context_node.
DATA lo_el_viewdata TYPE REF TO if_wd_context_element.
* navigate from <CONTEXT> to <VIEWDATA> via lead selection
lo_nd_viewdata = wd_context->get_child_node( name = wd_this->wdctx_viewdata ).
* @TODO handle non existant child
* IF lo_nd_viewdata IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_viewdata = lo_nd_viewdata->get_element( ).
* @TODO handle not set lead selection
IF lo_el_viewdata IS INITIAL.
ENDIF.
* @TODO fill static attributes
* ls_viewdata = xxx->get_yyy( ).
* set all declared attributes
lo_el_viewdata->set_static_attributes(
static_attributes = ls_viewdata ).
ENDMETHOD.