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

How Select From Local IT !

srahemi
Participant
0 Likes
4,376
DATA :
  IT_DATA_GRID1 TYPE TABLE OF BKPF,
  IT_DATA_GRID2 TYPE TABLE OF BKPF.

START-OF-SELECTION.
SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_DATA_GRID1 FROM BKPF UP TO 10 ROWS.

How select again from IT_DATA_GRID1 ?

SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_DATA_GRID2 FROM ????????? .
1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
4,233

Hello sina rahemi,,

Try the Below Code, it works in my system.

If it does not work as well then Your version does not support this functionality. It is supported from version 750. what is your version?

Thanks for all your effort and time consumed
I try it but didn't work

14 REPLIES 14
Read only

former_member1716
Active Contributor
4,233

Hello sina rahemi,

Try this: Updated

SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_DATA_GRID2 FROM @IT_DATA_GRID1 as IT_TEMP.

This Should Work.
Read only

4,233

In the Above Query it is mandatory that you need to use the Keyword AS, the name after the key word can be anything. I have given IT_TEMP as an example.

Read only

0 Likes
4,232

thanks but it doesn't work

2019-09-26-13-34-57.png

Read only

former_member1716
Active Contributor
4,234

Hello sina rahemi,,

Try the Below Code, it works in my system.

If it does not work as well then Your version does not support this functionality. It is supported from version 750. what is your version?

Read only

0 Likes
4,231
Thanks for all your effort and time consumed
I try it but didn't work

Read only

4,231

Hello Sina Rahemi,

Can you give a screen shot of your current syntax?

How does your code look like now, also what is the declaration part?

Can you give the complete details?

Read only

4,231
Sina Rahemi In fact, you are showing the version of the software which renders the SAP screens, which is not related to ABAP. You may obtain the ABAP version by menu System -> Status -> Components SAP_Basis/SAP_ABAP.
Read only

4,231

Sina Rahemi Kindly send the screen shot of your SAP LOGON PAD.

Read only

0 Likes
4,231

Hi Satish Kumar Balasubramanian.

You are right, my version does not support this.

Read only

0 Likes
4,231

Why posting an image instead of code that can be copy/pasted?

Read only

loyd_enochs3
Participant
4,231

It depends on what you are trying to accomplish. If you need to populate IT_DATA_GRID2 with the same starting data as IT_GRID1, then simply move IT_DATA_GRID1 to GRID2 before you manipulate the contents of GRID1. Then you will have a "clean copy" of the original SELECT throughout the rest of the program execution.

If you are trying to manipulate GRID1 and then use those results to populate GRID2, use some variation of LOOP AT GRID1 into GRID2 WHERE..... (Remember that SELECT is only to use to retrieve data from database tables, not internal tables.)

If you are trying for something else, please provide more detail on the requirements.

Read only

FredericGirod
Active Contributor
4,231

But what is your objective ?

what is the difference between the two internal tables for your final result ?

Read only

srahemi
Participant
0 Likes
4,231

Hello Loyd Enochs.

You are right.

I want select from bkpf into it1

change it1 data

select * INTO CORRESPONDING FIELDS OF TABLE IT_Grid1 FROM BKPF INNER JOIN IT1 on ...
Read only

FredericGirod
Active Contributor
0 Likes
4,231

select * into corresponding field of table it_grid1 from bkpf

select * appending corresponding field of table it_grid1 from bkpf

is it your objectif ?