Application Development 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: 

Insert statement is not working for z table.

Former Member
0 Kudos

Hi experts,

My insert statement is not working.

I have used follwing code to update z table .

INSERT ztable FROM TABLE gt_table.

here i have checked gt_table and its filled up with all the records properly.

now the problem is in this table i have 15 fields and it inserts 14 fields of it but

the last field is never inserted though in gt_table i can see value for last fields also.

I have added this field in ztable recently . so i also used se14 to adjust table but still i am facing same problem.

please help me out.

thanks,

Neo

18 REPLIES 18

former_member200338
Active Contributor
0 Kudos

Hi,

Have you enabled table maintaince generator? if not please enable it and re generate the screen.

it will work.

Regards,

Niyaz

Former Member
0 Kudos

Did you regenerate the table maintenance as well, if there is one?

0 Kudos

Table maintainance will have nothing to do with this issue.

0 Kudos

> Table maintainance will have nothing to do with this

> issue.

It does sometimes when you are trying to see the values from SM30 instead of SE16. The value may be there, but it may just not seen in SM30 because the table maintenance hasn't registered the addition of new field.

Another place to look at is the activation log to see if there are any warnings issued there.

0 Kudos

> > Table maintainance will have nothing to do with

> this

> > issue.

>

> It does sometimes when you are trying to see the

> values from SM30 instead of SE16. The value may be

> there, but it may just not seen in SM30 because the

> table maintenance hasn't registered the addition of

> new field.

>

> Another place to look at is the activation log to see

> if there are any warnings issued there.

You shouldn't use SM30 to view table entries. You use this transaction to maintain the table entries. Pure and Simple.

Former Member
0 Kudos

Try to use statement:

INSERT INTO <dbtable> VALUES <inttable>

Also, check SY-SYBRC EQ 0 and then use COMMIT WORK statement.

Thanks,

SKJ

former_member194669
Active Contributor
0 Kudos

Hi,

1. Check the last field name is as fieldname in ztable

use Modify instead of Insert

MODIFY ztable FROM TABLE gt_table.

Former Member
0 Kudos

Adjust the database as well using the utility is SE11

Former Member
0 Kudos

Try deleting all the records from the ZTABLE and try once again. goto se14 and delete the records

Thanks

Mahesh

Former Member
0 Kudos

Hi neo,

1. How is your gt_table declared?

2. Make sure it is declared exactly like database table ZTABLE.

eg.

data : gt_table type table of ztable.

regards,

amit m.

Former Member
0 Kudos

Thanks for your input.

but i have created table maintainance again.

I also did table adjustment .

but still i am facing same problem.

Thanks,

Neo

0 Kudos

What is the new field type? Also how is gt_table defined? Is this a normal program or is it part of some RFC code?

Former Member
0 Kudos

hi experts,

New field is division i have defined it using data element SPART.

gt_table is same as table in which i am going to insert.

thanks,

Neo

0 Kudos

Hi Neo,

Can you please answer the last part of my question? Is this code part of a RFC or a regular program? Also did you check the activation log of the table and is there anything that raises a red flag?

Former Member
0 Kudos

Hi experts,

THis code is in one function module and itsRFC enable.

thanks,

Neo

Former Member
0 Kudos

Hi experts,

There is no error when i activate this table.

thanks,

Neo

0 Kudos

Ok, there is an issue with RFCs recognizing changes done to repository objects (program as well as table). They keep the old version of the object buffered. In order to have them recognize the latest changes to the code or the tables etc, you will need the external connection to be reset and basically connect again. That way the latest definitions are uploaded.

The same function module, if you try it from SE37, or from a program within the system, it should work.

Former Member
0 Kudos

hi experts,

sorry i don't understand your question.

i am using this function module seperately for testing purpose.

still its not working.

thanks,

Neo