‎2008 Nov 17 12:08 PM
Hi,
If you could please help ...
I've created an INCLUDE program - Z01INIT - to be used in a dialogue program. I've added the INCLUDE z01init in the GLOBAL DATA.
When I activate Z01INIT I get the following error : Statement is not accessible -- line 6.
Z01INIT :
1 TABLES : z000.
2
3 DATA : wa_z000 TYPE z000.
4 *
4 **-Get default values
6 SELECT SINGLE * FROM z000 INTO wa_z000 WHERE werks_prod_veh > ''.
Dialogue program is UNICODE active.
Thanx !
‎2008 Nov 17 12:18 PM
Hi
You can declare all your data in the include Program.
Remove the select statement from the include and put this some other PBO module where you can actually do the validation.
I hope this anwers your question.
Regards
Neha
‎2008 Nov 17 12:12 PM
‎2008 Nov 17 12:15 PM
You commonly get this error when the code is placed after a FORM ....... ENDFORM. Check whether the INCLUDE is properly placed in a subroutine.
Just for your reference
[http://www.saptechnical.com/Tips/ABAP/StatementNotAccessible/Solution.htm]
‎2008 Nov 17 12:24 PM
Hi,
So if the fields that I declared in the INCLUDE is going to be used in 1001 subroutines I must add the select stamement to 1001 subroutines ?
‎2008 Nov 17 12:26 PM
Yes, the fields and the processing logic of the screen must be related. Please try it.
‎2008 Nov 18 10:41 AM
Thanx Neha & Avinash - your advice worked ! Much appreciated.
‎2008 Nov 17 12:16 PM
‎2008 Nov 17 12:18 PM
Hi
You can declare all your data in the include Program.
Remove the select statement from the include and put this some other PBO module where you can actually do the validation.
I hope this anwers your question.
Regards
Neha
‎2008 Nov 17 12:50 PM
Hi,
There is no problem ,
check the below code
tables : mara.
data : wa type mara.
select single * from mara into wa.
just retype the code what you have written.
regards
Kumar M