Application Development 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: 

How to read data from idoc to internal table?

Former Member
0 Kudos

Hi

How to get data from idoc segments to internal table?

2 REPLIES 2

Former Member
0 Kudos

Hi

Check this ex

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: xmara LIKE mara.

DATA: tmarc LIKE marc

OCCURS 0

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.

now do something with xmara and tmarc.

hope this helps you...

Reward points if useful..

Regards

Sreenivas

Former Member
0 Kudos

Use FM IDOC_READ_COMPLETELY, and loop through INT_EDIDD to get the segments you want