2015 Apr 14 2:36 PM
Hi guys
FIELD-SYMBOLS : <f_list> TYPE any,
<lW_LIST> TYPE any.
LOOP AT CT_LIST ASSIGNING <f_list>.
lv_index = sy-index.
ASSIGN COMPONENT 'VKBUR' OF STRUCTURE <f_list> TO <lw_list>.
if <lw_list> is ASSIGNED.
READ TABLE LT_SORT INTO LW_SORT WITH KEY yvkbur = <lw_list>.
if sy-subrc = 0.
<F_LIST>-VKBUR = LW_SORT-yvkbur.
ENDIF.
ENDIF.
ENDLOOP.
error at this line <F_LIST>-VKBUR = LW_SORT-yvkbur.
error is <f_list> has no structure nad therefore no component called "VKBUR"
please help
thanks
2015 Apr 14 5:14 PM
Hi Prasanth,
Try.
Field VKBUR is already assigned to <lw_list>, just pass the new value to field symbols <lw_list>.
<lw_list> = lLW_SORT-yvkbur.
Hope it helpful,
Regards,
Venkat.V
Hi guys
FIELD-SYMBOLS : <f_list> TYPE any,
<lW_LIST> TYPE any.
LOOP AT CT_LIST ASSIGNING <f_list>.
lv_index = sy-index.
ASSIGN COMPONENT 'VKBUR' OF STRUCTURE <f_list> TO <lw_list>.
if <lw_list> is ASSIGNED.
READ TABLE LT_SORT INTO LW_SORT WITH KEY yvkbur = <lw_list>.
if sy-subrc = 0.
<F_LIST>-VKBUR = LW_SORT-yvkbur.
ENDIF.
ENDIF.
ENDLOOP.
error at this line <F_LIST>-VKBUR = LW_SORT-yvkbur.
error is <f_list> has no structure nad therefore no component called "VKBUR"
please help
thanks
2015 Apr 14 3:06 PM
Hello!
The type of field-symbol <f_list> is generic (ANY), so you cannot use it as a structure.
Try this to get field VKBUR:
field-symbols <lv_any> type any.
assign component 'VKBUR' of structure <f_list> to <lv_any>.
if sy-subrc = 0.
"here <lv_any> is assigned with field VKBUR of <f_list>
endif.
2015 Apr 14 4:10 PM
Prasanth,
Your field symbols are typed generically and that is the reason for your error.
FIELD_SYMBOLS : <F_LIST> like line of CT_LIST.
<LW_LIST> type VKBUR.
Thanks,
Vikram.M
2015 Apr 14 5:14 PM
Hi Prasanth,
Try.
Field VKBUR is already assigned to <lw_list>, just pass the new value to field symbols <lw_list>.
<lw_list> = lLW_SORT-yvkbur.
Hope it helpful,
Regards,
Venkat.V
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |