2008 May 05 12:13 PM
Hi all,
While making changes to program to make it unicode complaint, i have this following problem
CONTROLS: nat_available TYPE TABLEVIEW USING SCREEN 0302.
DATA: lt_cols_0302 TYPE t_item_columns
OCCURS 0 WITH HEADER LINE.
lt_cols_0302 [ ] = nat_available-cols [ ].
was changed to
data: lv_cols like line of nat_available-cols.
loop at nat_available-cols into lv_cols .
move-corresponding lv_cols to lt_cols_0302.
append lt_cols_0302.
endloop.
But I am struck in making changes to the following statement,
nat_available-cols [ ] = lt_cols_0302 [ ].
Can anyone help please?
Thanks
Sachin
Edited by: Sachin on May 5, 2008 4:43 PM
2008 May 05 10:56 PM
Hello Sachin
Why not reverse your coding?
> data: lv_cols like line of nat_available-cols.
>
> loop at nat_available-cols into lv_cols .
> move-corresponding lv_cols to lt_cols_0302.
> append lt_cols_0302.
> endloop.
>
> But I am struck in making changes to the following statement,
>
> nat_available-cols [ ] = lt_cols_0302 [ ].
>
DATA: ls_col LIKE LINE OF lt_cols_0302.
LOOP AT lt_cols_0302 INTO ls_col.
MOVE-CORRESPONDING ls_col TO lv_cols.
APPEND lv_cols TO not_available-cols.
ENDLOOP.
Final remark: I recommend to use more sensible naming conventions otherwise your coding becomes a mess.
Regards
Uwe
2008 May 05 10:56 PM
Hello Sachin
Why not reverse your coding?
> data: lv_cols like line of nat_available-cols.
>
> loop at nat_available-cols into lv_cols .
> move-corresponding lv_cols to lt_cols_0302.
> append lt_cols_0302.
> endloop.
>
> But I am struck in making changes to the following statement,
>
> nat_available-cols [ ] = lt_cols_0302 [ ].
>
DATA: ls_col LIKE LINE OF lt_cols_0302.
LOOP AT lt_cols_0302 INTO ls_col.
MOVE-CORRESPONDING ls_col TO lv_cols.
APPEND lv_cols TO not_available-cols.
ENDLOOP.
Final remark: I recommend to use more sensible naming conventions otherwise your coding becomes a mess.
Regards
Uwe