Skip to Content
0
Jan 10, 2008 at 06:38 AM

Table control doubt

22 Views

Hi,

Please explain me the below code snippet.

LOOP AT itab with CONTROL TC CURSOR TC-top_line.

MODULE FETCHDATA. *** Why FETCHDATA should be called inside the Loop? Will this code hit the database again and again while looping? I tried FETCHDATA before the loop but did not work. why??? ***

ENDLOOP.

MODULE FETCHDATA OUTPUT.

SELECT * FROM SFLIGHT INTO TABLE itab.

SFLIGHT = itab. *** What is the significance? Why it is required ??? ***

ENDMODULE.

Thanks

Anand D