‎2008 Apr 16 10:06 AM
HI,
Need help on following.
in my program A :
DATA: BEGIN OF it_qlqua OCCURS 0.
INCLUDE STRUCTURE lqua.
DATA: altbatch TYPE ausp-atwrt,
v_verme TYPE kwmeng.
DATA: END OF it_qlqua.
INCLUDE zprogramB.
perform check_lqua tables it_lqua.
Program B:
DATA: BEGIN OF it_qlqua OCCURS 0.
INCLUDE STRUCTURE lqua.
DATA: altbatch TYPE ausp-atwrt,
v_verme TYPE kwmeng.
DATA: END OF it_qlqua.
DATA: v_skzua1 TYPE lagp_skzua,
v_skzue1 TYPE lagp_skzue,
v_skzsa1 TYPE lagp_skzsa,
v_skzse1 TYPE lagp_skzse,
v_skzsi1 TYPE lagp_skzsi,
v_lvorm1 type mch1-lvorm,
v_zustd1 type mch1-zustd,
v1_skzue1 TYPE lein_skzue,
v_zskzua1 TYPE lein_skzua,
v_spgru1 TYPE lvs_spgru,
v_statu1 type lein-statu.
FORM zcheck_lqua tables p_it_lqua structure IT_QLQUA.
..
...
ENDFORM.
Error I get :
when trying activate :
statement is not accessible !!
May i know what have i done wrong?
What is the correct way to pass internal table to a include file?
Thanks
‎2008 Apr 16 10:09 AM
‎2008 Apr 16 10:10 AM
before the perform check_lqua tables it_lqua.
try and use START-OF-SELECTION statement
‎2008 Apr 16 10:19 AM
error point to row INCLUDE zprogramb.
yes, the perform is after start-of-selection. i extract part of it to show...
any example of passing internal tables to include prog?
‎2008 Apr 16 10:25 AM
Hey Fren,
Try this,
PERFORM check_lqua in PROGRAM <program B>
TABLES it_lqua
Because you are calling the subroutine in Include Program...
‎2008 Apr 16 10:40 AM
Use START-OF_SELECTION after the statement
INCLUDE zprogramB.
ie,
INCLUDE zprogramB.
START-OF_SELECTION.
perform check_lqua tables it_lqua
Edited by: Rengith Skariah on Apr 16, 2008 11:41 AM
‎2008 Apr 16 10:45 AM
Hi,
I have made it into simple test but it still fail ?
report ztest_hl7.
include zallocation_check2.
DATA: num TYPE i VALUE 5,
fac TYPE i VALUE 0.
PERFORM fact USING num CHANGING fac.
WRITE: / 'Factorial of', num, 'is', fac.
-
&----
*& Include ZALLOCATION_CHECK2
&----
FORM fact
USING f_num TYPE i
CHANGING f_fact TYPE i.
f_fact = 1.
WHILE f_num GE 1.
f_fact = f_fact * f_num.
f_num = f_num - 1.
ENDWHILE.
ENDFORM.
error : statement is not accessible - refer to row perform fact ...
‎2008 Apr 16 10:52 AM
Hi,
when ever u get this error just click on the change button(the middle button in the error display part) it will take u to one line.just before that line place START-OF-SELECTION.then ur error will be rectified.
rgds,
bharat.
‎2008 Apr 16 11:01 AM
Hi,
You are calling the routine check_lqua tables it_lqua in the program A and the definition is in program B. You are called the program B be fore the perform. It is wrong way. You have to include the program after the perform statement.
syntax in program A.
perform check_lqua tables it_lqua.
INCLUDE zprogramB.
Reward if helpful.