‎2006 Dec 24 4:58 AM
I'm new in ABAP. I add a include statement in my ABAP. When the main program calls a FORM which is in INCLUDE statement by using the statement PERFORM, I always get a error message that : Statement is not accessable. Please advise. Thanks.
‎2006 Dec 24 5:20 AM
hi,
first add the statement include program name then double click to create the program and simply save and activate and come back to the main program and write perfrom and double click on the form name to create form and endform a popup will come for u to select were to write the form and end form select the include program and write form and endform in the include program save and activate, then back to your main program save activate and execute.
‎2006 Dec 24 1:21 PM
Hi ravi chandran ,
I followed the way you introduced , the issue was still there. In the main program, when I double clicked the FORM name, the system can navigate to the INCLUDE program where the FORM exists.
‎2006 Dec 24 6:11 AM
Hello Jim
Obviously the INCLUDE statement comes after the PERFORM statement. Thus, the main program will not find the FORM routine. Simply change the order of the statements, e.g.:
REPORT zreport.
...
PERFORM subroutine. " => syntax error, FORM not found
INCLUDE zinclude. " contains routine subroutineREPORT zreport.
* Put the includes rather at the top of the program
INCLUDE zinclude. " contains routine subroutine
...
PERFORM subroutine. " => ok, FORM foundRegards
Uwe
‎2006 Dec 24 1:24 PM
Hi Uwe,
I always put the INCLUDE on the top of the main program. When I double clicked the FORM name, the system can even navigate to the INCLUDE program where the FORM exists.
‎2006 Dec 24 6:37 AM
hi,
please activate ur all includes.
Then try. also chk UWE'S solution
Regards
Anver
‎2006 Dec 24 1:25 PM
Hi Anversha s ,
Yes, all INCLUDES have been activated. Please refer my answer to Uwe as well. Thanks.
‎2006 Dec 24 1:54 PM
‎2006 Dec 24 2:50 PM
Hi Abdul, the sample program is attached :
Main program :
REPORT zhr_update_hr_master_data .
INCLUDE zhr_update_hr_master_data_top.
INCLUDE zhr_update_hr_master_data_f01.
perform get_source_data.
include porgram :
FORM Fetch source data.
form get_source_data.
P_rfc = 'HRDCLNT120'.
fetch tracking start date.
select single update_date into update_start_date from zhr_update_date.
Call Remote function to fetch the data
CALL FUNCTION 'ZHR_GET_MASTER_DATA'
DESTINATION p_rfc
EXPORTING
fi_date = update_start_date
TABLES
ft_0000 = lt_0000
ft_0001 = lt_0001
ft_0002 = lt_0002
ft_0006 = lt_0006
ft_0009 = lt_0009.
LOOP AT lt_0000 .
write : / lt_0000-pernr.
ENDLOOP.
endform.
‎2006 Dec 24 4:38 PM
HI Jim
Try it this way:
1. Just click on save in each program i.e zhr_update_hr_master_data, zhr_update_hr_master_data_top, zhr_update_hr_master_data_f01.
2. Now click on activate. In the popup window it gives the list of all programs to be activated, select all programs to activate.
Hope this way you can activate the main program...
Kind Regards
Eswar
‎2006 Dec 24 7:05 PM
Hello all ,
The issue has been resolved. There is a check box 'Unicode checks active' under Attributes of main program. I uncheck that check box, the main program is activated.
Again, thanks all for your help.
Jim