禁止表中重复的条目 [英] Suppress duplicated entries in a table

查看:195
本文介绍了禁止表中重复的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在古典(写入)和ALV报告中抑制重复条目?我有一个任务写一个简单的报告与这个标准。
我试图google,但是无法成功与他们的任何解决方案,需要帮助。以下是预期的结果。

How do i suppress duplicate entries in both classical (write) and ALV report? I was given a task to write a simple report with this criteria. I tried to google but could not succeed with any of their solutions and need help. Below is the expected result.

原始报告:

--------------------------------------
|Sales Org | Dist.Channel | Division | 
--------------------------------------
|1000      |10            |00        |
|1000      |10            |00        |
|1000      |10            |00        |
|1020      |22            |00        |
|1020      |22            |00        |
--------------------------------------

预期输出:

--------------------------------------
|Sales Org | Dist.Channel | Division |
--------------------------------------
|1000      |10            |00        |
|          |              |          |
|          |              |          |
|1020      |22            |00        |
|          |              |          |
--------------------------------------

需要帮助。谢谢。

推荐答案

p>假设您正在使用内部表来存储要显示的数据,则可以使用从itab中删除相似的重复输入

Assuming you are using an internal table to store data that is going to be displayed, you can use DELETE ADJACENT DUPLICATE ENTRIES FROM itab.

对于ALV网格,您必须使用内部表。对于WRITE语句,即使您直接从数据库表中读取,也可以缓冲内部表中的条目,使用上述语句删除重复项,然后从内部表中显示结果。

For ALV grid you have to use an internal table. For WRITE statement, even if you read directly from a database table you can buffer the entries in an internal table, use the above statement to delete duplicates and then display results from internal table.

问候,
Sergiu

Regards, Sergiu

这篇关于禁止表中重复的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