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: 

how to delete record

Former Member
0 Kudos

hi

there is a record in internal table as below

210 |0000000110|AGILENT TECHNOLOGIES <TEST1 <

210 |0000000110|AGILENT TECHNOLOGIES <TEST2 <

210 |0000000110|AGILENT TECHNOLOGIES <TEST3 <

210 |0000000110|AGILENT TECHNOLOGIES <TEST4TOTEST5 <

and there are recored in table having all fields as primary key ie it has these above 3 fields as primary key and record is like t his

210 |0000000110|AGILENT TECHNOLOGIES <TEST1 <

210 |0000000110|AGILENT TECHNOLOGIES <TEST2 <

210 |0000000110|AGILENT TECHNOLOGIES <TEST3 <

<b>210 |0000000110|AGILENT TECHNOLOGIES <TEST4 <</b>

210 |0000000110|AGILENT TECHNOLOGIES <TEST4TOTEST5 <

i want to delted the bolded r ecored ie test 4 and when i am using the below statement

delete from zcustemail

where ship_to = t_zcust_em-ship_to

AND SHIP_TO_NAME = t_zcust_em-ship_TO_NAME

ANd EMAIL_ID <> t_zcust_em-EMAIL_ID.

it is not working fine

pls suggest how to delte the recroed which are not in the internal table...

regards

Arora

6 REPLIES 6

Former Member
0 Kudos

write a select query on the table into itab1...select all the related records...

now loop at this itab1...cross check with original ITAB...

(with READ statement)

if record does not exist in ITAB.. then delete that record from DDIC Table

0 Kudos

hi sharayu

didnt get u please eloborate i already paste the code as above tell me how to use or modify it

table fields are

ship_to primary key

ship_to_name primary key

email_id primary key

please eloborate and please provide me the code

regards

Arora

Former Member
0 Kudos

i think ship_to is 110 at run time.you try to make that to 0000000110.debug and check it.

0 Kudos

hi velu

this is not the case

i am not asking for problem i am just asking for code how to delte thats all

regards

nishant

0 Kudos

Try this .,.

just write.,.,

take 3 variables

w_a = t_zcust_em-ship_to

w_b = t_zcust_em-ship_TO_NAME

w_c = t_zcust_em-EMAIL_ID

delete from zcustemail

where ship_to = w_a

AND SHIP_TO_NAME = w_b

ANd EMAIL_ID <> w_c.

regards

Debasish

Message was edited by:

Debasish Das

Former Member
0 Kudos

opened new thread