ABAP code to loop from 1 to 10:
In this example, we use the DO loop statement to loop from 1 to 10. Inside the loop, we define a local variable "lv_index" to store the current loop index using the system variable "sy-index". We then use the WRITE statement to output the loop iteration number to the screen.
The loop will execute 10 times, with "sy-index" starting at 1 and incrementing by 1 on each iteration.