‎2009 Apr 13 6:15 AM
Hi Friends.
p_i_zproj TYPE ty_i_zproj.
ty_i_zproj TYPE TABLE OF zproj_cost.
-
> INSERT zproj_cost FROM table p_i_zproj.
COMMIT WORK.
I got a following dump to execute the insert query.
-
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
Thanks & Regards,
Vallamuthu.M
‎2009 Apr 13 6:31 AM
1) This error you get when you are updating records which already exists(Key fields exists).SO try using:
Accepting Duplicate Keys addition with Insert statement.
2) Check the structure on the internal table you are uploading.
Regards,
Gurpreet
‎2009 Apr 13 6:26 AM
Hi,
INSERT zproj_cost FROM table p_i_zproj.
in above statement p_i_zproj is considered as work area not an internal table. So try after declare it is an internal table.
‎2009 Apr 13 6:29 AM
Its not a work area, i used that syntax also bot it shows the error "its not a work area"
‎2009 Apr 13 6:31 AM
1) This error you get when you are updating records which already exists(Key fields exists).SO try using:
Accepting Duplicate Keys addition with Insert statement.
2) Check the structure on the internal table you are uploading.
Regards,
Gurpreet
‎2009 Apr 13 7:14 AM
INSERT zproj_cost FROM TABLE p_i_zproj ACCEPTING DUPLICATE KEYS.
but i got got the same error.
‎2009 Apr 13 7:27 AM
Just check the structure you are using,Check the sequence of the fields in internal table and Ztable.
Just debug and check the format of data that your internal table is Holding at runtime.
Regards,
Gurpreet
‎2009 Apr 13 7:30 AM
Hi Madheswaran,
because of the duplicate entrins of the same KEY its getting dump
so instead of INSERT use the MODIFY satement.
of if you want use the INSERT you have use the "ACCEPTING DUPLICATE" as well for not getting dump.
Thanks!
‎2009 Apr 13 9:44 AM
Hi,
Could you try with following logic:
types: ty_zproj type zproj_cost.
data: wa_zproj type ty_zproj,
it_zproj type standard table of ty_zproj.
INSERT zproj_cost FROM wa_zproj. "For single record
or
INSERT zproj_cost FROM TABLE it_zproj. "Mass insert
If key fields are duplicating, then add extention 'ACCEPTING DUPLICATE KEYS' which is not advisable.
By using MODIFY statement rather than INSERT, new values will be updated is key fields exist. Otherwise new record will be created in table.
Regards,
Prasanth
‎2009 Apr 13 10:05 AM
Hi Vallamuthu,
I guess there is structure mismatch between zproj_cost and p_i_zproj.
Regards,
Jaya rama kumar
‎2009 Apr 13 12:05 PM
‎2009 Apr 14 9:56 AM
Hi,
It may be because of duplicate entries or might be due to structure mismatching.
Try it by declaring it as TYPE STANDARD TABLE and use MODIFY instead of INSERT.
Regards
‎2009 May 20 9:53 AM