SAP ABAP ALV报告填补文档之间的空白 [英] sap abap alv report fill gap between documents

查看:153
本文介绍了SAP ABAP ALV报告填补文档之间的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图挑战自己,制作一份按公司代码显示所有数据的ALV报告。但某些文件编号有空白。

I was trying to challenge myself to make an ALV report that displays all the data by company code. but some document number has a gap.

我想填补缺失的数字之间的空白

I want to fill the gap between missing number

例如:

最后一个索引值:20012
,然后下一个值是:20014

last index value: 20012 then next value is: 20014

如果报告如何在网格中插入20013是使用内部表中存在的所有数据吗?

How do I able to insert 20013 in the grid if the report is using all the data that exist in internal tables?

谢谢。

推荐答案

这只是盲文输入,但我希望您能够理解它……应该非常简单。除非您甚至都不提供任何代码,否则不要期望完整的代码。

This is just blind text typing, but I hope you are able to understand it ... should be quite simple. Dont expect complete code, unless your are not even providing ANY code.

DATA: lv_current type i,
      lv_next type i.

SORT lt_internalTable by BUKRS ascending.

LOOP AT lt_internalTable into ls_internalTable.
MOVE sy-tabix to lv_current.
READ TABLE lt_internalTable into ls_tempinternalTable INDEX sy-tabix + 1.
MOVE sy-tabix to lv_next.

IF (lv_next - lv_current) > 1.
 ... do your stuff
ENDIF.

CLEAR: ls_internalTable, lv_current, lv_next.
ENDLOOP.

这篇关于SAP ABAP ALV报告填补文档之间的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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