Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

use of FORM and PERFORM statements

Former Member
0 Kudos

Hi,

can we use a FORM statement without having a corresponding PERFORM statement.

if yes, can i know how that FORM statement gets triggered when it is not having the corresponding PERFORM statement.

Thanks,

BJR.

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Dynamic subroutine calls are possible !! (Very commonly used are the ALV event subroutines which are called dynamically)

I donot know if you can trace the source of the dynamic subroutine call.

BR,

Suhas

8 REPLIES 8

Former Member
0 Kudos

hi,

the form will not get trigerred without the perform statement.

i don't think there should be a reason behind avoiding the perform statement.

regards,

sakshi

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Dynamic subroutine calls are possible !! (Very commonly used are the ALV event subroutines which are called dynamically)

I donot know if you can trace the source of the dynamic subroutine call.

BR,

Suhas

Former Member
0 Kudos

Dear BJR,

It is not posible to call a subroutine without perform statement.

It is mandatory to have a perform statement to call a subroutine. If you creates a subroutine in your program and dont write corresponding Perform statement than the subroutine will not call but the program doesn'tt give you any syntax error.

Hope this will helpful for you.

former_member206377
Active Contributor
0 Kudos

You can have a FORM without PERFORM but the control will never reach the FORM.

It will not give any syntax error but would lead to a PERFORM/FORM warning /error in EPC

former_member491305
Active Contributor
0 Kudos

Hi,

Without using a perform, the form will not get called.There are two ways in which we can call a form.

1.Direct call using Explicit " Perform form1. " statment.

2.Dynamic call "Perform (subroutine 1) ".Here subroutine1 should have value of form name.Eg:Subroutine1 = "form1".

The call to a form may be in the same program or from another program.

check the following link fo rmore info.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm

Thanks,

Vigneswaran S

Former Member
0 Kudos

hi,

yes you can use form without perform, but this form is call dynamically.

FOR EXAMPLE:- we are given TOP_OF_PAGE in REUSE_ALV_GRID_DISPLAY.

regards

RItesh

jyotheswar_p2
Active Participant
0 Kudos

Hi

You can trigger a FORM subroutine without using PEROFRM statement.They are called dynamic subroutines.

The best example for this is using events in interactive ALVs.While using REUSE_ALV_GRID_DISPLAY you have EVNETS parameter where you can poplate the necessary events like TOP OF PAGE or so.Then you will be only declaring FORM for that event. and the subroutine will be called dynamically from the funtion module.

Similarly u can also code routines to trigger your froms which you will be assigning in NACE transaction.

Thanks & Regards

Jyo

Former Member
0 Kudos

Thanks for the answers