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: 

Select query for Inserting/Updating/ deleting

Former Member
0 Kudos

Hi All ,

Can u plz give me the select query for the :

Inserting/Updating/ deleting the records from database table from the Internal table .

regards

10 REPLIES 10

Former Member
0 Kudos

Hi Sharma,

From the ABAP Editor, just type the SELECT keyword and hit F1. You will get all the information you would need.

Regards,

Anand Mandalika.

Former Member
0 Kudos

Hi

inserting

WHEN 'CRT'.

SELECT SINGLE * FROM ZNNR INTO ZNNR WHERE EMPID = ZNNR-EMPID.

IF SY-SUBRC = 0.

MESSAGE E999 WITH TEXT-001.

ENDIF.

*IF SY-SUBRC <> 0.

INSERT INTO ZNNR VALUES ZNNR.

COMMIT WORK AND WAIT.

CLEAR ZNNR.

Former Member
0 Kudos

Hi updating or modifying

  • Modify the database table as per new dunning procedure

MODIFY fkkvkp FROM TABLE lt_fkkvkp .

Former Member
0 Kudos

Hi,

INSERT dbtab FROM TABLE itab.

MODIFY dbtab FROM TABLE itab.

DELETE dbtab FROM TABLE itab.

UPDATE dbtab FROM TABLE itab.

Thanks and Best Regards,

Vikas Bittera.

Former Member
0 Kudos

Hi Sharma

Just write

insert update delete and press F1 key

update ztable from table itab.

delete ztable from table itab.

reward points to all helpful answers

kiran.M

0 Kudos

Hi ,

when I am trying to insert record database table zco_addresses I am getting

The work area "T_ZCO_ADDRESSES" is not long enough .

Please help me out ???

SELECT adr_kind

vtref

addrnumber

addr_valid_from

addr_valid_to

FROM zco_addresses

INTO TABLE t_zco_addresses

WHERE adr_kind = address-adr_kind

AND addrnumber = address-addrnumber

AND addr_valid_from = address-addr_valid_from

AND addr_valid_to = address-addr_valid_to.

INSERT zco_addresses FROM TABLE t_zco_addresses ACCEPTING DUPLICATE KEYS.

0 Kudos

Hi,

The sturcture of the work area or the internal table that you are using to update/modify/insert or delete should be same as the database table..

Thanks and Best Regards,

Vikas Bittera.

0 Kudos

Hi Sharma

use this one

data: t_zco_addresses type standard table of zco_addresses.

reward points to all helpful answers

kiran.M

Former Member
0 Kudos

hi,

for select st:

select * from mara into table itab where matnr in s_matnr. /// itab is internal table with header line and s_matnr is a select option.

for update.

itab-fld1 = ' suresh'.

..........

.......

UPDATE zstud FROM TABLE itab. // zstud is a database table and itab isa internal table

modify:

similar to update.

delete:

delete zstud from itab.

insert:

INSERT zstud FROM TABLE itab. // here for insert, delete, modify and update u can use index option to specify arecord if ur sure abut where that record exists.

if helpful reward some points.

with regards,

suresh aluri.

Former Member
0 Kudos

solvd