<?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: Retrieve IDoc Segment Format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092483#M101199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;you can try with this program:&lt;/P&gt;&lt;P&gt;don't forget to include the "TYPE-POOLS ledid." line at the begining, this is the reason why you are receiving the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztestdpo2                               .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS ledid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_segtyp  LIKE edisegmhd-segtyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA t_segment_struct TYPE  ledid_t_segment_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA wa_segment_struct LIKE LINE OF t_segment_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'IDOC_SEGMENT_STRUCTURE_READ'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RELEASE                         = SY-SAPRL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    segtyp                          = p_segtyp&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VERSION                         = '3'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    segment_struct                  = t_segment_struct&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   segment_unknown                 = 1&lt;/P&gt;&lt;P&gt;   segment_structure_unknown       = 2&lt;/P&gt;&lt;P&gt;   segment_not_in_release          = 3&lt;/P&gt;&lt;P&gt;   OTHERS                          = 4&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_segment_struct INTO wa_segment_struct.&lt;/P&gt;&lt;P&gt;  WRITE:/ wa_segment_struct.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saludos&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2005 19:53:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-14T19:53:49Z</dc:date>
    <item>
      <title>Retrieve IDoc Segment Format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092482#M101198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the SAP function IDOC_SEGMENT_STRUCTURE_READ to retrieve the structure of an IDoc segment.  This function returns a table SEGMENT_STRUCT of type LEDID_T_SEGMENT_STRUCT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I call this function from my ABAP function, I am using the following definition for the table I am sending to IDOC_SEGMENT_STRUCTURE_READ:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: lt_segstru type table of LEDID_T_SEGMENT_STRUCT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the same type in my internal function as is used in the SAP function, but when I try to activate my function, I am receiving the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The type "LEDID_T_SEGMENT_STRUCT" is unknown.	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that LEDID_T_SEGMENT_STRUCT points to the type group of LEDID.  How do I write my table definition in my calling function to match the format of the table returned in IDOC_SEGMENT_STRUCTURE_READ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2005 19:30:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092482#M101198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-14T19:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve IDoc Segment Format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092483#M101199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;you can try with this program:&lt;/P&gt;&lt;P&gt;don't forget to include the "TYPE-POOLS ledid." line at the begining, this is the reason why you are receiving the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztestdpo2                               .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS ledid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_segtyp  LIKE edisegmhd-segtyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA t_segment_struct TYPE  ledid_t_segment_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA wa_segment_struct LIKE LINE OF t_segment_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'IDOC_SEGMENT_STRUCTURE_READ'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RELEASE                         = SY-SAPRL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    segtyp                          = p_segtyp&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VERSION                         = '3'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    segment_struct                  = t_segment_struct&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   segment_unknown                 = 1&lt;/P&gt;&lt;P&gt;   segment_structure_unknown       = 2&lt;/P&gt;&lt;P&gt;   segment_not_in_release          = 3&lt;/P&gt;&lt;P&gt;   OTHERS                          = 4&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_segment_struct INTO wa_segment_struct.&lt;/P&gt;&lt;P&gt;  WRITE:/ wa_segment_struct.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saludos&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2005 19:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092483#M101199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-14T19:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve IDoc Segment Format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092484#M101200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your TOP include, add the following statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS LEDID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Oct 2005 02:56:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-idoc-segment-format/m-p/1092484#M101200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-15T02:56:33Z</dc:date>
    </item>
  </channel>
</rss>

