Problem solve Get help with specific problems with your technologies, process and projects.

Eliminate database read/write times with ABAP shared memory

The average SAP developer has never even heard of ABAP shared memory much less utilized it to help them decrease database read/write times. This was the subject of a tip presented at TechEd '07 in the session titled "Pimp mySAP."

The average SAP developer has never even heard of ABAP shared memory much less worked with it or even utilized...

it to their advantage. This was the subject of Alex's first tip. He boasted that using this development will buffer data to help alleviate database read/write times on any custom program that it is associated with. He mentioned that there is virtually no learning curve when dealing with shared memory as the buffered data is easily viewable and debugged.

View the shared memory data easily in Tcode SHMM. Double click on an item to view the details.
On the left side of the image we can see the product structure "ET_PRODUCTS", click on "17 Entries" to dive deeper into the details. Here we can see the 169 products that are associated with this particular product structure, and it is here that we manage the shared memory.
First, to create the shared memory area we go to Tcode SHMA. A root class name must be provided as well as other parameters that can be left to the default settings until it becomes clear how these changes would affect the program.
The difference between a regular class and a generated shared memory root class can be found in the properties tab where we find the check box that will make the class "shared memory enabled".
The data that is put into the shared memory area could be standard SAP types or custom types that allow structured data to be available.
To build the shared memory area use the "BUILD" method name and throw the root name as well as the area handle in there and cap it with the select statements.
Now we move on to the append statements, acquiring the necessary information from the shared memory area.
Now that we have all this data an application is needed for our efforts to be applied to. Here we reference the same data, plugging in the necessary information, and looping it.

This was last published in October 2007

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close