‎2005 Nov 10 2:51 PM
Hi,
I want to insert two values into a custom table...Can't I say
INSERT INTO TAB VALUES X,Y.
I get the error
"Comma without preceding colon (after INSERT ?)"
why ??
thanks
‎2005 Nov 10 2:58 PM
‎2005 Nov 10 2:56 PM
Hi,
Use Update SET
UPDATE sflight SET seatsocc = seatsocc + 3
carrid = 'LH'
WHERE
connid = '0400' AND
fldate = '20010228'.
or ;
INSERT <Custom Database table>btab FROM TABLE <internal table>.
Message was edited by: Lanka Murthy
Message was edited by: Lanka Murthy
‎2005 Nov 10 2:58 PM
‎2006 Jan 10 12:33 PM
Hello Guru's!!
I want to Insert the TABLE values of two Internal tables of Different Business Units...(Bu_zknvh & Au_Zknvh) into table Zknvh
Currently following is the CODE.. but I cant see both the Business Units data at once in the TABLE..
*... Insert Zknvh from Bu_zknvh..................
INSERT ZKNVH FROM TABLE BU_ZKNVH.
MESSAGE I002(ZM) WITH TEXT-006 SY-DBCNT.
IF SY-SUBRC <> 0 OR BU IS INITIAL.
ROLLBACK WORK.
MESSAGE E001(ZM) WITH TEXT-003.
ELSE.
COMMIT WORK.
ENDIF.
For this second internal table
I have tried using the code ..
insert into Zknvh values au_zknvh
but it inserts only one ROW.... I want to append this table with all the values of au_zknvh but it shows me an ERROR MESSAGE:: ZKNVH is not an INTERNAL TABLE ..
*... Insert ZKNVH from Table Au_zknvh...............
INSERT zknvh From table au_zknvh.
MESSAGE i002(zm) WITH text-006 sy-dbcnt.
IF sy-subrc <> 0 OR bu IS INITIAL.
ROLLBACK WORK.
MESSAGE e001(zm) WITH text-003.
ELSE.
COMMIT WORK.
ENDIF.
Please help me Thanx in advance
Preethu
‎2006 Jan 10 2:56 PM
Hi,
when u write the code 'insert into Zknvh values au_zknvh',it the gets the value from workarea(header) and inserts into the table,so only one value will be updated.
'INSERT zknvh From table au_zknvh' is the correct option to insert the data from internal tables.If still only one value is updated,then check the contents in the internal table
Cheers,
AN
‎2006 Jan 10 3:23 PM
Hi.. I dont know why if I use
'INSERT zknvh From table au_zknvh' this statement I am not getting the correct records.. but if I use 'insert into Zknvh values au_zknvh' as you said I am getting only one Record but correct one..
Cheers..
Preethu
‎2005 Nov 10 2:58 PM
Hi Rad,
if you use insert statement with values addition it expects only one parameter (Only x or y in your case).
and X or y must be of the same structure of the table.
Moreover it creates only one record
If you want multiple records to be inserted,
then use
INSERT dbtab FROM TABLE itab.
that itab should be having the same structure as the table with as many records as you want.
Regards,
Ravi