Han Solo’s Smugglers Guide to Power BI: SAP Web Performance Reporting
While we are looking at SAP Performance Reporting in the #SmugglersGuidetoPowerBI, let’s look at some of the nuances of the SAP Web reporting data reported through the SWNC_GET_WORKLOAD_STATISTIC function module. It was once said, “Do. Or do not. There is no try.”, so let’s explore what it is we must do for SAP Web reporting.
?
The function module will provide four tables:
?
In ST03 this data is in the ‘Web Statistic Folder’ as:
?
According to SAP:
In the workload monitor, you can display the workload in different analysis views which highlight the workload from a particular perspective. One of these aspects is the question of how much workload occurs due to requests from the Internet. With this information, you can answer questions such as:
?
?
WEB Client Statistics - Workload due to requests for which the system acts as a Web client
WEB Client Dest. Statistics - Workload due to requests for which the system acts as a Web client, broken down by different client destinations
WEB Server Statistics - Workload due to requests for which the system acts as a Web server
WEB Server Dest. Statistics - Workload due to requests for which the system acts as a Web server, broken down by different server destinations
?
The output area contains four tab pages with the following characteristics:
1.???? Host
Breakdown of the workload by host names and port numbers that act as Web servers or Web clients
2.???? Transactions
Breakdown of the workload by reports or transactions that act as Web servers or Web clients
3.???? User
Breakdown of the workload by users and clients that act as Web servers or Web clients
4.???? URL
Breakdown of the workload by URLs that act as Web servers or Web clients
?
In my experience I have found all the information I needed in the WEB Client Statistics (WEBC) and the WEB Server Statistics (WEBS) output from the function module. I do see that the ‘Web Client/Server Destination Statics’ reports in ST03 each have four columns that the ‘Web Client/Server Statistics’ reports do not have. These are ‘TOTAL LOGON TIME’, ‘AVERAGE LOGON TIME’, ‘LOGON AUTHORIZATION TIME’ and ‘AVERAGE LOGON AUTHORIZATION TIME’. In my SAP instances this data is not configured to be captured and reported in ST03.
?
I’ll use the WEBS output for the examples that follow. As before, I created a table based on the source data. Making a copy of the source data to work with is not required, it was just a personal preference of mine. I created the new table as follows:
?
Web Server Table =
ALL(
?? WEBS[DATE],
?? WEBS[TASKTYPE],
?? WEBS[PROTOCOL],
?? WEBS[ACCOUNT],
?? WEBS[COUNTER],
?? WEBS[ENTRYID],
?? WEBS[ENTRYID_BCKGRD],
?? WEBS[ENTRYID_TYPE],
?? WEBS[HOST],
?? WEBS[PATH],
?? WEBS[PORT],
?? WEBS[DESTINATION],
?? WEBS[CALLTIME],
?? WEBS[DATASEND],
?? WEBS[DATASENDTI],
?? WEBS[DATARECEIVE],
?? WEBS[DATARECEIVETI],
?? WEBS[EXECUTIONTI],
?? WEBS[MANDT]
)
?
As before I created a relationship with the ‘TASKTYPE CODE’ table to translate the SAP fields into useful descriptions.
?
Task Type Description = RELATED(TASKTYPE_CODE[Description])
领英推荐
?
I had to add a new table to translate the PROTOCOL fields into useful descriptions. SAP reports the protocols as 1,2 and 4, which are HTTP, HTTPS and SMTP respectively. There are a few more protocols that can be configured in SMICM, but these are all that our ABAP systems are using.
?
The Supported Protocols are:
ABAP - HTTP, HTTPS, SMTP, TCP, TCPS
AS Java - HTTP, HTTPS, P4, P4SEC, IIOP, IIOPSEC, TELNET
SAP Web Dispatcher - HTTP, HTTPS
?
And the relationship is:
Protocol Type = RELATED(PRO_CODE[Description])
?
Overall, my ‘Model View’ looks like this:
??A few more of the fields of interest are:
?
·?????? Path or URL = 'Web Server Table'[PATH]
·?????? User = 'Web Server Table'[ACCOUNT]
·?????? Host Name = 'Web Server Table'[HOST]
?
In the WEBC data you will get information on the DESTINATIONS, which are the RFC’s defined under ‘HTTP Connections to External Server’ and ‘HTTP Connections to ABAP System’. The DESTINATION data is not reported (directly) in ST03, and is very useful; e.g., say your systems make calls to the SAP C4C cloud and you want to see the details of these calls by RFC. In ST03 you can see the URL data, which is related to the DESTINATIONS; however, some users like seeing the DESTINATION information as well as the related URL information. Also, you won’t find this data in the RFC output from the SWNC_GET_WORKLOAD_STATISTIC function module. I use the following to get that data for my Power BI Views.
?
RFC Destination = 'Web Server Table'[DESTINATION]
?
As we discussed in the last post, I had to build a key from several of the fields. Before I needed the custom key for the relationship between tables. This time I needed the custom key to perform various calculations. The key is:
?
Key = 'Web Server Table'[Month & Year]&"-"&
????? 'Web Server Table'[PROTOCOL]&"-"&
????? 'Web Server Table'[TASKTYPE]&"-"&
????? 'Web Server Table'[MANDT]&"-"&
????? 'Web Server Table'[ACCOUNT]
?
An example of a few of the calculations follows below.
?
? Data Send Time (ms) =
? DIVIDE(
??????? CALCULATE(
??????????? SUM('Web Server Table'[DATASENDTI]),
??????????? GROUPBY('Web Server Table',[Key])),
??????? CALCULATE(???
??????????? SUM('Web Server Table'[COUNTER]),
??????????? GROUPBY('Web Server Table',[Key]))
??????? )
?
? Quantity of Data Sent (Bytes) =
? DIVIDE(
??????? CALCULATE(
??????????? SUM('Web Server Table'[DATASEND]),
??????????? GROUPBY('Web Server Table',[Key])),
??????? CALCULATE(???
??????????? SUM('Web Server Table'[COUNTER]),
??????????? GROUPBY('Web Server Table',[Key]))
??????? )
?
Finally, I completed my Views with a few slicers. A DATE slicer is a common requirement, and other slicers can be added as needed; e.g., a PROTOCOL slicer, a TASKTYPE slicer or other slicers that may work best for the views you are creating.
?
It was once said, "You're a smuggler, are you not? Along with speed, your specialty is concealment." What I found in ST03 was that SAP was concealing the ‘HTTP Connections to External Server’ and ‘HTTP Connections to ABAP System’ data (by RFC). That data had to be inferred from the URL’s being reported. Remember, we are smugglers, are we not? We only want to carry valuable cargos. The cargo for our Views of SAP Web Statistics is the ‘Average/Total Data Sent ’and the speed we need to tune our systems for is the ‘Average/Total Data Send Time’. We need to rely on concealment from the Mid-Rim to the Core worlds, but out here in the Outer Rim concealment is not normally much of a concern. Out here, it is all about speed and knowing the value of different goods and resources so we can choose profitable cargoes.