Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Tim Meagher[Responded separately over email, just posting some insights here for the good of anyone else in the community struggling with the same problem]
Hi,
This sort of poor performance is to be expected if the BAPI function has to execute 96,000 times.
I can�t find any reference to the ZPEP_HR_MSS_EMP_PERF_RATING_IT BAPI anywhere online.
So I assume this is a custom BAPI on your system.
If there is another way to provide the EMP_NUMBER - either via a min and max value for the EMP_NUMBER to extract via the BAPI then this could reduce the number of function executions required.
Alternately, if you are able to provide all EMP_NUMBERs to a table parameter to be exported to SAP, then the function would only need to be exported once.
If it's a custom BAPI on your system, and these options aren't available, maybe you could look at modifying the BAPI to be able to take the EMP_NUMBER in one of these formats.
Another alternative would be if you don't need to provide the EMP_NUMBER, and if it is blank data for all employees is extracted from the BAPI.
In that case, you would retrieve more data than you require, but it would still only need to execute the function once and you could do a lookup with your set of EMP_NUMBER fields to discard all of the records you don�t care about.
However .....
If the BAPI is written in such a way that you need to execute the function once per EMP_NUMBER then this is going to take a long time due to the fact that the overhead per function call is generally what takes the most time in executing a node.
If it isn�t possible to modify either the BAPI, leave the EMP_NUMBER empty and retrieve all records, or provide the list of EMP_NUMBER fields via a table input then the best way of improving performance is to look at using connection pooling on the node.
Due to the fact I�m running the node on a LAE server in one continent over a VPN to a SAP Router in another continent, which is then connecting to a SAP instance (which is probably somewhere else, I have no idea), the performance numbers I have aren�t too useful as raw performance data in and of themselves.
However, the comparison between running the same function multiple times with or without connection pooling turned on should give a rough guide as to the sort of performance benefits that can be achieved via using pooled connections.
Here are some example performance numbers from running the BAPI_GET_BANK_DETAIL function numerous times with different ConnectionMethod specified in the node:
| Function Calls |
1 |
10 |
100 |
1000 |
| Execution Time (sec) No Connection Pooling |
16 |
31 |
183 |
1656 |
| Execution Time (sec) With Connection Pooling (default settings) |
8 |
13 |
55 |
535 |
This means that on my simple example, running for 1000 input records without connection pooling would take about 28 minutes, which is pretty similar to what you are seeing.
With connection pooling, this takes around 9 minutes.
Extrapolating this, for the full 96,000 records, you would be looking at it taking around 44 hours.
Even with connection pooling (using the example with a PoolCapacity of 50 and peak limit of 100) you would still be looking at around 12 hours.
So if you�re left with no other option, then simply using connection pooling probably won�t be enough to get you the performance you want.
I think in that case, your only option left would be to split up the EMP_NUMBERs from the input using a HashSplit node, and run multiple concurrent ERP Connector nodes with Connection Pooling switched on.
If you were to do this, and were about to split the EMP_NUMBER inputs into 10 relatively equal batches, and process 10 ERP Connector node�s simultaneously (and subsequently rejoin the data returned from the BAPI function using a Cat node) then you should be able to get this processing time down to around an hour.
This is obviously still not ideal, but if the function needs to be executed 96,000 times, and you can�t change the BAPI or find another BAPI to extract the information, then I think you are going to be stuck with these sort of processing times.
I believe these factors will be much more important than deactivating parameters � depending on the BAPI.
However, in order to know what is going wrong with the deactivation of parameters, I'd need to see the Extract ERP Metadata node from each of its output pins for the Scalar, Structure and Table parameters, in order to determine what is going wrong with your parameter disabling. That can probably just be done over email though.
Regards,
Tim.