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

code error

Former Member
0 Likes
859

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
794

Its move-corresponding.

6 REPLIES 6
Read only

Former Member
0 Likes
794
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

Read only

Former Member
0 Likes
795

Its move-corresponding.

Read only

Former Member
0 Likes
794

Please change the command for Move corresponding.

it should be

MOVE-CORRESSPONDING ITAB_GMPT INTO ZGMPT.

Regards

Anurag

Read only

Former Member
0 Likes
794

move corresponding should be changed to

<b>move-corresponding</b>.

there is no need for the append statement.

Remove it.

Regards,

Ravi

Read only

0 Likes
794

<Thanks to all of you...

problem has been resolved.

Thanks once again.

regards

Read only

Former Member
0 Likes
794

Hi,

it is very small mistake.

loop at itab_gmpt.

move<b>-</b>corresponding itab_gmpt to zgmpt.

*<query_body>.

endloop.

regards

vijay