‎2007 Sep 11 1:55 PM
Dear Sir,
I Have One Issue That in My Internal Table Same VBELN(Keyfield)Field Has Three Different Rows Conating There Diiferent Data. I want The Three Rows Should Be Insert In database Table With Specified Key(VBELN).
Can Anybody Help me...
internal table coming in folowing format--
VBELN matnr maktx meins
123 hghjfd hfg kg
123 iotuyt jki pc
123 9867ii bnm pc
I want All Rows should be saved in database ztable ..
what is sql queries i have written...plz help me...
‎2007 Sep 11 2:32 PM
Hi,
You can not insert the duplicate record in the table with the same primary key.
If you want to insert multiple rows in the database having same value of VBLEN, then dont mark that field as a key.
The syntax of sql is something like this.
insert <table_name> from table <itab_name>.
Hope this will help you.
~ Ramanath.
‎2007 Sep 11 2:38 PM
Hi,
If the DB table has VBELN as the only key field(other than MANDT) then you cannot do that.
If it has some other key field as well then you can do so by using INSERT statment.
INSERT <DB tablename> from <internal table name>
<b><REMOVED BY MODERATOR></b>
Regards,
Amit
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 11 9:40 PM
You'll have to change the table to include MATNR as well as VBELN as the primary key.
Rob