‎2007 Mar 01 9:21 AM
‎2007 Mar 01 9:23 AM
Hi,
In ABAP, every processing block ends with keyword 'END'... For example DO - ENDDO, LOOP- ENDLOOP, FORM - ENDFORM, CASE - ENDCASE.
Do---Enddo
is used in to perform a step in a loop. Normally a conditions is attached with loop sothat looping will continue till condition holds true.
Form ---Endform... is used for defining the subroutines(functions) in the program. The utility of writing codes in FORM - ENDFORM is that the visibility of code block is local to form...
Cheers,
Simha.
‎2007 Mar 01 9:24 AM
Hi srinivasa,
do .. enddo is an loop with will be execute several times:
do 3 times. write: sy-index. enddo.
*
form .. endform is an suroutine wich will be execute via:
perform test.
form test.
write: 'Test'.
endform.
‎2007 Mar 01 9:24 AM
Hi
Between form-endform we will define the subroutines which is called with perform.
do-enddo is a loop like while etc.
Regards,
kumar
‎2007 Mar 01 9:24 AM
Srinivas,
do .. enddo is similar to loop endloop.....
form .. endform is to define subroutines.
Sujatha.
‎2007 Mar 01 9:24 AM
Actually there is no similarity between them to compare fr differences.
do-endo id an endless loop.
the statements in between the do-enddo will be executed until and uless it encounters an exit statement.
form-end-form is the part of code that can be called using a perform statement.
the code insode the form-endf-rm will be executed as many times as the number of times the perform statement is used in the program.
P.S: Please use a meaningful subject in your posts.
Regards,
Ravi