<?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 Is single type structure and elementary type structure the same? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478332#M2001584</link>
    <description>&lt;P&gt;Apologies as I just started learning ABAP this month and currently doing a self-study bootcamp on my current employer.&lt;/P&gt;
  &lt;P&gt;I've encountered a problem with this kind of instruction:&lt;/P&gt;
  &lt;P&gt;1.0 putting all the variables in a single type structure (ls_profile).&lt;/P&gt;
  &lt;P&gt;This is my work:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;TYPES:  BEGIN OF ls_profile,
            employee_number TYPE string,
            first_name TYPE string,
            last_name TYPE string,
            birthdate TYPE string,
            dream_salary TYPE string,
            hobby TYPE string,
        END OF ls_profile. &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; 2.0 Create a structured variable (wa_profile) using the correct types. &lt;/P&gt;
  &lt;P&gt;2.1 Populate the structured variable with the correct data.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA(wa_profile) = VALUE ls_profile( employee_number = 'Employee Number' &lt;BR /&gt;                                                                   first_name = 'First Name'&lt;BR /&gt;                                                                   last_name = 'Last Name'&lt;BR /&gt;                                                                   birthdate = 'Birthdate'&lt;BR /&gt;                                                                   dream_salary = 'Dream Salary'&lt;BR /&gt;                                                                   hobby = 'Hobby').&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;3.0 Display the contents of the structure. 
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;WRITE:  |{ wa_profile-employee_number }|,
    /   |{ wa_profile-first_name }|,
    /   |{ wa_profile-last_name }|,
    /   |{ wa_profile-birthdate }|,
    /   |{ wa_profile-dream_salary }|,
    /   |{ wa_profile-hobby }|.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;Am I doing it right?</description>
    <pubDate>Tue, 07 Dec 2021 06:37:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2021-12-07T06:37:54Z</dc:date>
    <item>
      <title>Is single type structure and elementary type structure the same?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478332#M2001584</link>
      <description>&lt;P&gt;Apologies as I just started learning ABAP this month and currently doing a self-study bootcamp on my current employer.&lt;/P&gt;
  &lt;P&gt;I've encountered a problem with this kind of instruction:&lt;/P&gt;
  &lt;P&gt;1.0 putting all the variables in a single type structure (ls_profile).&lt;/P&gt;
  &lt;P&gt;This is my work:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;TYPES:  BEGIN OF ls_profile,
            employee_number TYPE string,
            first_name TYPE string,
            last_name TYPE string,
            birthdate TYPE string,
            dream_salary TYPE string,
            hobby TYPE string,
        END OF ls_profile. &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; 2.0 Create a structured variable (wa_profile) using the correct types. &lt;/P&gt;
  &lt;P&gt;2.1 Populate the structured variable with the correct data.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA(wa_profile) = VALUE ls_profile( employee_number = 'Employee Number' &lt;BR /&gt;                                                                   first_name = 'First Name'&lt;BR /&gt;                                                                   last_name = 'Last Name'&lt;BR /&gt;                                                                   birthdate = 'Birthdate'&lt;BR /&gt;                                                                   dream_salary = 'Dream Salary'&lt;BR /&gt;                                                                   hobby = 'Hobby').&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;3.0 Display the contents of the structure. 
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;WRITE:  |{ wa_profile-employee_number }|,
    /   |{ wa_profile-first_name }|,
    /   |{ wa_profile-last_name }|,
    /   |{ wa_profile-birthdate }|,
    /   |{ wa_profile-dream_salary }|,
    /   |{ wa_profile-hobby }|.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;BR /&gt;Am I doing it right?</description>
      <pubDate>Tue, 07 Dec 2021 06:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478332#M2001584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-12-07T06:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is single type structure and elementary type structure the same?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478333#M2001585</link>
      <description>&lt;P&gt;String is a text, I am not sure the birtdate should be a text. I think it should be a date. Same for dream_salary.&lt;/P&gt;&lt;P&gt;The 2.0 seams to means you have to create-it using the old method  DATA my_structure TYPE my_type. &lt;/P&gt;&lt;P&gt;For the last one, you could use  cl_demo_output=&amp;gt;display_data( wa_profile ). &lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 06:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478333#M2001585</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-12-07T06:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is single type structure and elementary type structure the same?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478334#M2001586</link>
      <description>&lt;P&gt;If it is a study, you could do it creating a local class / local interface. (you have 1 hour !) &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 07:00:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-single-type-structure-and-elementary-type-structure-the-same/m-p/12478334#M2001586</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-12-07T07:00:03Z</dc:date>
    </item>
  </channel>
</rss>

