05-12-2006 9:31 AM
Hi all,
I would like to perform an external subroutine form residing in an include program from a customer function user exit. I tried using the following code, but it dumps:
PERFORM <form name> IN PROGRAM (lv_program)
TABLES <a> <b> USING <c>.
In the dump analysis I see that "Program <include name> is type I and therefore cannot be generated" and "The current ABAP/4 program attempts to call the program <include name> but this program cannot be executed. Therefore,the current program had to be terminated. "
If the include can't be generated, is there another way or method I could directly call the form without needing to copy the standard code to an own function or form?
Best regards,
Mikko
05-12-2006 9:35 AM
Hello Mikko,
U need to provide with the main program name instead of include then it wil not give a dump or error. Find the main program name and use it.
05-12-2006 9:34 AM
Hi,
include <name_of_the_include>.
perform <name_of_the_form>.
(simple way is the better way )
Fred
05-12-2006 9:35 AM
Hi
You have to insert that include in a program, so or you convert the include in a program or you create a program where you'll insert it.
Max
05-12-2006 9:35 AM
Hello Mikko,
U need to provide with the main program name instead of include then it wil not give a dump or error. Find the main program name and use it.
05-12-2006 9:46 AM
Hi Abhijit,
thanks for the tip. I checked the where used list of the include program but couldn't unfortunately find any references of this include (LHRWPC_TO_REMOTEF01).
Others, the inclusion of the include in my code doesn't work because I'm working inside a user exit. Putting in the include form makes the system give an error to place the inclusion after the function module (which is a modification then).
Any more tips?
-Mikko
ps. You were the first to give the correct answer so 10p for you
Message was edited by: Mikko Mäki-Rahkola
05-12-2006 9:36 AM
05-12-2006 9:36 AM
PERFORM <form name> IN PROGRAM (lv_program)
TABLES <a> <b> USING <c>.
lv_program should be program name but not include name.
give the program name
or include that include in the current program
05-12-2006 9:39 AM
05-12-2006 9:39 AM
Hi,
take this example..
perform idoc_status_record_write in program sapmsed7 using
x_edidc-docnum
c_idoc_status_ready
space
space
space
space
space
space.
in this the from is in include, but while calling you need to call with the help of main program.
in this case <b>SAPMSED7</b> main program, but form is in include <b>MSED7F05</b>
Regards
vijay
05-12-2006 9:43 AM
Hi mikko,
1. what i understood is that :
2. customer exi
--> an FM
-
> an include
-
FORM subroutine (inside the include)
3. in such case, how can we write
FORM subroutine inside the include of the customer exit FM ?
BCOS it will give error.
Incorrect nesting: Before the statement "FORM", the structure introduced by "FUNCTION" must be concluded by "ENDFUNCTION" . . . . . .
regards,
amit m.
05-12-2006 9:48 AM
Yes, that's exactly why I can't put the form simply as an include inside the customer exit. I would need to find some way of calling the existing external form (before copying the code to a custom fm or other..)
-Mikko
05-12-2006 9:50 AM
hi,
try this instead of include program give this <b>SAPLHRWPC_TO_REMOTE</b>.
Regards
vijay
05-12-2006 9:54 AM
05-12-2006 9:55 AM
hi,
<b>SAPLHRWPC_TO_REMOTE</b> is the main program of include, this is function pool of the function module.
Regards
vijay
05-12-2006 9:57 AM
Ah yes..found it now, too..(blush blush)
I tried getting the where used list by clicking on the include header label field while I should have clicked the button on the row beginning with "***INCLUDE LHRWPC_TO_REMOTEF01".
Thanks again!
-Mikko