‎2007 Oct 04 7:01 AM
hi al,,
i am updating my database table by internal table.
but its giivng me a error"""
"ie..the workarea internal table is not long enough?
can u give me a relevant answer?
thnkx
bhanu
‎2007 Oct 04 7:04 AM
Hi ,
The work area u created is not correct,
Try to create a work area using types statement
example: types: begin of ty_w,
matnr type mara-matnr,
end of ty_w.
then create a workarea.
i.e data: wa_work type ty_w.
as u might be declaring workarea right from table ie
example wa_work type databasetable
so the porblem is coming.
regards,
Santosh Thorat
‎2007 Oct 04 7:03 AM
Hi,
Declare work area & internal table same as the Database table
data : watab type ztable,
itab type standard table of ztable.
************
DATA scarr_wa TYPE scarr.
scarr_wa-carrid = 'FF'.
scarr_wa-carrname = 'Funny Flyers'.
scarr_wa-currcode = 'EUR'.
scarr_wa-url = 'http://www.funnyfly.com'.
INSERT INTO scarr VALUES scarr_wa.
Best regards,
Prashant
‎2007 Oct 04 7:04 AM
hi,
when are you getting this error.
can i know which table you are updating.
first try updating single record from selection screen parameters..
then go for the whole it_table.
‎2007 Oct 04 7:04 AM
Hi ,
The work area u created is not correct,
Try to create a work area using types statement
example: types: begin of ty_w,
matnr type mara-matnr,
end of ty_w.
then create a workarea.
i.e data: wa_work type ty_w.
as u might be declaring workarea right from table ie
example wa_work type databasetable
so the porblem is coming.
regards,
Santosh Thorat
‎2007 Oct 04 7:05 AM
Hi Bhanu,
Your internal table and workarea structure should be exactly same as that of database table. Please check this.
Regards,
Archana
‎2007 Oct 04 7:06 AM
Hi Bhanu..
The internal table / Work area must have the Same structure as the DB table.
Then only we can INSERT the records.
So check this Eg:
DATA it_carr TYPE table of scarr with header line.
it_carr-carrid = 'XX'.
it_carr-carrname = 'Test Airline'.
it_carr-currcode = 'INR'.
append it_carr
INSERT SCARR from table IT_CARR accepting duplicate keys.
REWARD IF HELPFUL.