Instantiation: Public
method Z_SET_MERGE_VERT.
FIELD-SYMBOLS <fs_cols> TYPE lvc_s_co01.
FIELD-SYMBOLS <fs_data> TYPE lvc_s_data.
DATA outputlen TYPE i.
SORT tab_col_merge.
LOOP AT tab_col_merge ASSIGNING <fs_cols>.
if <fs_cols>-col_id le 0. continue. endif.
if <fs_cols>-outputlen le <fs_cols>-col_id. continue. endif.
outputlen = <fs_cols>-outputlen - <fs_cols>-col_id.
LOOP AT mt_data ASSIGNING <fs_data>
WHERE row_pos = row AND
( col_pos between <fs_cols>-col_id AND
<fs_cols>-outputlen ).
IF <fs_data>-col_pos = <fs_cols>-col_id.
<fs_data>-mergevert = outputlen.
ELSE.
CLEAR <fs_data>-mergevert.
CLEAR <fs_data>-value.
ENDIF.
ENDLOOP.
ENDLOOP.
endmethod.
|