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: 

If FOUND

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member

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.

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Double click on found, may be it is boolean value.

Like flag.

Reward if useful!

Former Member

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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?

0 Kudos

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.