Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

data trasfer prob.

Former Member
0 Likes
588

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
567

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.

4 REPLIES 4
Read only

Former Member
0 Likes
567

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.

Read only

Former Member
0 Likes
567

Posting your code can help friends here to advice you better.

Regards

Eswar

Read only

Former Member
0 Likes
567

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.

Read only

Former Member
0 Likes
568

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.