<?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: Constructor operator VALUE and its usage. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104049#M1903433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of ABAP 740, the table without the key specification is obsolete. &lt;A __default_attr="87946" __jive_macro_name="blogpost" class="jive_macro jive_macro_blogpost" data-orig-content="ABAP News for Release 7.40 - Internal Tables with Empty Key" href="https://community.sap.com/" modifiedtitle="true" title="ABAP News for Release 7.40 - Internal Tables with Empty Key"&gt;&lt;/A&gt; See the last lines:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;STRONG style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Starting with release 7.40 you declare your standard tables either with a good key or an empty key but never with the chancy default key!&lt;/STRONG&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since VALUE operator is also introduced in ABAP 740, it uses stricter check and doesn't allow with a table which doesn't have key specification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for the VALUE operator for the Structure, which you referred as WA, it also works as &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm" style="font-size: 13.3333330154419px;" title="http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm"&gt;http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABAP Help:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;TYPES: BEGIN OF t_struct, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col1 TYPE i, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2 TYPE t_col2, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF t_struct. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;DATA: struct TYPE t_struct, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2 TYPE t_col2. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;struct = VALUE t_struct( col1 = 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2-col1 = 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2-col2 = 2 ). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Find more example of VALUE operator usage at &lt;A href="http://zevolving.com/2014/09/abap-740-value-operator-create-itab-entries/" title="http://zevolving.com/2014/09/abap-740-value-operator-create-itab-entries/"&gt; ABAP 740 – VALUE Operator to create ITAB entries | ABAP Help Blog&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 14:48:15 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2015-05-14T14:48:15Z</dc:date>
    <item>
      <title>Constructor operator VALUE and its usage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104048#M1903432</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 have used the constructor operator VALUE in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/704480" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The above screen-shot works perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I noticed that we can't define the table type as generic and must be defined as one with a KEY for the syntax to work.&lt;/P&gt;&lt;P&gt;Why can't we also use a work area instead of internal table based on a line type after VALUE keyword to work in ABAP? It seems that is not supported! Does anyone know how this works or is it me who is making any sort of mistakes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tanmoy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 13:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104048#M1903432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-14T13:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Constructor operator VALUE and its usage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104049#M1903433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of ABAP 740, the table without the key specification is obsolete. &lt;A __default_attr="87946" __jive_macro_name="blogpost" class="jive_macro jive_macro_blogpost" data-orig-content="ABAP News for Release 7.40 - Internal Tables with Empty Key" href="https://community.sap.com/" modifiedtitle="true" title="ABAP News for Release 7.40 - Internal Tables with Empty Key"&gt;&lt;/A&gt; See the last lines:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;STRONG style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Starting with release 7.40 you declare your standard tables either with a good key or an empty key but never with the chancy default key!&lt;/STRONG&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since VALUE operator is also introduced in ABAP 740, it uses stricter check and doesn't allow with a table which doesn't have key specification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for the VALUE operator for the Structure, which you referred as WA, it also works as &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm" style="font-size: 13.3333330154419px;" title="http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm"&gt;http://help.sap.com/abapdocu_740/en/abenvalue_constructor_params_struc.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABAP Help:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;TYPES: BEGIN OF t_struct, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col1 TYPE i, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2 TYPE t_col2, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF t_struct. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;DATA: struct TYPE t_struct, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2 TYPE t_col2. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;struct = VALUE t_struct( col1 = 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2-col1 = 1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2-col2 = 2 ). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12.8000001907349px; font-weight: bold; background-color: #fefeff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Find more example of VALUE operator usage at &lt;A href="http://zevolving.com/2014/09/abap-740-value-operator-create-itab-entries/" title="http://zevolving.com/2014/09/abap-740-value-operator-create-itab-entries/"&gt; ABAP 740 – VALUE Operator to create ITAB entries | ABAP Help Blog&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 14:48:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104049#M1903433</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2015-05-14T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Constructor operator VALUE and its usage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104050#M1903434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks it works perfectly. I tried the same thing earlier but it did not work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/704586" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tanmoy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:44:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constructor-operator-value-and-its-usage/m-p/11104050#M1903434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-14T16:44:38Z</dc:date>
    </item>
  </channel>
</rss>

