<?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: IDoc - Get Segment Definition or Version in Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692451#M622927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;EDISDEF might be useful, but I'm not sure how to use it at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am supplied in the code a structure of type EDIDC, which has the following values (not all are listed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MANDT	C	3 	308
DOCNUM	N	16 	0000000000002050
DOCREL	C	4 	640
STATUS	C	2 	03
DOCTYP	C	8 
DIRECT	C	1 	1
RCVPOR	C	10 	SUBSYSABAP
RCVPRT	C	2 	B&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above represnets a particular IDoc being processed (see DOCNUM and DOCREL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The default code then uses a FM to get the segment data based on the DOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
      EXPORTING
           DOCUMENT_NUMBER         = I_EDIDC-DOCNUM
      TABLES
           IDOC_CONTAINERS         = I_EDIDD
      EXCEPTIONS
           DOCUMENT_NUMBER_INVALID = 1
           END_OF_DOCUMENT         = 2
           OTHERS                  = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of any FM that returns a EDID4 (has 30 char segment version) structure instead of a EDIDD structure (27 char seg def)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the value EDIDC-DOCREL (SAP Release for IDoc)  e.g.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;640&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;does not match up with values available in EDISDEF-RELEASED (IDoc development: Release of segment definition), e.g.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;30F&lt;/P&gt;&lt;P&gt;40A&lt;/P&gt;&lt;P&gt;45A&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I find if the segment definitions are&lt;/P&gt;&lt;P&gt;E2EDKA1 or &lt;/P&gt;&lt;P&gt;E2EDKA1001 or &lt;/P&gt;&lt;P&gt;E2EDKA1002 or &lt;/P&gt;&lt;P&gt;E2EDKA1003&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Aug 2007 05:25:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-19T05:25:04Z</dc:date>
    <item>
      <title>IDoc - Get Segment Definition or Version in Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692447#M622923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on the ABAP-PI Port, created a FM based on FM OWN_FUNCTION now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my FM, there is a call to a function &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'&lt;/P&gt;&lt;P&gt;that retrieves all the segment data for a particular IDoc number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it returns only the segment name EDIDD-SEGNAM and not the segment definition.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value returned: "E1EDKA1" ( EDIDD-SEGNAM , 27 char long field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm actually looking for the Segment Definition that goes up to 30 characters long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value I need to be returned: "E2EDKA1001" - has the extra 3 digits at the end that represents the Version. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you go to WEDI, Development &amp;gt; IDoc Segments, You can see that the Segment definitions belong to a data type EDISEGDEF (30 characters long).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can get this programmatically?&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;/P&gt;&lt;P&gt;The IDoc file downloaded by the FILE port stores the 30 char Segment Definition in the file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the ABAP-PI it only returns the segment name (27 char)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 09:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692447#M622923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T09:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc - Get Segment Definition or Version in Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692448#M622924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to get the segnam from EDID4 instead of EDIDD. Segnam field of EDID4 table is a char 30. I don't know if version is included but you can try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 10:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692448#M622924</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-08-16T10:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc - Get Segment Definition or Version in Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692449#M622925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Query the field SEGDEF in table EDISDEF for getting the segment definition.&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;shibu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 11:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692449#M622925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T11:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc - Get Segment Definition or Version in Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692450#M622926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i have found it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check table EDISDEF. You have the relation between segment and all his versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to find the table of a field when you know the field but not the table, like this case, you can use table DD03L in se11. You can try to put SEGDEF in FIELDNAME field and you can see that the result is EDISDEF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 11:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692450#M622926</guid>
      <dc:creator>former_member582701</dc:creator>
      <dc:date>2007-08-16T11:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc - Get Segment Definition or Version in Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692451#M622927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;EDISDEF might be useful, but I'm not sure how to use it at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am supplied in the code a structure of type EDIDC, which has the following values (not all are listed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MANDT	C	3 	308
DOCNUM	N	16 	0000000000002050
DOCREL	C	4 	640
STATUS	C	2 	03
DOCTYP	C	8 
DIRECT	C	1 	1
RCVPOR	C	10 	SUBSYSABAP
RCVPRT	C	2 	B&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above represnets a particular IDoc being processed (see DOCNUM and DOCREL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The default code then uses a FM to get the segment data based on the DOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
      EXPORTING
           DOCUMENT_NUMBER         = I_EDIDC-DOCNUM
      TABLES
           IDOC_CONTAINERS         = I_EDIDD
      EXCEPTIONS
           DOCUMENT_NUMBER_INVALID = 1
           END_OF_DOCUMENT         = 2
           OTHERS                  = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of any FM that returns a EDID4 (has 30 char segment version) structure instead of a EDIDD structure (27 char seg def)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the value EDIDC-DOCREL (SAP Release for IDoc)  e.g.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;640&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;does not match up with values available in EDISDEF-RELEASED (IDoc development: Release of segment definition), e.g.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;30F&lt;/P&gt;&lt;P&gt;40A&lt;/P&gt;&lt;P&gt;45A&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I find if the segment definitions are&lt;/P&gt;&lt;P&gt;E2EDKA1 or &lt;/P&gt;&lt;P&gt;E2EDKA1001 or &lt;/P&gt;&lt;P&gt;E2EDKA1002 or &lt;/P&gt;&lt;P&gt;E2EDKA1003&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2007 05:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-get-segment-definition-or-version-in-code/m-p/2692451#M622927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-19T05:25:04Z</dc:date>
    </item>
  </channel>
</rss>

