Skip to Content
0
Former Member
Oct 07, 2009 at 12:14 PM

Calling subroutine dynamically

1624 Views

Hi,

I have found the following SAP Help page ([Naming Subroutines|http://help.sap.com/saphelp_nw2004s/helpdata/EN/9f/db978335c111d1829f0000e829fbfe/content.htm]) regarding the dynamic subroutine call. But I wonder why the following code could not work.


PROGRAM zpld_test_goh.

DATA: subrname TYPE c LENGTH 4 VALUE 'test',
      programname type c LENGTH 20 value  'zpld_test_goh'.

PERFORM (subrname) IN PROGRAM (programname) IF FOUND.

FORM test.

  WRITE 'hello'.

ENDFORM. 

Could anyone please enlighten me on this issue?

Thanks in advance.

Regards,

Joon Meng