Quantcast
Channel: SCN : Blog List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 333

Use of Into corresponding fields.

$
0
0

Hi...

 

Usage of Into corresponding fields :

Internal table:

Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure.

 

1.jpg

         

 

Select statement will fetch the data from the column erdat, kunnr, name1 and land1 from table KNA1 and places the data in the internal table , here the data will be inserted based on the fields created in the structure. 

 

2.jpg

 

The above pic shows the internal table is filled with the data with select statement,  but here the data of erdat is stored in the kunnr field of the internal table and the kunnr data is filled in erdat field of the internal table. Please refer the above pic clearly.

Whenever we execute the above statement, we get the below dump.

 

3.jpg

 

 

 

The above dump is displayed because we are placing the data of one field in another field as a result we are getting the dump. The dump message clearly explains the message.

So to avoid this situation we use the keyword “INTO CORRESPONDING FIELDS “ to place the data in the required fields.  The  program demonstrates the into corresponding fields keyword, whenever we use that keyword the data will be placed in the corresponding fields irrespective of the order present in the select statement.

 

 

4.jpg

 

 

 

Please observe closely the data movement of the data when we write the select statement, as i have drawn the curve showing the direction of the records to be stored.

 

 

Hope u got it,


Viewing all articles
Browse latest Browse all 333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>