10-07-2016 8:02 AM
Hai all,
I came a situation where i want to follow one of the method so that memory in the database occupies less.
1) directly exporting the large data into cluster table
2) transform large data using call transformation and then store in cluster table.
i want to which process is best and to follow
i tested this way , but not knowing how to decide.
1)
*EXPORT mdata = ls_prf_data-mdata
comment_c_data = ls_prf_data-cmnt_c_data
comment_ca_data = ls_prf_data-cmnt_ca_data
hier_data = ls_prf_data-hier_data
kffcat = lwa_mxdhdr-kffcat TO DATABASE zclust_db(pt) ID ls_mxdoc.
2) where lv_xml is the string
EXPORT lv_xml TO DATABASE
zclust_db(pt)
Any suggestios or any solution to find
Regards,
kiran rachamalla.
10-07-2016 9:11 AM
Hello Kiran,
With a test program try saving data in one of the std cluster tables INDX using both the methods.
This table has a field CLUSTR(Length field for user data in EXPORT/IMPORT tables) which is data length.
You should be able to decide based on the length, which method you can use. As far as i go, i think XML takes less space.
10-07-2016 9:15 AM
I let you do the tests. But do you really need to use the obsolete-from-my-point-of-view cluster tables?
Why don't you simply use a XSTRING field in a classic transparent table? You fill the XSTRING using these methods (for instance) :
1) EXPORT ... TO DATA BUFFER xstring, uses SAP compression algorithm
2) CALL TRANSFORMATION ... with JSON (shorter form of XML; you'll have to use SXML) + CL_ABAP_GZIP