‎2007 Mar 14 6:59 AM
Hi,
Is there a method to call a form dynamicly? I need something to replace "PERFORM FORM1" to "PERFORM variable".
Thanks
Lilan
‎2007 Mar 14 7:05 AM
Hi Lilan,
You can use PERFORM ( variable1 ) . Inside the paranthesis you can use variables, this variable can hold the subroutine name(form name)
Hope this will help you
Regards
Rengaraj
‎2007 Mar 14 7:05 AM
Hi Lilan,
You can use PERFORM ( variable1 ) . Inside the paranthesis you can use variables, this variable can hold the subroutine name(form name)
Hope this will help you
Regards
Rengaraj
‎2007 Mar 14 7:14 AM
hi,
I used it like this.
PERFORM ( zcplus_ctat1-za_uext ).
but when i try to activate, I get the below error.
Unable to interpret "ZCPLUS_CTAT1-ZA_UEXT". Possible causes of error:
Lilan
‎2007 Mar 14 7:53 AM
hii
move this value to some temp variable and then try like
tmp = zcplus_ctat1-za_uext.
then perform (tmp)
‎2007 Mar 14 8:00 AM
no luck.
error
Unable to interpret "tmp". Possible causes of error: Incorrect spelling
‎2007 Mar 14 8:16 AM
‎2007 Mar 14 7:14 AM
THe dynamic calls to subroutines are made using the following
PERFORM ( <var> ).
where <var> is the variable that is used to hold the form name
‎2007 Mar 14 7:20 AM
Hi Lilan
I think its useful for u.
DATA : BEGIN OF itab OCCURS 0,
objid TYPE i,
endda TYPE d,
END OF itab.
FIELD-SYMBOLS : <ttext>.
itab-objid = 1.itab-endda = sy-datum.
APPEND itab.
itab-objid = 2.itab-endda = sy-datum.
APPEND itab.
itab-objid = 3.itab-endda = sy-datum.
APPEND itab.
itab-objid = 0.itab-endda = sy-datum.
APPEND itab.
itab-objid = 4.itab-endda = '20041212'.
APPEND itab.
itab-objid = 5.itab-endda = '99991212'.
APPEND itab.
itab-objid = 0.itab-endda = '99991212'.
APPEND itab.
CLEAR itab.
LOOP AT itab.
WRITE : / itab-objid , itab-endda.
ENDLOOP.
WRITE :/.
DELETE itab WHERE endda+0(4) NE '9999' AND objid IS INITIAL.
ASSIGN 'PRINT' TO <ttext>.
PERFORM <ttext>.
&----
*& Form <ttext>
&----
FORM <ttext>.
LOOP AT itab.
WRITE : / itab-objid , itab-endda.
ENDLOOP.
ENDFORM. " <ttext>
Reward all the helpful answers..
With Regards
Navin Khedikar
‎2007 Mar 14 7:35 AM
Hi,
In my code, the variable "zcplus_ctat1-za_uext" holds the name of the form that i need to call. so if I give it as PERFORM <zcplus_ctat1-za_uext>, it looks for a form with the name <zcplus_ctat1-za_uext>, which is not what i wanted.
as an example, i have a form call "create1". so
zcplus_ctat1-za_uext = 'create1'.
I need a way to call "CREATE1" using the variable.
I tried both,
PERFORM <zcplus_ctat1-za_uext> & PERFORM ( zcplus_ctat1-za_uext ). Nither works.
Lilan
‎2007 Mar 14 8:07 AM
Check this :
PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING ... <pi>... ]
[CHANGING... <pi>... ]
[IF FOUND].