‎2006 Sep 05 10:06 AM
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
‎2006 Sep 05 10:13 AM
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..
‎2006 Sep 05 10:13 AM
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..
‎2006 Sep 05 10:14 AM
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.
‎2006 Sep 05 10:14 AM
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
‎2006 Sep 05 10:16 AM
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.
‎2006 Sep 05 10:18 AM
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
‎2006 Sep 05 10:21 AM
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.
‎2006 Sep 05 10:37 AM
hi
good
use the MOVE-CORRESPONDING statement for this
Syntax->
MOVE-CORRESPONDING address TO name.
thanks
mrutyun^
‎2006 Sep 05 10:46 AM
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