cancel
Showing results for 
Search instead for 
Did you mean: 

Is Possible to Use PERFORM Statement in ABAP Webdynpro

Former Member
0 Kudos

Hi..

Is Possible to Use PERFORM Statement in ABAP Webdynpro..

i.e. My Requirement is to use sub-routine in the ABAP Webdnypro.

Is so, can you give me an Example.

Regards,

Surjith

Edited by: surjith kumar on Jul 28, 2008 12:39 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Webdynpro is fully based on ABAP OO concept.

If u want to perform same funtionality in many places of your webdynpro component, create a public method in Component controller and all that method in view.

Regards,

Karthick S

Answers (3)

Answers (3)

surjith_kumar
Active Contributor
0 Kudos

found by self

former_member190689
Contributor
0 Kudos

Hi Surjith,

    I am having the same requirement and searching from threads to threads but could able to find the correct way.Could you please tell me the way as u wrote that you found yourself.

Thanks in advance

Gaurav Gautam

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Although technically possible (as the solutions have been given) it is highly advisable NOT to do this! Not only is WDA OO based, it is also MVC based. There should be a clear separation of the layers of your logic. So from that simple matter only, you shoudl call a perform from WDA. You should only call methods of a model class. I suppose if you absolutely must reuse existing code, you might a perform state from inside your model class, but even that should be avoided if possible.

Former Member
0 Kudos

Hi Surjith,

Yes, you can very well use PERFORM statement in any Class method or WDA method. You need to just create a executable program (eg testprogram) and include those subroutines in that program. Now in your WDA method, write the following line:

PERFORM subroutine_name IN PROGRAM testprogram USING ... CHANGING .....

Hope it helps. Reward point if useful.

Thanks,

Amit