06-30-2007 6:50 AM
06-30-2007 8:21 AM
Hi Pradeep,
Go thriugh the following example you will have a clear idea.
Data: Begin of F_Stiring.
Name(10) type c.
age(3) type n,
occu(15) type c.
Data : End of F_string.
Data: begin of int_tab occurs 100,
Name(10) type c.
age(3) type c,
occu(15) type n.
Data : End of int_tab.
move 'john' to f_string-name.
move '100' to f_string-age.
move 'salesman' to f_string-occu.
move f_string to int_tab.
append int_tab.
clear int_tab.
Ouptput.
contents of f_string.
f_string-name = john.
f_string-age = 100.
f_string-occu = salesman.
contents of int_tab.
int_tab-name = john.
int_tab-age = 100 sales
int_tab-occu = man.
So actually when use move statements with field string of different lengths you will get match error.
Because the processorr would see the field string moving charater into integer field as explained in above example.
Reward if helpful.
06-30-2007 7:28 AM
Hi Pradeep,
Go thriugh the following example you will have a clear idea.
Data: Begin of F_Stiring.
Name(10) type c.
age(3) type n,
occu(15) type c.
Data : End of F_string.
Data: begin of int_tab occurs 100,
Name(10) type c.
age(3) type c,
occu(15) type n.
Data : End of int_tab.
move 'john' to f_string-name.
move '100' to f_string-age.
move 'salesman' to f_string-occu.
move f_string to int_tab.
append int_tab.
clear int_tab.
Ouptput.
contents of f_string.
f_string-name = john.
f_string-age = 100.
f_string-occu = salesman.
contents of int_tab.
int_tab-name = john.
int_tab-age = 100 sales
int_tab-occu = man.
So actually when use move statements with field string of different lengths you will get match error.
Because the processorr would see the field string moving charater into integer field as explained in above example.
Reward if helpful.
Regards
Raghavendra.D.S
06-30-2007 8:16 AM
Hi Pradeep,
Go thriugh the following example you will have a clear idea.
Data: Begin of F_Stiring.
Name(10) type c.
age(3) type n,
occu(15) type c.
Data : End of F_string.
Data: begin of int_tab occurs 100,
Name(10) type c.
age(3) type c,
occu(15) type n.
Data : End of int_tab.
move 'john' to f_string-name.
move '100' to f_string-age.
move 'salesman' to f_string-occu.
move f_string to int_tab.
append int_tab.
clear int_tab.
Ouptput.
contents of f_string.
f_string-name = john.
f_string-age = 100.
f_string-occu = salesman.
contents of int_tab.
int_tab-name = john.
int_tab-age = 100 sales
int_tab-occu = man.
So actually when use move statements with field string of different lengths you will get match error.
Because the processorr would see the field string moving charater into integer field as explained in above example.
Reward if helpful.
06-30-2007 8:21 AM
Hi Pradeep,
Go thriugh the following example you will have a clear idea.
Data: Begin of F_Stiring.
Name(10) type c.
age(3) type n,
occu(15) type c.
Data : End of F_string.
Data: begin of int_tab occurs 100,
Name(10) type c.
age(3) type c,
occu(15) type n.
Data : End of int_tab.
move 'john' to f_string-name.
move '100' to f_string-age.
move 'salesman' to f_string-occu.
move f_string to int_tab.
append int_tab.
clear int_tab.
Ouptput.
contents of f_string.
f_string-name = john.
f_string-age = 100.
f_string-occu = salesman.
contents of int_tab.
int_tab-name = john.
int_tab-age = 100 sales
int_tab-occu = man.
So actually when use move statements with field string of different lengths you will get match error.
Because the processorr would see the field string moving charater into integer field as explained in above example.
Reward if helpful.