07-23-2007 10:03 AM
Hi Experts,
I have a print program that currently dumps in sap version 4.5b. The subroutine inside the print program is being called dynamically once the VA03 is executed.
I just notice that after calling the subroutine dynamically there is a IF FOUND. code then it dumps. What is IF FOUND means? Thanks!
Best Regards,
Kurtt
07-23-2007 10:11 AM
Hi,
If found means it will search for that subroutine if it is available it will execute.
If that subroutine is not present it will not execute that.
PERFORM form IN PROGRAM prog IF FOUND .
The system only calls the subroutine if it and its main program exist. If this is not the case, the statement is ignored.
Here you can specify the names of both the subroutine and the program in which it occurs dynamically at runtime. If you do this, you should place the variables form and prog in parentheses. The names in form and prog must be entered in uppercase, otherwise a runtime error occurs. If you do not specify any additions (such as USING) you do not need to specify the program after IN PROGRAM. In this case, the system looks for the subroutine in the current program.
Reward if helpful.
Regards,
Umasankar.
07-23-2007 10:07 AM
hi,
If the specified program/include/fm does not exist, a syntax error will be triggered. This error message can be suppressed by specifiying the addition IF FOUND.
rewards points plz
07-23-2007 10:07 AM
Hi,
Double click on found, may be it is boolean value.
Like flag.
Reward if useful!
07-23-2007 10:11 AM
Hi,
If found means it will search for that subroutine if it is available it will execute.
If that subroutine is not present it will not execute that.
PERFORM form IN PROGRAM prog IF FOUND .
The system only calls the subroutine if it and its main program exist. If this is not the case, the statement is ignored.
Here you can specify the names of both the subroutine and the program in which it occurs dynamically at runtime. If you do this, you should place the variables form and prog in parentheses. The names in form and prog must be entered in uppercase, otherwise a runtime error occurs. If you do not specify any additions (such as USING) you do not need to specify the program after IN PROGRAM. In this case, the system looks for the subroutine in the current program.
Reward if helpful.
Regards,
Umasankar.
07-23-2007 10:45 AM
Hi ,
If the called Perform is available in the program then the perform will be triggereed
but if Perform is not available in the Called Program then it will dump .
In other words, If system doesntfind perform it will dump..
If you want to handle in such a way that system should not dump even if perform is not found then simply add this two words IF FOUND .
Hope this helps..
Praveen.
07-23-2007 11:15 AM
Thanks for all your responses.. I appreciate it so much.. the subroutine and program is existing.. the only thing i can see is that the perform has the following parameter:
PERFORM (lv_sub) IN program (lv_prog) Tables tab1
tab2
using v_var.
and form is:
FORM f_sub in program z_program tables tab1
using v_varx.
is that the reason?
07-23-2007 11:24 AM
Hi,
While passing the value to the field lv_sub & lv_prog the values should be in Upper case.
If it is not uppercase also it will give error.
Reward if helpful.