SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Удаление дубликатов



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Gleb
Участник
Участник



Joined: 18 Jan 2008
Posts: 32

PostPosted: Fri May 16, 2008 9:53 am    Post subject: Удаление дубликатов Reply with quote

Привет!
Внутренняя таблица содержит значения

Code:
  VBELN        FBUDA      VGBEL        AUBEL

  4000009885   01.01.2007 1000006529   0000010282
  4000009886   01.01.2007 1000006529   0000010282
  4000009886   00.00.0000 1000006529   0000010282
  4000009888   01.01.2007 1000006530   0000010284
  4000009888   00.00.0000 1000006530   0000010284
  4000009890   09.01.2007 1000006536   0000010290
  4000009891   09.01.2007 1000006537   0000010291
  4000009892   15.01.2007 1000006540   0000010299
  4000009894   00.00.0000 1000006541   0000010300
  4000009895   17.01.2007 1000006542   0000010303


Если встречается строка с FBUDA = 0, нужно удалить эту строку и все строки с таким же VBELN.
Как мне сделать, чтобы остались.

Code:
  4000009885   01.01.2007 1000006529   0000010282
  4000009890   09.01.2007 1000006536   0000010290
  4000009891   09.01.2007 1000006537   0000010291
  4000009892   15.01.2007 1000006540   0000010299
  4000009895   17.01.2007 1000006542   0000010303
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Fri May 16, 2008 10:07 am    Post subject: Reply with quote

К примеру, сперва в цикле создать рейндж для VBELN по условию FBUDA = 0, а потом сделать DELETE ... WHERE VBELN IN range.
Back to top
View user's profile Send private message Blog
cbw07
Старший специалист
Старший специалист



Joined: 30 Nov 2007
Posts: 127

PostPosted: Fri May 16, 2008 1:57 pm    Post subject: Reply with quote

А может сразу в SELECT при создании таблицы поставить условие, чтобы FBUDA было больше чего-то?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.