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

internal tables

Former Member
0 Likes
885

hi all,

good day,

i have one internal table IT_CKIS, with some 10 fields,

LTEXT,is one of them

and,i have second internal table IT_CKIT,with only one field LTEXT,

i have populated these internal table with two separate SELECT statements,not used INNER JOIN,

now i have some values of LTEXT in my second internal table,IT_CKIT,that i want to move to LTEXT of first internal table IT_CKIS,

please,let me know,how

thanks& regards,

kcc

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
836

i will tell u ow to move..

before that tell me...

suppose if u got 20 entries in IT_CKIS

and 10 entries in IT_CKIT..

(there may b chace to get like this)

how can u move 20 into 10 entries table...

then also u want move 20 entries into 10 entries table,,

Ramesh..

8 REPLIES 8
Read only

Former Member
0 Likes
837

i will tell u ow to move..

before that tell me...

suppose if u got 20 entries in IT_CKIS

and 10 entries in IT_CKIT..

(there may b chace to get like this)

how can u move 20 into 10 entries table...

then also u want move 20 entries into 10 entries table,,

Ramesh..

Read only

baskaran00
Active Participant
0 Likes
836

Hi,

Both 2 internal tables must have a key field. Using the key field u can move the records.

Loop at IT_CKIT.

LTEXT = IT_CKIT-LTEXT.

MODIFY IT_CKIS FROM WA_IT_CKIS TRANSPORTING LTEXT WHERE

Keyfield = IT_CKIT-keyfield.

endloop.

WA_IT_CKIS - Workarea.

Try out this logic.

Read only

Former Member
0 Likes
836

hi Chandra,

do this way ...

 loop at IT_CKIS.

  read table IT_CKIT with key field-IT_CKIS-field.

  it_ckis-ltext = it_ckit-ltext.
  append it_ckis.
 Endloop.

Regards,

Santosh

Read only

aris_hidalgo
Contributor
0 Likes
836

Hi,

loop at it_ckit.

move it_ckit-ltext to it_ckis-ltext.

append it_ckis.

endloop.

Hope this helps...

P.S. Please award points for useful answers.

Read only

Former Member
0 Likes
836

Hi,

You can move entries from it_ckit to it_ckis

as follows

loop at it_ckit.

it_ckis-ltext = it_ckit-ltext

append it_ckis.

endloop.

it_ckis will have contents of it_ckit but

only ltext field will have value all other

fields will be blank.

Regards

Amole

Read only

Former Member
0 Likes
836

Hi,

Loop at it_ckis into wa_ckis.

read table it_ckit into wa_ckit with key

LEDNR = wa_ckis-lednr.

"If u want, u can add some more key fields while reading

"the CKIT table.

wa_ckis-ltext = wa_ckit-ltext.

modify i_ckis from wa_ckis transporting ltext.

endloop.

But instead of doing like this, U can directly put an inner join between these 2 tables.

Regards,

Prakash.

Read only

Former Member
0 Likes
836

hi

good

use the MOVE-CORRESPONDING statement for this

Syntax->

MOVE-CORRESPONDING address TO name.

thanks

mrutyun^

Read only

Former Member
0 Likes
836

Hi Chaandramouli,

you are saying your second IT has only LTEXT field.

so on which basis u r going to get LTEXT from IT_CKIT?

while gettting IT_CKIT it self get primary key of text also.

so u can do the following.

loop at it_ckis.

v_tabix = sy-tabix.

read table it_ckit with key xxx = it_ckit-xxx.

if sy-subrc = 0.

  • modify table it_ckis with ltext using v_tabix.

endif.

endloop.

-Anu