<?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: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678602#M2016785</link>
    <description>&lt;P&gt;Edit your question, select your coding and press the CODE button to make it more readable. Thanks &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 12:37:01 GMT</pubDate>
    <dc:creator>VXLozano</dc:creator>
    <dc:date>2023-05-16T12:37:01Z</dc:date>
    <item>
      <title>Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678601#M2016784</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Compilation Error Message:&lt;/STRONG&gt; The data object "LAYOUT KEY" has no structure therefore no component called "Report"&lt;/P&gt;
  &lt;P&gt;need help is resolving this compilation error as highlighted below(bold and italics). &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/2168895-sap-community-question-alv-report.txt" data-attachment="2168895"&gt;sap-community-question-alv-report.txt&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;METHOD SET_LAYOUT.&lt;/P&gt;
  &lt;P&gt; DATA: LAYOUT TYPE REF TO CL_SALV_LAYOUT,&lt;/P&gt;
  &lt;P&gt; LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.&lt;/P&gt;
  &lt;P&gt; LAYOUT = ALV_TABLE_OBJECT-&amp;gt;GET_LAYOUT( ).&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; &lt;EM&gt;&lt;STRONG&gt;LAYOUT-&amp;gt;SET_KEY(LAYOUT_KEY).&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt; LAYOUT-&amp;gt;SET_SAVE_RESTRICTION(IF_SALV_C_LAYOUT=&amp;gt;RESTRICT_NONE).&lt;/P&gt;
  &lt;P&gt; ENDMETHOD.&lt;/P&gt;
  &lt;P&gt;ENDCLASS.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 12:22:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678601#M2016784</guid>
      <dc:creator>raman_sethi</dc:creator>
      <dc:date>2023-05-16T12:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678602#M2016785</link>
      <description>&lt;P&gt;Edit your question, select your coding and press the CODE button to make it more readable. Thanks &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 12:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678602#M2016785</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2023-05-16T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678603#M2016786</link>
      <description>&lt;P&gt;After you have better formatted your code, please also explain which "compiler error" message you have, and we'll answer to you.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 15:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678603#M2016786</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-05-16T15:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678604#M2016787</link>
      <description>&lt;P&gt;It's (I guess) at the beginning of the post:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compilation Error Message:&lt;/STRONG&gt; The data object "LAYOUT KEY" has no structure therefore no component called "Report"&lt;/P&gt;&lt;P&gt;I guessed it's because the data object "layout key" has been declared as a reference of something. But I can be wrong (I use to be).&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 15:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678604#M2016787</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2023-05-16T15:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678605#M2016788</link>
      <description>&lt;P&gt;Attn Sandra/Vicenc - have reformatted the relevant part of  code as below, trust it will be more helpful.  ERP 6.0 EHP7 system.&lt;/P&gt;&lt;P&gt; METHOD SET_LAYOUT.&lt;BR /&gt;
    DATA: LAYOUT     TYPE REF TO CL_SALV_LAYOUT,&lt;BR /&gt;
          LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.&lt;BR /&gt;
    LAYOUT = ALV_TABLE_OBJECT-&amp;gt;GET_LAYOUT ( ).&lt;BR /&gt;
    LAYOUT_KEY-REPORT = SY-REPID.&lt;BR /&gt;
    LAYOUT-&amp;gt;SET_KEY(LAYOUT_KEY).&lt;BR /&gt;
    LAYOUT-&amp;gt;SET_SAVE_RESTRICTION(IF_SALV_C_LAYOUT=&amp;gt;RESTRICT_NONE).&lt;BR /&gt;
  ENDMETHOD.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax Error for Program
ZRS_ALV3 (ref line highlighted above)&lt;/STRONG&gt;&lt;/P&gt;
 
  
  &lt;P&gt;&lt;STRONG&gt;Error
  Type&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  
  
  &lt;P&gt;&lt;STRONG&gt;Line&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  
  
  &lt;P&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  
 
 
  
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
  
  
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;61&lt;/P&gt;
  
  
  &lt;P&gt;The data object “LAYOUT_KEY”
  has no structure and therefore no component called “REPORT” &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  
 
