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

moving fields

Former Member
0 Likes
591

Hi,

how to move values of 2 records into 1 single record.

Thank you.

6 REPLIES 6
Read only

Former Member
0 Likes
557

Hi SVJ,

Use <b>MOVE-CORRESPONDING</b> statement.

Use two MOVE-CORRESPONDIG statement for each record to push into a single record.

MOVE-CORRESPONDING record1 INTO record.

MOVE-CORRESPONDING record2 INTO record.

APPEND record.

Thanks,

Vinay

Read only

Former Member
0 Likes
557

Do you have sufficient fields to move the data into?

itab

- field1

- field2

Then,

itab-field1 = wa1-field.

itab-field2 = wa2-field.

Read only

Former Member
0 Likes
557

use like this..

Use Move-corresponding struct1 into struct.

Use Move-corresponding struct2 into struct.

Where Struct1 & struct2 are your 2 records and struct is a single final record..

Reward if usefull..

Read only

Former Member
0 Likes
557

Hi

the concatenate command can be used to move the value of two records into one.

eg

data : field1(5) type c value 'abc',

field2(10) type c value '123' .

write 😕 field1 , field2 .

CONCATENATE field1 field2 into field2 .

write 😕 field2.

The output would be : abc123

Plz revert if it doen't suffice ur requirement.

Regards

Pankaj

Plz award points if it helps u

Read only

Former Member
0 Likes
557

Hi,

Declare the table with all the required fields(for both 2 records). then while comparing the key value move the fields to the corresponding fileds.

Regards,

Satya.

Read only

Former Member
0 Likes
557

Hi,

Move the records data into two different structure

create new structure which is having two structure fields.

append new structure to internal table.

Regards

Bhupal Reddy