This is one of the best blogs which i am writing :
Requirement : -> Usually we store and fetch the data from the database table but some times we have to put our data into the buffer for a period of time so that later period of time we can fetch it from buffer , accumulate it and finally update in database tables. Normally we use EXPORT/IMPORT with buffer area extension but in next generation ABAP developement methodology we have a concept of shared memory object : T-CODE : -> SHMA & SHMM
Now while developing this functionality , there are two kinds of classes :
1. Root class
2. Shared Memory area class (Automatically generated)
Below is the root class with shared memory check box enabled
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzbiCNe6qpvkQxP3s0JjoLVzEH5cMZH-yu_Ftt22qBRdUERalihYpDSG2GijsWNvA8ZX9IzM0tJoFPDR42rsjjrALATdJ1MotzOVPnzCVDzjqNd18qClmzuu2aEUrw7kbGyQNjUVMvDOIz/s320/s1.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQi0fWTZ0-cC0pdMqM4GLHZVF7uymWnpYpc5paiw_dYcrBC0r2CIBICOT4ibXInSkfWJwuR8O8Gyyg7CvtTsDkBhujfR-anP1S_ITAncUrGhxn1BuDkIJ0cAYlz_r-bj5zvthuhF-rZgOG/s320/s2.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR2W2UOSUw8TbJBBuiDtrUDjELQK1J8rM_pxEoVyT14ODGpog1C9cY3ePYGHyUHwx2wG_fxCRRcVmkVpTAWUmE87ZZEB5AIlyuIgiYIVdsJVyNFFzWkTeWk2f7X9w1DOCsY_aHhzN5qpqh/s320/s3.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHVkXpn1g_XzDHABwB_eZbY5InCgJy70MnQvxmYAiL8-xr81cfpqC6Z-jUPu_C0jR3CO0l1AyAOJhBO1zC3tLnihKwdTSWR6SBGWb8YkeHJnPpGbWhFDr7rxeRDZeF5Vg3fDwAhttIkhUS/s320/s4.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZnr39oQJMDD_xXokJMPIeTA84Iu_Zbedy_FNYOc2It3FADF9vQGs2lyjHLyf4dkN_FMaCUdZEs-I1B7CmvdWZI2FQ-SZ02QPUPST9qg5DNq1tRLT3nUGQgM81-uWZqCijSvz2zoBf9zJR/s320/s5.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg85N7oNEgRurIiOlTxT6_0Y9BwxhkXYYb-qkGhCgPiqfanmiltLLOQzT3jh1H8MQ7yIeuOh_dZwC1WB6gwZMtM1i88h0AgGWbtBPkGHiqGFxxAigAvV1N6tmLWWsNaR4R1tdcrmjPoTF2k/s320/s6.JPG)
Now goto the t-code SHMA and you'll find the below screen.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIblRMLE0irGFMOpfb_pZsmyI65qwNZbsTKY5TkiEND0TpcI8Zh7cLtAOp25-qQli55vA_0kEXBosFhO46XjHX-o0YZa44VisQ133zBXbRXJGSINEI0X2ccNZky5IYtCcM4-R7weE1MVMp/s320/s7.JPG)
Below are the methods of shared memory object class
Below is the program to dump the data in shared memory area :
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjilE1Uwn9LCzSWB2gQGVPsCfRsCK_F2yvs_ro128UBVsrpY-MU9SpBJhBodHg63mwpAOwEqO3NrOhzDjWLXJfaaKEt7AfpEYu_TNnT5Be9H1EoDIQOEfMvX5Mx6odm07A3anoX_bo6IGRZ/s320/s9.JPG)
Below is the program to read the data from shared memory area not from data base table