<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Saving Data Objects in INDX-Type Database in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162087#M1370271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hello Marcin,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Very well explained !! &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; 10 p*ints from me &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Cheers,&lt;/P&gt;&lt;P&gt;&amp;gt; Suhas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Suhas, I will virtually add them myself;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2009 13:41:24 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-10-15T13:41:24Z</dc:date>
    <item>
      <title>Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162081#M1370265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the EXPORT statement to store data in a table into INDx table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT gt_update TO DATABASE indx(tt) ID index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then I am using IMPORT statement to get that data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT gt_update to tb_update FROM DATABASE indx(tt) ID 'TTUPDATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'TT' is put into INDX- RELID and 'TTUPDATE' into INDX-SRTFD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Export statement was working fine and a record got created in INDX table, but the IMPORT is not working. Can anyone please let me know what could be the problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'gt_update' and 'tb_update' are of the same type in the IMPORT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please let me know what exactly is the significance of the field INDX-SRTF2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 12:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162081#M1370265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T12:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162082#M1370266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the EXPORT you are using ID = variable INDEX. Does INDEX = 'TTUPDATE'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXPORT gt_update TO DATABASE indx(tt) ID index.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the IMPORT you are using ID = TTUPDATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IMPORT gt_update to tb_update FROM DATABASE indx(tt) ID 'TTUPDATE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After EXPORT just go to INDX table &amp;amp; check what value has been updated in INDX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to IMPORT using the same param. The important elements are RELID &amp;amp; SRTFD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 12:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162082#M1370266</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-10-15T12:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162083#M1370267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, index does contain 'TTUPDATE'. I had initially used index in the IMPORT statement too, but as it was not working, I had changed that to 'TTUPDATE'. &lt;/P&gt;&lt;P&gt;Also in INDX , RELID got updated as TT and SRTFD got updated as TTUPDATE. And I am using the same values of these two fields in the IMPORT statement.&lt;/P&gt;&lt;P&gt;The strange thing is the sy-subrc was equal to zero for the IMPORT statement but the table was empty!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please  help..what could be the problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 12:55:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162083#M1370267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T12:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162084#M1370268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think then there is something wrong in the IMPORT / EXPORT stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do an F1 on IMPORT TO / EXPORT FROM DATABASE stmt, you will see a sample code. Which is a bit different from the way you have coded. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lwa_indx  TYPE indx.

EXPORT gt_update = gt_update TO DATABASE indx(tt) FROM lwa_indx  CLIENT sy-mandt ID 'TTUPDATE'.

IMPORT gt_update = tb_update FROM DATABASE indx(tt) TO lwa_indx  CLIENT sy-mandt ID 'TTUPDATE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways in the table INDX, what is the value in the field CLUSTR? Is it greater than 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162084#M1370268</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-10-15T13:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162085#M1370269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two possibilities I think of:&lt;/P&gt;&lt;P&gt;- first one, the export table is empty, so the import one is also empty&lt;/P&gt;&lt;P&gt;- as Suhas noticed, this can be an issue of the way how you export/import table itself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the best always to threat impot/export parameter as it would be parameter of FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Durign FM call you always use such template&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FM ....
  EXPORTING 
      ex_param   = your_param

  IMPORTING
     im_param     = your_param
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;ex_param&lt;/STRONG&gt; is the name which will be used in memory to store &lt;STRONG&gt;your_param&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;im_param&lt;/STRONG&gt; should be therefore the same name as you MUST address the same param in memory and copy back to &lt;STRONG&gt;your_param&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming above, in both cases &lt;STRONG&gt;ex_param/im_param&lt;/STRONG&gt; should be &lt;STRONG&gt;gt_update&lt;/STRONG&gt; , &lt;STRONG&gt;you_param&lt;/STRONG&gt; name can only change.&lt;/P&gt;&lt;P&gt;For EXPORT/IMPORT it would be then&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
EXPORT gt_update = your_table_with_data TO DATABASE indx(tt) ID 'TTUPDATE'.
 
IMPORT gt_update = your_empty_table FROM DATABASE indx(tt) ID 'TTUPDATE'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the field &lt;EM&gt;SRTF2&lt;/EM&gt; it is jsut a counter of lines. If data don't fit one line, it will automatically spread over several ones. In this case &lt;EM&gt;SRTF2&lt;/EM&gt; will hold current line number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:25:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162085#M1370269</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-10-15T13:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162086#M1370270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very well explained !! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10 p*ints from me &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162086#M1370270</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-10-15T13:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162087#M1370271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hello Marcin,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Very well explained !! &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; 10 p*ints from me &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Cheers,&lt;/P&gt;&lt;P&gt;&amp;gt; Suhas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Suhas, I will virtually add them myself;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:41:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162087#M1370271</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-10-15T13:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162088#M1370272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin/ Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier when I was passing gt_update in the EXPORT statement, I did not get any data into gt_update. I was under the impression that when I pass it that way all the data in the table would go into the INDX table ( Which I feel now is very silly of me to think that way!).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT gt_update TO DATABASE indx(tt) ID 'TTUPDATE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ways now I have now written a SELECT to get data into gt_update and the IMPORT statement does work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My reason for using data clusters is that there is huge amount to data to be retrieved from database, so we have decided to get that data and put it in data clusters for faster access of data in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a doubt, Ideally we should be having another program with the SELECT statement on the table required which needs to be scheduled periodically as a background job to Update the data cluster right ? Otherwise how would the data cluster hold the latest data ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please answer this one doubt, I can then close this thread by awarding the points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 03:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162088#M1370272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T03:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162089#M1370273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My reason for using data clusters is that there is huge amount to data to be retrieved from database, so we have decided to get that data and put it in data clusters for faster access of data in the program.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDX tables are ideal to store complex strcutures, inlcuding deep data objects. Don't really know if the access is faster, but definitely it takes less space (as data are compressed). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a doubt, Ideally we should be having another program with the SELECT statement on the table required which needs to be scheduled periodically as a background job to Update the data cluster right ? Otherwise how would the data cluster hold the latest data ?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It really depends on where you initial data comes from. I mean how data you want to put/update in data cluster are produced. If this is the report, which generates some result and based on that you want to update data cluster, then what you say is true. You would need to run it either manually (periodically) or simply schedule the job, which does the task. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as for the update of data cluster itself, I don't think we should use OPEN SQL statements to achieve that.&lt;/P&gt;&lt;P&gt;What I think you have to do is, each time do a select to know which cluster to extract, then import the result. Next you need to change &lt;EM&gt;gt_update&lt;/EM&gt; locally and place it back (with export) on right data cluster place. Data with same name under same RELID and cluster key will be completely replaced with new (changed) table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the only way I think of in terms of data cluster update, but maybe there is some other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 07:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162089#M1370273</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-10-16T07:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Saving Data Objects in INDX-Type Database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162090#M1370274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses. Thread Closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 11:54:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/saving-data-objects-in-indx-type-database/m-p/6162090#M1370274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T11:54:20Z</dc:date>
    </item>
  </channel>
</rss>

