当前位置:网站首页>ABAP 动态内表分组循环
ABAP 动态内表分组循环
2022-07-06 21:20:00 【慘綠少年】
在ABAP中使用动态内表分组循环时,如果直接at end of 或group by 会报错。
At end of :
LOOP AT <dy_table> ASSIGNING <dyn_wa>.
AT END OF belnr.
ENDAT.
ENDLOOP.
Group by:
LOOP AT <dy_table> ASSIGNING <dyn_wa> GROUP BY ( belnr = <dyn_wa>-belnr ) ASCENDING ASSIGNING FIELD-SYMBOL(<group>).
ENDLOOP.
这样是因为<dyn_wa>是通用类型,只有assignging后才有类型。
解决方法:
LOOP AT <dy_table> ASSIGNING <dyn_wa>.
ASSIGN COMPONENT 'BELNR' OF STRUCTURE <dyn_wa> TO <fs_belnr>.
AT END OF <fs_belnr>.
ENDAT.
ENDLOOP.
亲测有效。
边栏推荐
- [MySQL] row sorting in MySQL
- Ubuntu 20 installation des enregistrements redisjson
- C# Task拓展方法
- Leetcode: interview question 17.24 Maximum cumulative sum of submatrix (to be studied)
- Clock in during winter vacation
- 三重半圆环进度条,直接拿去就能用
- [leetcode] 700 and 701 (search and insert of binary search tree)
- About Estimation Statistics
- Open3d mesh filtering
- Force buckle ----- path sum III
猜你喜欢
10 ways of interface data security assurance
海思万能平台搭建:颜色空间转换YUV2RGB
List interview common questions
Tflite model transformation and quantification
Tencent cloud native database tdsql-c was selected into the cloud native product catalog of the Academy of communications and communications
Baidu map JS development, open a blank, bmapgl is not defined, err_ FILE_ NOT_ FOUND
代码质量管理
1200.Minimum Absolute Difference
qt-线程等01概念
VHDL implementation of arbitrary size matrix addition operation
随机推荐
Create commonly used shortcut icons at the top of the ad interface (menu bar)
2022夏每日一题(一)
HW-小记(二)
Codeworks 5 questions per day (1700 average) - day 7
数据的存储
MySQL storage engine
[leetcode] 700 and 701 (search and insert of binary search tree)
Introduction to opensea platform developed by NFT trading platform (I)
[MySQL] row sorting in MySQL
QT item table new column name setting requirement exercise (find the number and maximum value of the array disappear)
[safe office and productivity application] Shanghai daoning provides you with onlyoffice download, trial and tutorial
Redis configuration and optimization of NoSQL
ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed directly
红米k40s root玩机笔记
Huawei and Xiaomi "copy each other"
My brave way to line -- elaborate on what happens when the browser enters the URL
Hongmi K40S root gameplay notes
NoSQL之Redis配置与优化
SQL injection -day15
史上最全学习率调整策略lr_scheduler