Alternative Syntax at 4.7

Question: Could you share your previous experience for this problem motioned below. The cause syntax error for the statement
it_dummy_n_local [] = it_ekko_n [].
The above two internal table. I face syntax error at 4.7 ver.
In this scenario I could not able to use MOVE or WRITE TO statement.
Only option I have left is CONCATENATE them and append becuase structure of internal table is different.


types: begin of t_dummy_tab,
tline(8192),
end of t_dummy_tab.

data it_ekko_n like ekko occurs 0 with header line.
data it_dummy_n_local type t_dummy_tab occurs 0 with header line.
data v_wkurs(26) type c.

select * into corresponding fields of table it_ekko_n from ekko where ebeln GE 4500002813 AND ebeln LE 4500003000.



LOOP AT it_ekko_n.
it_dummy_n_local[] = it_ekko_n[].
ENDLOOP.


I get error for above statement.


Alternative soln I have

LOOP AT it_ekko_n.
v_wkurs = it_ekko_n-wkurs.
*it_dummy_n_local[] = it_ekko_n[].
CONCATENATE it_ekko_n-ebeln it_ekko_n-bukrs it_ekko_n-pincr it_ekko_n-waers v_wkurs INTO it_dummy_n_local-tline.
append it_dummy_n_local.
ENDLOOP.

Thanks
M Mi

Answer:
Only option I have left is CONCATENATE them and append becuase structure of internal table is different.

In that case I don't see how it worked before. (Unless I do not understand your question).

Also, you seem to have a misunderstanding of the statement:

I too understand the whole internal table body assigned to another internal table.Ther is no sense keepinf loop at the top. That is priniting mistake. You could check for internal table structure where you might guess that we could not use MOVE-CORRESPONDING. Please let us know different solution.

I failed my diploma in ESP and telepathy. I answer your questions based upon what I see, not what I sense in the ether. I cannot guess that you cannot use Move-Corresponding. I also cannot tell that what you have written is a priniting mistake.

If you can't figure out how to do this yourself and you post crap information, then you'll get crap answers. Post the right stuff and you might get the right answers.

<stomps off for a coffee>
_________________
Regards

R


Abap KC
SFMDR

Answer:
thanks R...
_________________
Mr M Mi SA

Answer:
Let me have a go

First off, select into corresponding is pointless, you select from EKKO into EKKO structure. IT IS THE SAME!

tab1[] = tab2[] only works if the tables have the same structure. Might work if they are different lenghts though, can't remember without a test.
Your syntax, with or without tryping errots is wrong.

You need a loop and move-corresponding (assuming field names are the same) to transfer this data.

Go back to square 1 and look at what you are trying to do. You don't want all of the EKKO row, you want SOME fields. Brush up on your SELECT and INTO clauses.

I'll point the way but I won't walk down this road. (Stomps off for lunch, treading on R by accident ).

Can posters of this calibre please supply their addresses so that we can beg for money when offshore undercutting puts us out of work. Thank you.

Answer:
Apart from the logic errors that have already been pointed out.

In 4.7 the default is for UNICODE to be on. So (packed) numeric fields have to be moved seperatly to the character fields. This is probably why you are getting a syntax error.
_________________
MattG.
Search SAPfans
Copyright ?2007 - 2008 www.jt77.com