Some optimization of SAP Cloud for Customer ABSL

This is the code before optimization, you can see ServiceRequest.Retrieve be called foreach loop.

How to optimize:

In fact, there are tips in the PDI. ServiceRequest knock in the back. "" Trigger code completion, you can see Retrieve method has three overloaded, which means that different input parameters of Retrieve, ABAP background compiler-generated methods are also different.

How to optimize:

The idea is still the same:

A row line 29 idCollection ID declared type of container, and then according to the service logic, the need to retrieve the id of this container were added, and finally pass into a container in line 39.

Can compare and retrieve 41 lines, retrieve incoming where a single row is recorded. If the parameter is passed in a container, then the translation of the ABAP code execution is RETRIEVE_MULTIPLE_LINES, rather than the current execution retrieve_single in the loop.

For more Jerry's original article, please pay attention to the public number "Wang Zixi":

Released 6766 original articles · won praise 646 · Views 1.12 million +

Guess you like

Origin blog.csdn.net/i042416/article/details/104513978