Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error in vofm routine include?

Former Member
0 Likes
1,062

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

5 REPLIES 5
Read only

Former Member
0 Likes
755

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.

Read only

0 Likes
755

hi srree thanks for ur reply but till it's showing the same error.

Read only

Former Member
0 Likes
755

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

Read only

0 Likes
755

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.

Read only

0 Likes
755

any one there to solve my problem?