2017-06-10
I tried to implement this small and simple feature first:
How it works currently?
I use report CRM_BW_READ_DATA in QHD/504 for demonstration.
Check these two SAT traces:
In the local RFC execution, most of the time ( 0.7 second) is spent on
from SAP help:
The data displayed in an interactive report depends on the user's position within the organizational model. For example, the reports of a sales employee only contain data for opportunities for which he or she is responsible. However, a manager can see data for all opportunities for which the sales employees in the manager's organizational unit are responsible.
check whether the current user is manager:
The previous two selection are enriched as : 2 original fields + 85 fields from other BP = 87 fields in the end:
the selection fields continues to be enriched by some hard code filter:
In the end this Interactive report read still consists of two steps:
(1) read guid from CRMD_ORDER_INDEX:
CRMD_ORDER_INDEX~PARTNER_NO IN ('0000400105', '0000415143', '0000415872', '0000415893', '0000415961', '0000416631', '0000416721', '0000416746', '0000417016', '0000417054', '0000417058', '0000417093', '0000417672', '0000417681', '0000417740', '0000417865', '0000418050', '0000418597', '0000418812', '0000420391', '0000420441', '0000420752', '0000420873', '0000420881', '0000420882', '0000420925', '0000420932', '0000420935', '0000420955', '0000421055', '0000421094', '0000421316', '0000421721', '0000421722', '0000421724', '0000422264', '0000422404', '0000422419', '0000422483', '0000422765', '0000422893', '0000423049', '0000423059', '0000423060', '0000423061', '0000423062', '0000423063', '0000423064', '0000423065', '0000423067', '0000423142', '0000423555', '0000424451', '0000424467', '0000424840', '0000700364', '0000703460', 'ARPANA', 'BAKER', 'BOUWHUIS', 'BUSCHC', 'CRMAUTOTST', 'CRMSUPPORT', 'D019666', 'D031132', 'D032824', 'DIGGS', 'DUMANN', 'FREEMAN', 'KING', 'KRATZN', 'KRUSE', 'LONDON', 'LUCKINSE', 'MILLER', 'MYERS', 'PORTALCHM', 'RYZHOVA', 'SCHULZ', 'SCHUPPM', 'SHRAMASUM', 'WANGJ', 'WANGJ', 'WHITE', 'WILSON', 'ZELLERSU') AND
(2) Read other report data using these queried GUID from corresponding buffer table:
Then I search key word "number of open" in SD Analytic package:
And found out how they achieve it:
So I create a view accordingly:
And this is our cube view:
tested in QGS/300:
read it via OPEN SQL: CRMS4_BW_PRINT_ORDER_NUMBERS
In traditional ABAP report we cannot archieve the report to get number of orders and number of open orders via a single OPEN SQL statement.
本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。