&lt;P&gt; &lt;/P&gt;&lt;P&gt;as Vicenc there seems to be a type ref problem in the  highlighted statement as   "SALV_S_LAYOUT_KEY."   has 3 components name as below but these are not being transferred to  "LAYOUT_KEY". Will be very grateful for your help thanks:&lt;/P&gt;&lt;P&gt;REPORT&lt;/P&gt;&lt;P&gt;HANDLE&lt;/P&gt;&lt;P&gt;LOGICAL_GROUP&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am working on the ALV examples given in the SAP Press Book - "ABAP - An Introduction" by Brian O'Neill and Jelena Perfiljeva&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 08:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678605#M2016788</guid>
      <dc:creator>raman_sethi</dc:creator>
      <dc:date>2023-05-17T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678606#M2016789</link>
      <description>&lt;P&gt;apologies the formatting of the error message has become garbled above, below picture may be more helpful&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2167892-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 08:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678606#M2016789</guid>
      <dc:creator>raman_sethi</dc:creator>
      <dc:date>2023-05-17T08:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678607#M2016790</link>
      <description>&lt;P&gt;Attn Sandra/Vicenc - apologies the question was formatted on a word doc which could not be replicated here. Please close this question .&lt;/P&gt;&lt;P&gt;I will repost the same and ensure the formatting is good&lt;/P&gt;&lt;P&gt;apologies once again&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Raman&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 09:09:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678607#M2016790</guid>
      <dc:creator>raman_sethi</dc:creator>
      <dc:date>2023-05-17T09:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678608#M2016791</link>
      <description>&lt;P&gt;Sorry but good formatting is as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  METHOD SET_LAYOUT.
    DATA: LAYOUT TYPE REF TO CL_SALV_LAYOUT,
    LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.
    LAYOUT = ALV_TABLE_OBJECT-&amp;gt;GET_LAYOUT( ).
    LAYOUT-&amp;gt;SET_KEY(LAYOUT_KEY).
    LAYOUT-&amp;gt;SET_SAVE_RESTRICTION(IF_SALV_C_LAYOUT=&amp;gt;RESTRICT_NONE).
  ENDMETHOD.
ENDCLASS.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2023 18:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678608#M2016791</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-05-17T18:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678609#M2016792</link>
      <description>&lt;P&gt;Sorry, but only you can close the question.&lt;/P&gt;&lt;P&gt;Avoid closing + reposting the same. Simply use Actions &amp;gt; Edit to edit your question.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 18:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678609#M2016792</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-05-17T18:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678610#M2016793</link>
      <description>&lt;P&gt;You probably didn't post the code corresponding to the error message:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The data object “LAYOUT_KEY” has no structure and therefore no component called “REPORT”&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But in your post, you had these lines:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DATA: 
          LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.

    LAYOUT-&amp;gt;SET_KEY(LAYOUT_KEY).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;so I guess you have in the actual code something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DATA: 
          LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.

    LAYOUT_KEY-REPORT = sy-repid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the issue being that you defined LAYOUT_KEY as a reference variable (REF TO) to a structure, a reference variable has no structure itself, it just contains a reference&lt;/P&gt;&lt;P&gt;So either don't define it as a reference:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DATA: 
          LAYOUT_KEY TYPE SALV_S_LAYOUT_KEY.

    LAYOUT_KEY-REPORT = sy-repid.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or refer to the referenced object using the dereferencing operator like that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DATA: 
          LAYOUT_KEY TYPE REF TO SALV_S_LAYOUT_KEY.

    LAYOUT_KEY-&amp;gt;REPORT = sy-repid.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2023 18:43:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678610#M2016793</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-05-17T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678611#M2016794</link>
      <description>&lt;P&gt; Thanks Sandra my issue is resolved&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 03:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678611#M2016794</guid>
      <dc:creator>raman_sethi</dc:creator>
      <dc:date>2023-05-19T03:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Self Training on ALV Report -  METHOD SET_LAYOUT - compilation error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678612#M2016795</link>
      <description>&lt;P&gt;Please use the button COMMENT if it's just about to provide information or reply to someone. The button ANSWER is only for providing the solutions, as you can see the text from SAP when you answer "Please provide a distinct answer and use the comment option for clarifying purposes" &lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 07:52:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/self-training-on-alv-report-method-set-layout-compilation-error/m-p/12678612#M2016795</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-05-19T07:52:44Z</dc:date>
    </item>
  </channel>
</rss>

