Skip to Content
author's profile photo Former Member
Former Member

Retrieve IDoc Segment Format

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.

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:

Data: lt_segstru type table of LEDID_T_SEGMENT_STRUCT.

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:

The type "LEDID_T_SEGMENT_STRUCT" is unknown.	

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 07:53 PM


    you can try with this program:

    don't forget to include the "TYPE-POOLS ledid." line at the begining, this is the reason why you are receiving the error message.

    REPORT ztestdpo2 .

    TYPE-POOLS ledid.

    PARAMETERS: p_segtyp LIKE edisegmhd-segtyp.

    DATA t_segment_struct TYPE ledid_t_segment_struct.

    DATA wa_segment_struct LIKE LINE OF t_segment_struct.




    segtyp = p_segtyp

    • VERSION = '3'


    segment_struct = t_segment_struct


    segment_unknown = 1

    segment_structure_unknown = 2

    segment_not_in_release = 3

    OTHERS = 4


    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.


    LOOP AT t_segment_struct INTO wa_segment_struct.

    WRITE:/ wa_segment_struct.




    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 15, 2005 at 02:56 AM

    In your TOP include, add the following statement.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.