Dear All,
I am getting the message "The data object ls_udat3 does not have a component called <fs_genfield>"
when I am trying to address structure's component dynamically. I kindly ask you for your support,
What have I done wrong at the point in the program.
Best regards
Alex
data: ls_udata type zbbpusr01_2,
lt_attr_data type bbpt_attr,
ls_attr_data type bbps_attr,
ls_vlist type bbps_attr_values,
lt_vlist type bbpt_attr_values,
ls_udat3 type zbbpusr01_3,
ls_udat3_2 type zbbpusr01_3,
lv_fieldname type string,
lt_udat3 type table of zbbpusr01_3,
et_fcat type lvc_t_fcat,
lv_user type baluser.LOOP AT p_gt_udate INTO ls_udata.
lv_user = ls_udata-userid.CALL FUNCTION 'BBP_READ_ATTRIBUTES'
EXPORTING
iv_user = lv_user
IV_SCENARIO = 'BBP'
it_attr_list = gt_attr_list2
IMPORTING
ET_ATTR = lt_attr_data
EXCEPTIONS
object_id_not_found = 1
no_attributes_requested = 2
attributes_read_error = 3
OTHERS = 4.
FIELD-SYMBOLS:
<fs_zbbpusr03> type zbbpusr01_3,
<fs_zbbpusr> type zbbpusr01_3,
<fs_field> type bbps_attr-attr_id,
<fs_attr_data> type bbps_attr,
<fs_vlist> type bbps_attr_values,
<fs_genfield> type any.loop at lt_attr_data ASSIGNING <fs_attr_data>.
assign <fs_attr_data>-attr_id to <fs_genfield>.
loop at <fs_attr_data>-vlist ASSIGNING <fs_vlist>.
MOVE <fs_vlist>-value to ls_udat3-<fs_genfield>.
ENDLOOP.
ENDLOOP.
ENDLOOP.
ENDFORM. " READ_ATTR