09-26-2008 2:05 PM
hi guyz,
i have itab1 with negative values init
for eg: -1 -2
and im moving those values to itab2 of same structure and this values changing as 1- 2-
plz advise..
thanks
09-26-2008 2:09 PM
Hi,
The format for representing the negative values will be 2- and 3- only.
Check how you are populating the data into internal table itab1? What is the data type used for that?
Check whether the same data type is being used for the internal table itab1 and itab2 for refering to the fields.
09-26-2008 2:12 PM
Hi,
The data type might be different .
Check the data type.
Regards,
Nandha.
09-26-2008 2:15 PM
Hi
If both the internal table have same field name then try to assign the values
t_tab2[] = t_tab1[].
check this Sample Snippet
DATA :
BEGIN OF fs_tab,
a TYPE i,
b TYPE i,
END OF fs_tab.
DATA :
t_tab1 LIKE
STANDARD TABLE
OF fs_tab,
t_tab2 LIKE
STANDARD TABLE
OF fs_tab.
DO 10 TIMES.
fs_tab-a = -1 * sy-index.
fs_tab-b = fs_tab-a * sy-index.
APPEND fs_tab TO t_tab1.
ENDDO.
loop at t_tab1 into fs_tab.
write :
/ fs_tab-a , fs_tab-b.
endloop.
t_tab2[] = t_tab1[].
skip 5.
loop at t_tab2 into fs_tab.
write :
/ fs_tab-a , fs_tab-b.
endloop.
Regards
Pavan