‎2009 Feb 20 10:06 AM
Hi All,
iam writing the following code in the include in VOFM it is giving an error of "Statement is not accessible"
how shall i write the code so that message has to create or not it will deceide.
DATA: it_zmail TYPE STANDARD TABLE OF zmail ,
wa_zmail TYPE zmail,
it_KOMKBEA type KOMKBEA.
* select * from zmail into t_zmail
sy-subrc = 4.
if t_zmail [] is initial.
if wa_zmail-ekgrp = KOMKBEA-EKGRP and
wa-zmail-bsart = KOMKBEA-bsart.
sy-subrc = 0.
endif.
endif.
Best Regards,
Oorvi
‎2009 Feb 20 10:10 AM
Hi,
Hope it should be into table .
DATA: it_zmail TYPE STANDARD TABLE OF zmail ,
wa_zmail TYPE zmail,
it_KOMKBEA type KOMKBEA.
select * from zmail into table t_zmail .( See the change )
sy-subrc = 4.
if t_zmail [] is initial.
if wa_zmail-ekgrp = KOMKBEA-EKGRP and
wa-zmail-bsart = KOMKBEA-bsart.
sy-subrc = 0.
endif.
endif.
‎2009 Feb 20 10:14 AM
hi srree thanks for ur reply but till it's showing the same error.
‎2009 Feb 20 10:14 AM
Hi,
The problerm is with the Select statement, when inserting data into internal table you should write INTO TABLE it_data.
The code which you specified in the post is not getting error, may be getting some where.
If your program has Subroutines, may be you are processing some logic after FORM ....ENDFORM statements. Check that.
Regards,
Sunil
Edited by: Sunil Reddy Sibbala on Feb 20, 2009 11:18 AM
‎2009 Feb 20 10:21 AM
the select stat is coomented if u see properly.
ok .
now i made it as u sujjested even though the same error.
what u think now?
DATA: it_zmail TYPE STANDARD TABLE OF zmail ,
wa_zmail TYPE zmail,
it_KOMKBEA type KOMKBEA.
select * from zmail into table t_zmail
sy-subrc = 4.
if t_zmail [] is initial.
if wa_zmail-ekgrp = KOMKBEA-EKGRP and
wa-zmail-bsart = KOMKBEA-bsart.
sy-subrc = 0.
endif.
endif.
‎2009 Feb 20 10:33 AM