![]() Step 2 − Select Create and then select Subroutine. Open the existing program and then right-click on program. When ENDFORM is encountered, control jumps back to the statement following the PERFORM statement. The control jumps to the first executable statement in the subroutine. We can call a subroutine by using PERFORM statement. ![]() A subroutine can be defined using Form and EndForm statements.įollowing is the general syntax of a subroutine definition. We can call this subroutine in our programs as many times as we wish. ![]() To make this code easier to maintain, we can encapsulate the code into a subroutine. Basically, they are the same code blocks. We have program X with 3 different source code blocks. ![]() You page out a part of a program to a subroutine to get a better overview of the main program, and to use the corresponding sequence of statements many times as depicted in the following diagram. It is a modularization unit within the program where a function is encapsulated in the form of source code. SAP-ABAP Core ABAP Interview Questions.Ī subroutine is a reusable section of code. Is it possible to call a subroutine of one program from another program? Add a Question Tags. Perform statement in ABAP is used to call an ABAP subroutine from any program. External Subroutines in SAP Script - Community Profiles.
0 Comments
Leave a Reply. |