‎2006 Aug 11 11:15 AM
hello friends..this is akshay as BW consultanrt, i am writing one program for my extraction requierment. could you please help me to solve the code error..
code is as below..
Tables: PA0001,
zgmpt.
data: begin of itab_gmpt occurs 0.
include structure zgmpt.
data: end of itab_gmpt.
data: tab type i.
*<query_head>
select * from pa0001 into corresponding fields of table itab_gmpt.
append itab_gmpt.
loop at itab_gmpt.
move corresponding itab_gmpt to zgmpt.
*<query_body>.
endloop.
error is ---field corresponding is unknown, it is niether inone of the specified table nor defined by a data statement.
Details - ZGMPT is structure. having 10 frield from the table of pa0001.
please let me know if you need any more information
‎2006 Aug 11 11:23 AM
‎2006 Aug 11 11:19 AM
Tables: PA0001.
*--zgmpt. COMMENTED
data: begin of itab_gmpt occurs 0.
include structure zgmpt.
data: end of itab_gmpt.
DATA : X_ZGMPT TYPE ZGMPT.
Here, X_ZGMPT is the structure (can hold 1 record at a time) with ref to ZGMPT
data: tab type i.
*<query_head>
select * from pa0001 into corresponding fields of table itab_gmpt.
the above SELECT itself,will populate data from PA0001 to your ITAB.so no need of APPEND AFTER This.so i commented
<b>*-append itab_gmpt. COMMENTED</b>
loop at itab_gmpt.
*--move corresponding itab_gmpt to zgmpt. COMMENTED
move corresponding itab_gmpt to X_zgmpt.
*<query_body>.
endloop.Regards
Srikanth
added comments to the code
Message was edited by: Srikanth Kidambi
‎2006 Aug 11 11:23 AM
‎2006 Aug 11 11:28 AM
Please change the command for Move corresponding.
it should be
MOVE-CORRESSPONDING ITAB_GMPT INTO ZGMPT.
Regards
Anurag
‎2006 Aug 11 11:32 AM
move corresponding should be changed to
<b>move-corresponding</b>.
there is no need for the append statement.
Remove it.
Regards,
Ravi
‎2006 Aug 11 11:36 AM
<Thanks to all of you...
problem has been resolved.
Thanks once again.
regards
‎2006 Aug 11 11:39 AM
Hi,
it is very small mistake.
loop at itab_gmpt.
move<b>-</b>corresponding itab_gmpt to zgmpt.
*<query_body>.
endloop.regards
vijay