Application Development and Automation 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: 
Read only

how to delete record

Former Member
0 Likes
869

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

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
Read only

Former Member
0 Likes
838

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

Read only

0 Likes
838

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

Read only

Former Member
0 Likes
838

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

Read only

0 Likes
838

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

Read only

Former Member
0 Likes
838

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

Read only

Former Member
0 Likes
838

opened new thread