Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 993

Deleting Internal table based on condition

$
0
0

Hi,

 

I am kinda stuck in the process of Deleting the Internal table which contains many duplicates.

 

Here is the brief overview of it.

 

Record: 1,  Vendor Number - 00123456, Invoice Number-ABCD, Invoice Amount -$20,000, Invoice Date-12/15/2015 DTYPI: X


Record:2.  Vendor Number - 00123456, Invoice Number-ABCD, Invoice Amount -$20,000, Invoice Date-12/15/2015 DTYPC: X


Record:3. Vendor Number - 00123456, Invoice Number-ABCD, Invoice Amount -$20,000, Invoice Date-12/15/2015


$20,000 - $20,000 + $20,000 = $20,000 Invoice posted


Here Internal table is having 3 records. Record 1,2 and 3.

All 3 records having same entries, but record 1 is having DTYPI and record 2 is having DTYPC.

I need to delete record 1 and record 2 comparing vendor Number, invoice number, invoice amount and invoice date are same and if record 1 having DTYPI = X and record 2 is having DTYPC = 'X',  then Record 1 and record 2 need to be delete from internal table and an internal table should have Record 3 only.


I did so many loops and couldn`t able to achieve it.


Please give me an idea about this.


BR,

EH


Viewing all articles
Browse latest Browse all 993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>