Application Development and Automation 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: 
Read only

Fuction module

Former Member
0 Likes
536

I'm calling a form from a function module . i'm getting dump .

If do the same thing in a report ,the form is working fine .

can anybody tell me the reason..

3 REPLIES 3
Read only

Former Member
0 Likes
494

And the dump says...........

Do you really expect someone else to be able to help if you do not specify the reason for the dump.

Read only

0 Likes
494

I want to confirm if we can call a form from a FM ?

Dump says ..

A RAISE Statement in the SAPLFPCALL raised the exception condition USAGE ERROR.

Since the exception was not intercepted by a superior program , processing was terminated.

Read only

0 Likes
494

Hi,

The reason may be that the form may be created in another package. So the function module may not be able to find it.

You can ofcourse call forms in function module.

Just check in which program the form is present. Then you can call it like:

perform <formname> IN PROGRAM <prgram name> IF FOUND.

This specification is used to call any subprogram of another program or the current program. The subprogram and the program can either be specified statically as subr and prog (static external subprogram call), or dynamically in the character-type fields in parentheses sname and pname. When the statement is executed, sname and pname must contain the name of a subprogram or program in upper case (dynamic external subprogram call). If no entry is made after IN PROGRAM, the system searches for the subprogram within the current program.

If the addition IF FOUND is not specified, and the subprogram or program entered is not found, an untreatable exception occurs.

If the addition IF FOUND is specified and the entered program is not available, the statement PERFORM is ignored. If the specified program is available, if necessary, it is loaded into the internal session and searched for the specified subprogram. The event LOAD-OF-PROGRAM is not triggered. If the subprogram is available, the event LOAD-OF-PROGRAM is triggered (if it hasn't been already) and then the subprogram is executed.

Hope this helps

Regards,

Renjith Michael.