<?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: Problem With GET_DDIC_FIELD_LIST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178523#M1979670</link>
    <description>&lt;P&gt;Thank you &lt;A href="https://answers.sap.com/users/439922/geert-jan.klaps.html"&gt;Geert-Jan Klaps&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Also I was able to find this and it worked&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LS_STRU ?= CL_ABAP_STRUCTDESCR=&amp;gt;DESCRIBE_BY_DATA( P_DATA = WA_OUT ).
LT_DDFIELD_HD = CL_SALV_DATA_DESCR=&amp;gt;READ_STRUCTDESCR( LS_STRU ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 08 Mar 2020 13:42:58 GMT</pubDate>
    <dc:creator>srahemi</dc:creator>
    <dc:date>2020-03-08T13:42:58Z</dc:date>
    <item>
      <title>Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178516#M1979663</link>
      <description>&lt;P&gt;Hi&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF TWA_OUT,

      STATU           TYPE PLKO-STATU,
      KTEXT           TYPE PLKO-KTEXT,
      ZAEHL           TYPE PLKO-ZAEHL,
      MATNR           TYPE MARA-MATNR,

      END OF TWA_OUT.


DATA: WA_OUT        TYPE TWA_OUT,
      LS_STRU       TYPE REF TO CL_ABAP_STRUCTDESCR,
      LT_DDFIELD_HD TYPE DDFIELDS .

LS_STRU ?= CL_ABAP_STRUCTDESCR=&amp;gt;DESCRIBE_BY_DATA( WA_OUT ).

CALL METHOD LS_STRU-&amp;gt;GET_DDIC_FIELD_LIST
*    EXPORTING
*      P_LANGU                  = SY-LANGU
*      P_INCLUDING_SUBSTRUCTRES = ABAP_FALSE
  RECEIVING
  P_FIELD_LIST = LT_DDFIELD_HD
  EXCEPTIONS
    NOT_FOUND    = 1
    NO_DDIC_TYPE = 2
    OTHERS       = 3
    .

WRITE : 'xxxxxxxxxxxx'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;In this code i use GET_DDIC_FIELD_LIST but i got SY-SUBRC = 2 ( NO_DDIC_TYPE )&lt;/P&gt;
  &lt;P&gt;Where did I go wrong ? &lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 08:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178516#M1979663</guid>
      <dc:creator>srahemi</dc:creator>
      <dc:date>2020-03-08T08:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178517#M1979664</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The problem is that you're using a locally defined structure which is off course not available in the data dictionary. That's why you're getting the NO_DDIC_TYPE error.&lt;/P&gt;&lt;P&gt;A solution could be to create a DDIC structure for your type TWA_OUT.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Geert-Jan Klaps&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 08:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178517#M1979664</guid>
      <dc:creator>geert-janklaps</dc:creator>
      <dc:date>2020-03-08T08:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178518#M1979665</link>
      <description>&lt;P&gt;Thanks for the guidance.&lt;/P&gt;&lt;P&gt;Is there no other way?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 08:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178518#M1979665</guid>
      <dc:creator>srahemi</dc:creator>
      <dc:date>2020-03-08T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178519#M1979666</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could try to use CL_ABAP_ELEMDESCR for each field in the structure and use method GET_DDIC_FIELD. Might be necessary to refer to the actual types in stead of using for example PLKO-STATU.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Geert-Jan Klaps &lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 08:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178519#M1979666</guid>
      <dc:creator>geert-janklaps</dc:creator>
      <dc:date>2020-03-08T08:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178520#M1979667</link>
      <description>&lt;P&gt;Can you give me an example?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 09:39:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178520#M1979667</guid>
      <dc:creator>srahemi</dc:creator>
      <dc:date>2020-03-08T09:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178521#M1979668</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/833075/srahemi.html"&gt;Sina Rahemi&lt;/A&gt; concerning GET_DDIC_FIELD, there are lots of examples in the forum or in blog posts.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 13:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178521#M1979668</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-08T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178522#M1979669</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;srahemi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Based on your example you could do something like this (in stead of using ls_stru-&amp;gt;get_ddic_field_list).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lo_element TYPE REF TO cl_abap_elemdescr.

* Read structure components
DATA(lt_components) = ls_stru-&amp;gt;get_components( ).

* Loop over components
LOOP AT lt_components INTO DATA(ls_component).

* Cast data descriptor into element descriptor
  lo_element ?= ls_component-type.

* Read data dictionary description
  lo_element-&amp;gt;get_ddic_field(
*    EXPORTING
*      p_langu      = SY-LANGU         " Current Language
    RECEIVING
      p_flddescr   = DATA(ls_field_description)
    EXCEPTIONS
      not_found    = 1                " Type could not be found
      no_ddic_type = 2                " Typ is not a dictionary type
      others       = 3
  ).
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Geert-Jan Klaps&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 13:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178522#M1979669</guid>
      <dc:creator>geert-janklaps</dc:creator>
      <dc:date>2020-03-08T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With GET_DDIC_FIELD_LIST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178523#M1979670</link>
      <description>&lt;P&gt;Thank you &lt;A href="https://answers.sap.com/users/439922/geert-jan.klaps.html"&gt;Geert-Jan Klaps&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Also I was able to find this and it worked&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LS_STRU ?= CL_ABAP_STRUCTDESCR=&amp;gt;DESCRIBE_BY_DATA( P_DATA = WA_OUT ).
LT_DDFIELD_HD = CL_SALV_DATA_DESCR=&amp;gt;READ_STRUCTDESCR( LS_STRU ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Mar 2020 13:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-ddic-field-list/m-p/12178523#M1979670</guid>
      <dc:creator>srahemi</dc:creator>
      <dc:date>2020-03-08T13:42:58Z</dc:date>
    </item>
  </channel>
</rss>

