‎2008 Oct 09 9:15 AM
hi,
can we define a structure as like this:
cht_outtab[] = lt_outtab_me05.
i am assigning this to cht_outtab, where cht_outtab is type any table and lt_outtab_me05 like table of zmere_outtab_me05.
please help me on this?
‎2008 Oct 09 9:17 AM
If both are internal tables with identical structures:
cht_outtab[] = lt_outtab_me05[].If that is not the case, you'll have to loop over lt_outtab_me05 and move each corresponding field of lt_outtab_me05 to cht_outtab.
‎2008 Oct 09 9:25 AM
hey,
its defined like this :
FORM w3_alv_fill_table CHANGING cht_outtab TYPE ANY TABLE.
DATA: ls_outtab_me05 like zmere_outtab_me05,
lt_outtab_me05 like table of ls_outtab_me05.
and lastly it is cht_outtab[] = lt_outtab_me05.
i am not understanding wats wrong?
any other way of defing cht_outtab??
‎2008 Oct 09 9:48 AM
Last statement should be ...
cht_outtab[] = lt_outtab_me05[].and while calling procedure w3_alv_fill_table you should pass table parameter cht_outtab as internal table of type zmere_outtab_me05
Edited by: Vishal Jadhav on Oct 9, 2008 2:18 PM
‎2008 Oct 09 10:11 AM
FORM w3_alv_fill_table CHANGING cht_outtab like zmere_outtab_me05.?????
should i define it like this?
‎2008 Oct 09 9:31 AM
Hi Poonam,
I think, may be you should use field-symbols in that case.
Regards,
Vishal
‎2008 Oct 09 9:33 AM
‎2008 Oct 09 9:38 AM
To move the contents from 1 internal table to another in 1 go:
itab1[] = itab2[].But what is the error you are getting?
‎2008 Oct 09 10:06 AM
as they are not compatible. still getting the same error.
Edited by: Poonam Naik on Oct 9, 2008 11:10 AM
‎2008 Oct 09 10:12 AM
Both internal tables must have the same structure.
Somewhere you do a PERFORM w3_alv_fill_table CHANGING your_table.
The definition of your_table must be the same as the local internal table you want to copy from.
‎2008 Oct 09 10:16 AM
the problem is : perform statement is in standard include which i cant change and form is in z include.
any other way out?
‎2008 Oct 09 10:23 AM
Change the definition of your local internal table
DATA: ls_outtab_me05 like zmere_outtab_me05,
lt_outtab_me05 like table of ls_outtab_me05.to the definition of the internal table you pass in the PERFORM.
But... if this routine is going to be used for other internal tables (wiht other definition) as well, then you'll notice those will go wrong.