11-07-2007 5:54 AM
I want to delete all existing records of a ZTABLE every time one program is executed and new records will be inserted.
I used DELETE <TABLENAME>. But it is not working.
11-07-2007 5:58 AM
Hi,
Try like this
DELETE FROM ztable CLIENT SPECIFIED WHERE mandt EQ sy-mandt.
Reward if helpful.
Regards,
Nagaraj
11-07-2007 5:58 AM
Hi
Press F1 on the DELETE statement and take the correct command syntax and use like
DELETE table <name> from ITAB.
Regards
Anji
11-07-2007 5:58 AM
Hi,
Delete Z-TABLE from TABLE itab.
==================================================
PARAMETERS p_carrid TYPE sflight-carrid.
TYPES: BEGIN OF sflight_key,
mandt TYPE sflight-mandt,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
END OF sflight_key.
DATA sflight_key_tab TYPE TABLE OF sflight_key.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE sflight_key_tab
WHERE carrid = p_carrid AND
fldate = sy-datum AND
seatsocc = 0.
DELETE sflight FROM TABLE sflight_key_tab.
regards,
Omkar.
11-07-2007 5:58 AM
11-07-2007 5:58 AM
hi,
first extract all the data from data base table in to internal table itab.
then use this statement
DELETE dbtab FROM TABLE itab
regards
siva
11-07-2007 5:59 AM
11-07-2007 5:59 AM
11-07-2007 6:03 AM
Hi
Delete Z-TABLE from TABLE itab.
==================================================
PARAMETERS p_carrid TYPE sflight-carrid.
TYPES: BEGIN OF sflight_key,
mandt TYPE sflight-mandt,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
END OF sflight_key.
DATA sflight_key_tab TYPE TABLE OF sflight_key.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE sflight_key_tab
WHERE carrid = p_carrid AND
fldate = sy-datum AND
seatsocc = 0.
DELETE sflight FROM TABLE sflight_key_tab.
Regards
Pavan
11-07-2007 6:03 AM
Hi,
before insert the new data, check the ZTABLE, select all data. if record is found then delete all the old records & refresh the same, after that u can insert ur new records.
Or u can do one more thing. create one new field in ztable say mark for deletion.
before new data insertion, select all existing record & update the new field as X. and after new records insertion update the new field as blank.
if it is helpfull pls reward pts.
Regards
Srimanta
11-07-2007 6:04 AM