‎2008 Jan 18 5:08 AM
hi,
plz tell me . i am trying to lift the data from the table compareing with the corresponding field of one internal table . i give the select statemente but when giving wher condition there is no data .
Edited by: pankaj vashista on Jan 18, 2008 6:23 AM
‎2008 Jan 19 2:30 PM
Hi Pankaj, also check this.
Move corresponding statement moves value from one structure to another structure
MOVE-CORRESPONDING struc1 TO struc2.
Structures must be specified for struc1 and struc2. All components with the same name are searched for in struc1 und struc2 and the content of components in struc1 is assigned to the components with the same name in struc2. All other components are not affected.
Nested structures are fully expanded. The names of the components are compared to the lowest common level. For each comp component pair with the same name, the
MOVE struc1-comp TO struc2-comp.
Example
DATA: BEGIN OF struc1,
comp TYPE c LENGTH 1 VALUE 'U',
BEGIN OF struci,
comp1 TYPE c LENGTH 1 VALUE 'V',
BEGIN OF comp2,
col1 TYPE c LENGTH 1 VALUE 'X',
col2 TYPE c LENGTH 1 VALUE 'Y',
END OF comp2,
END OF struci,
END OF struc1.
DATA: BEGIN OF struc2,
BEGIN OF struci,
comp1 TYPE string,
comp2 TYPE string,
comp3 TYPE string,
END OF struci,
END OF struc2.
MOVE-CORRESPONDING struc1 TO struc2.
If you want to pass the data from one internal table to another internal table, then if the structure of both the table will be same then you can assign directly like that
it_tab1 = it_tab2.
or
it_tab1[] = it_tab2.
kindly reward if found helpful.
cheers,
Hema.
‎2008 Jan 18 5:18 AM
hi pankaj,
The question is not clear, could u send what exactly u got the problem.
so that others can help u.
regards
shashikanth naram.
‎2008 Jan 18 5:18 AM
Posting your code can help friends here to advice you better.
Regards
Eswar
‎2008 Jan 19 2:29 PM
Hi Pankaj,
Move-corresponding places the values in the similar field names of the target table.
u can give move-corresponding <it1> to <it2>
it place the values of it1 to the field names similar in it2.
but use it2-fldname = it1-fldname instead of move-corresponding for better performance.
cheers,
Hema.
‎2008 Jan 19 2:30 PM
Hi Pankaj, also check this.
Move corresponding statement moves value from one structure to another structure
MOVE-CORRESPONDING struc1 TO struc2.
Structures must be specified for struc1 and struc2. All components with the same name are searched for in struc1 und struc2 and the content of components in struc1 is assigned to the components with the same name in struc2. All other components are not affected.
Nested structures are fully expanded. The names of the components are compared to the lowest common level. For each comp component pair with the same name, the
MOVE struc1-comp TO struc2-comp.
Example
DATA: BEGIN OF struc1,
comp TYPE c LENGTH 1 VALUE 'U',
BEGIN OF struci,
comp1 TYPE c LENGTH 1 VALUE 'V',
BEGIN OF comp2,
col1 TYPE c LENGTH 1 VALUE 'X',
col2 TYPE c LENGTH 1 VALUE 'Y',
END OF comp2,
END OF struci,
END OF struc1.
DATA: BEGIN OF struc2,
BEGIN OF struci,
comp1 TYPE string,
comp2 TYPE string,
comp3 TYPE string,
END OF struci,
END OF struc2.
MOVE-CORRESPONDING struc1 TO struc2.
If you want to pass the data from one internal table to another internal table, then if the structure of both the table will be same then you can assign directly like that
it_tab1 = it_tab2.
or
it_tab1[] = it_tab2.
kindly reward if found helpful.
cheers,
Hema.