Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

idoc segment fields

Former Member
0 Likes
16,827

experts

which tcode is used to see the idoc segement fields basically i want to see the orders01 idoc segment fields,

I checked we60 ,we30 etc but not much use. I want to see the descripton of the fields as well. I mean i want to know which field for sales org , which field for po in sales order etc

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,413

Hi,

Here is a brief info to find field segments of an idoc.

Interpreting an IDoc Segment Info

All IDoc data records are exchanged in a fixed format, regardless of the segment type. The segmentu2019s true structure is stored in R/3u2019s repository as a DDic structure of the same name.

R/3 is only interested in the segment name

The segment info tells the IDoc processor how the current segment data is structured and should be interpreted. The information, which is usually the only interest, is the name of the segment EDID4-SEGNAM.

Segment name tells the data structure

The segment name corresponds to a data dictionary structure with the same name, which has been created automatically when defining the IDoc segment definition with transaction WE31 .

Remaining information is only for foreign systems

For most applications, the remaining information in the segment info can be ignored as being redundant. Some older, non-SAP-compliant partners may require it. E.g. the IDoc segment info will also store the unique segment number for systems, which require numeric segment identification.

To have the segment made up for processing in an ABAP, it is usually wise to move the segment data into a structure, which matches the segment definition.

For a segment of type e1maram the following coding is commonly used:

Data in EDID4-SDATA 
TABLES: e1maram.
   . . . 
MOVE edidd-sdata TO e1maram.

Then you can access the fields of the IDoc segment EDIDD-SDATA as fields of the structure e1maram .

Data in EDID4-SDATA 
WRITE: e1maram-matnr.

Sample coding

The following coding sample, shows how you may read a MATMAS IDoc and extract the data for the MARA and MARC segments to some internal variables and tables.

DATA: tmarc AS STANDARD TABLE OF e1marcm 

            WITH HEADER LINE.

LOOP AT edidd.

   CASE edidd-segnam.

         WHEN 'E1MARAM'.

          MOVE edidd-sdata TO xmara.

         WHEN 'E1MARCM'.

           MOVE edidd-sdata TO tmarc.

          APPEND tmarc.

   ENDCASE.

ENDLOOP.

Hope this solves your problem.

Thank you,

Pavan.

5 REPLIES 5
Read only

Former Member
0 Likes
7,413

Hi ,

Check tcode-WE61.

Regards,

Himanshu V

Read only

0 Likes
7,413

thanks verma.

is there any other tcode which gives the discription of the fields of the segments etc

Read only

0 Likes
7,413

WE61 itself you can find the description of the fields & segments...

Read only

Former Member
0 Likes
7,413

Hello,

Try transaction code WE31.

Thanks,

Augustin.

Read only

Former Member
0 Likes
7,414

Hi,

Here is a brief info to find field segments of an idoc.

Interpreting an IDoc Segment Info

All IDoc data records are exchanged in a fixed format, regardless of the segment type. The segmentu2019s true structure is stored in R/3u2019s repository as a DDic structure of the same name.

R/3 is only interested in the segment name

The segment info tells the IDoc processor how the current segment data is structured and should be interpreted. The information, which is usually the only interest, is the name of the segment EDID4-SEGNAM.

Segment name tells the data structure

The segment name corresponds to a data dictionary structure with the same name, which has been created automatically when defining the IDoc segment definition with transaction WE31 .

Remaining information is only for foreign systems

For most applications, the remaining information in the segment info can be ignored as being redundant. Some older, non-SAP-compliant partners may require it. E.g. the IDoc segment info will also store the unique segment number for systems, which require numeric segment identification.

To have the segment made up for processing in an ABAP, it is usually wise to move the segment data into a structure, which matches the segment definition.

For a segment of type e1maram the following coding is commonly used:

Data in EDID4-SDATA 
TABLES: e1maram.
   . . . 
MOVE edidd-sdata TO e1maram.

Then you can access the fields of the IDoc segment EDIDD-SDATA as fields of the structure e1maram .

Data in EDID4-SDATA 
WRITE: e1maram-matnr.

Sample coding

The following coding sample, shows how you may read a MATMAS IDoc and extract the data for the MARA and MARC segments to some internal variables and tables.

DATA: tmarc AS STANDARD TABLE OF e1marcm 

            WITH HEADER LINE.

LOOP AT edidd.

   CASE edidd-segnam.

         WHEN 'E1MARAM'.

          MOVE edidd-sdata TO xmara.

         WHEN 'E1MARCM'.

           MOVE edidd-sdata TO tmarc.

          APPEND tmarc.

   ENDCASE.

ENDLOOP.

Hope this solves your problem.

Thank you,

Pavan.