‎2008 Aug 11 2:37 AM
Hi friends ,
I have written one subroutine(tr_stock) in the include(LYGRIFF01) program. this include is used in the function module.
now same subroutine functionlaty i want to use in the other program type E.
i have written the code as below but program is giving dump with the below error msg:
PERFORM tr_stock(LYGRIFF01)
TABLES lt_item
gi_return_s
USING gw_head.
error msg in dump: Program "LYGRIFF01" is type I and therefore cannot be generated.
how can i call the above subroutine in my program.
Thanks
Ramesh
‎2008 Aug 11 4:44 AM
Hi ,
u can also call like this
PERFORM tr_stock in program LYGRIFF01
TABLES lt_item
gi_return_s
USING gw_head.
regards
Prabhu
‎2008 Aug 11 4:58 AM
You have to call the main program, not the include program.
PERFORM tr_stock(LYGRIFF01) "<-----this should be main program
TABLES lt_item
gi_return_s
USING gw_head.Find out the Include program's main program and use that in the perform.
PERFORM tr_stock(MAINPROGRAM)
TABLES lt_item
gi_return_s
USING gw_head.
‎2008 Aug 11 5:06 AM
Hi,
this is main program..
REPORT ZPROGCALL.
include ZINCLUDE.
start-of-selection.
perform abcd IN PROGRAM ZINCLUDE.
this is include program...
form abcd.
write : 'include program'.
endform.
Hope Helpfull
Raghunath.S