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

data base update..

Former Member
0 Likes
772

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
739

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

5 REPLIES 5
Read only

Former Member
0 Likes
739

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

Read only

Former Member
0 Likes
739

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.

Read only

Former Member
0 Likes
740

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

Read only

Former Member
0 Likes
739

Hi Bhanu,

Your internal table and workarea structure should be exactly same as that of database table. Please check this.

Regards,

Archana

Read only

varma_narayana
Active Contributor
0 Likes
739

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.