‎2007 Nov 19 6:40 AM
Dear All,
Below I am giving you the code, which I have got from one friend of mine. In this particular code you will see zseco. Now as its defined as 'Z'. So when I copied my program I also define zseco in se11 as a structure. But this program is not generating and showing the error "ZSECO" is not defined in the ABAP Dictionary as a table, projection view or database view. "
Can any body tell me what is wrong I am doing.
Regards,
Abhay.
**********************************************************************
**********************************************************************
tables:bseg.
data: it_bseg like bseg occurs 0 with header line.
data: it_zseco like zseco occurs 0 with header line.
selection-screen begin of block b1 with frame title text-001.
select-options:s_bukrs for bseg-bukrs,
s_gjahr for bseg-gjahr,
s_belnr for bseg-belnr.
selection-screen end of block b1.
start-of-selection.
perform get_data.
&----
*& Form get_data
&----
form get_data .
select *
from bseg into table it_bseg
where belnr in s_belnr and
bukrs in s_bukrs and
gjahr in s_gjahr.
if sy-subrc = 0.
loop at it_bseg .
move-corresponding it_bseg to it_zseco.
it_zseco-bupla_old = it_bseg-bupla.
it_zseco-zdate = sy-datum.
it_zseco-usernam = sy-uname.
it_zseco-ztime = sy-uzeit.
if it_bseg-bupla ne '1001'.
it_bseg-bupla = '1001'.
modify it_bseg.
endif.
it_zseco-bupla_new = '1001'.
append it_zseco.
clear it_zseco.
endloop.
modify bseg from table it_bseg.
modify zseco from table it_zseco.
message i000 with 'tables BSEG & ZSECO updated successfully'.
else.
message i000 with 'No data found'.
endif.
endform. " get_data
‎2007 Nov 19 6:45 AM
You defined ZSECO as a structure. Not as a Data base table.
modify zseco from table it_zseco.
This statement tells the system to UPDATE database table ZSECO. That's why u r getting error.
remove the statement or declare ZSECO as a DB table depending on requirement.
‎2007 Nov 19 6:45 AM
You defined ZSECO as a structure. Not as a Data base table.
modify zseco from table it_zseco.
This statement tells the system to UPDATE database table ZSECO. That's why u r getting error.
remove the statement or declare ZSECO as a DB table depending on requirement.
‎2007 Nov 19 6:46 AM
Hi,
Instead of using it as a structure define it as table in SE11 and check.
Regards,
Nagaraj
‎2007 Nov 19 6:47 AM
‎2007 Nov 19 6:50 AM
First of all do not use like any more, use type. Second to not use tables with header lines any more, use standard tables and working areas which are separated.
To your problem: If the compiler says he cant find your structure it is
- not defined
- not activated
Did you check the spelling O versus 0 ?
‎2007 Nov 19 6:51 AM
try this definition.
data: it_zseco <b>type</b> zseco occurs 0 with header line.
‎2007 Nov 19 6:52 AM
HI
ZSECO this as the TABLE in in SE11 so that your problem will solve