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: 

Read idoc from archive in program

Former Member
0 Kudos

Hi All,

I want to read the idoc from the archive in the program.

Please suggest the possible options.

we can read the idoc present in the R/3 database using the FM idoc_read_completely.

But how to read the same from the archive. I can view the idoc from the t-code we10.

Thanks in Advance.

Ankit Gupta

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You have a couple options here.

1. Use the Archive Development Kit (ADK). There are a bunch of functions in function group ARCH that are useful for reading archive files. For an example, see program RSEXARCR.

2. Import the data into the Archive Information System. You'll have to populate an infostructure, and then you could write an ABAP program to read that.

5 REPLIES 5

Former Member
0 Kudos

You have a couple options here.

1. Use the Archive Development Kit (ADK). There are a bunch of functions in function group ARCH that are useful for reading archive files. For an example, see program RSEXARCR.

2. Import the data into the Archive Information System. You'll have to populate an infostructure, and then you could write an ABAP program to read that.

0 Kudos

Hi Kevin,

Thanks for quick reply.

For all the archiving FM in the function group ARCH, I need to specify the file name.

I want a solution where I just pass on the idoc number and it give me the idoc data record (EDID4).

It would be some modified form of t-code we10.

Please help.

Regards,

Ankit

0 Kudos

Check the function module EDI_IDOC_GET_FROM_ARCHIVE to read the archived IDOC..

<i>*Reward each useful answer</i>

Raja T

0 Kudos

Thanks buddy.

I will try this in my code. Look like it will solve my problem.

But now I have another question. Should I start new thread or can post in the same thread.

Archive infostructure SAP_IDOC_001 is not active in my system. what is the procedure to do it and also it should link to the existing Archive file also.

Regards,

Ankit

Former Member
0 Kudos

You can activate this in transaction SARI. Go to Customizing, enter the infostructure, and click Activate. Then, to populate it, go back to the beginning screen in SARI and click Status.

Once you have activated this, it will most likely get populated with every archiving job for that object. If this is not what you want, you should deactive this after you get what you need.