<?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: Initial Structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620112#M25834</link>
    <description>&lt;P&gt;Sir,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Thank you very much for the reply. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;But it will be kind of you if you please tell me what is SPACE doing here ? I mean can you plz explain in a little details why TCURT is given the value 'space" instead of just avoiding it and directly inserting the values like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;LOOP AT CURR_tAB INTO TCURT.
WRITE: /5 SY-TABIX, TCURT-WAERS,TCURT-LTEXT.
ENDLOOP.
"and completely avoiding the line TCURT = SPACE.
TCURT-WAERS ='IJK'.
TCURT-LTEXT ='DUMMY CURRENCY'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt; Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Namrata&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 09:47:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-06-19T09:47:53Z</dc:date>
    <item>
      <title>Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620109#M25831</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Can anyone please tell me what this particular line of code does in this program? &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;Tables TCURT.

DATA: CURR_TAB TYPE TABLE OF TCURT.
................
................
SELECT * FROM TCURT INTO TABLE CURR_TAB 
 WHERE ....

LOOP AT CURR_tAB INTO TCURT.
WRITE: /5 SY-TABIX, TCURT-WAERS,TCURT-LTEXT.
ENDLOOP.

TCURT = SPACE. "initial structure TCURT.
TCURT-WAERS = 'IJK'.
TCURT-LTEXT = 'DUMMY CURRENCY'.

INSERT TCURT INTO CURR_TAB INDEX REC_NO.

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Now in the above program my doubt is with this line -&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TCURT = SPACE. "initial structure TCURT.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;What does this line do? And in the comment beside it is written "initial structure TCURT" !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Can anyone please tell me what it's use / purpose?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;With Warm Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Namrata&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620109#M25831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-19T09:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620110#M25832</link>
      <description>&lt;P&gt;Why not run the program in debug and find out what the statement does?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Also, be aware that TABLES is an obsolete keyword and should not be used in new programs.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620110#M25832</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-06-19T09:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620111#M25833</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenconversion_flat-elementary.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenconversion_flat-elementary.htm&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Of course, &lt;EM&gt;CLEAR tcurt&lt;/EM&gt; would be better and working with TABLES should be avoided at all.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620111#M25833</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-06-19T09:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620112#M25834</link>
      <description>&lt;P&gt;Sir,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Thank you very much for the reply. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;But it will be kind of you if you please tell me what is SPACE doing here ? I mean can you plz explain in a little details why TCURT is given the value 'space" instead of just avoiding it and directly inserting the values like&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;LOOP AT CURR_tAB INTO TCURT.
WRITE: /5 SY-TABIX, TCURT-WAERS,TCURT-LTEXT.
ENDLOOP.
"and completely avoiding the line TCURT = SPACE.
TCURT-WAERS ='IJK'.
TCURT-LTEXT ='DUMMY CURRENCY'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt; Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; Namrata&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620112#M25834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-19T09:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620113#M25835</link>
      <description>&lt;P&gt;I can't explain to you the bad programming style of someone else.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;One has to ask the author of the program why he/she does not simply use CLEAR. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;What's happening in that line, you can learn from the documentation (the structure is filled up with blanks).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 09:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620113#M25835</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-06-19T09:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620114#M25836</link>
      <description>&lt;P&gt;Dear Namrata,&lt;/P&gt;
  &lt;P&gt;It is always considered as a good coding practice to initialize the structure (or variable) before using it and that is the purpose of this line of code. However as suggested by Horst, it would have been better if CLEAR statement was used instead of passing SPACE.&lt;/P&gt;
  &lt;P&gt;Please let me know if you need any further clarificaiton on this.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Best Regards,&lt;/P&gt;
  &lt;P&gt;Arpan Shukla&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 10:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620114#M25836</guid>
      <dc:creator>arpan_shukla</dc:creator>
      <dc:date>2018-06-19T10:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620115#M25837</link>
      <description>&lt;P&gt;Hi Arpan,&lt;/P&gt;
  &lt;P&gt;Thanks for the reply.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 10:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620115#M25837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-19T10:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620116#M25838</link>
      <description>&lt;P&gt;Hi Mathew and Horst,&lt;/P&gt;
  &lt;P&gt; Ok I got it. So do you think using "Data " keyword will be better to define a structured object like this below-&lt;/P&gt;
  &lt;P&gt;DATA: TCURT type TCURT &lt;/P&gt;
  &lt;P&gt;Will be better?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620116#M25838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-19T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620117#M25839</link>
      <description>&lt;P&gt;Yes. It's better. But it's still bad. Why not give it a meaningful name, like &lt;STRONG&gt;line_of_tcurt&lt;/STRONG&gt; or &lt;STRONG&gt;tcurt_record&lt;/STRONG&gt; or &lt;STRONG&gt;currency_code_name_record&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 14:15:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-structure/m-p/620117#M25839</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-06-19T14:15:47Z</dc:date>
    </item>
  </channel>
</rss>

