Skip to Content
avatar image
Former Member

Insert statement is not working for z table.

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

12 Answers

  • avatar image
    Former Member
    Aug 21, 2007 at 03:46 PM

    Hi,

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

    it will work.

    Regards,

    Niyaz

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2007 at 03:47 PM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Srinivas Adavi

      > > 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.

  • avatar image
    Former Member
    Aug 21, 2007 at 03:48 PM

    Try to use statement:

    INSERT INTO <dbtable> VALUES <inttable>

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

    Thanks,

    SKJ

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2007 at 03:48 PM

    Hi,

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

    use Modify instead of Insert

    MODIFY ztable FROM TABLE gt_table.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 03:49 PM

    Adjust the database as well using the utility is SE11

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 03:50 PM

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

    Thanks

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 03:55 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:49 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 06:56 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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?

  • avatar image
    Former Member
    Aug 21, 2007 at 08:28 PM

    Hi experts,

    THis code is in one function module and itsRFC enable.

    thanks,

    Neo

    Add comment
    10|10000 characters needed characters exceeded