cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract data from custom made Idoc that is not sent

Former Member
0 Kudos

Hi experts,

Could you please advise if there is a way how to extract data from custom made idoc (it collects a lot of data from different SAP tables)? Please note that this idoc is not sent as target system is not fully maintained.

As by now, we would like to verify - what data is extracted now.

Any help, would be appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The data that exists in an IDOC can be found in table EDID4. This table gives you multiple entries for an IDOC.

If any IDOC has 10 segments present in it, this table would contain 10 records for this idoc, along with the segment name field & segment data in the table.

There's another table EDSAPPL, which would give you the fields that exist in each segment and its length.

Now since, each segment inside an IDOC contains multiple fields, therefore, the field that contains Segment data in EDID4 is a long one. To actually understand the data contained in this field, you would have to map the field length given in EDSAPPL with the position of data in EDID4.

This way you can extract the data from any IDOC.

Former Member
0 Kudos

Hi, thanks for the info I helped a bit u2013 at least I have seen something.

I have used EDID4 table and added idoc number. As a result, I see the following table with below columns and data:

Idoc no. u2013 just idoc number

counter - (blank)

number - it looks like it counts number of lines in this table

SAP segment name u2013 name of segment

hier.level u2013 1st row has u201C1u201D and all the rest rows has u201C2u201D

length u2013 all rows has the same value of u201C1.000u201D

application data u2013 has actual data from every segment fields. This data is just put in one row

Table EDSAPPL gives every segment field name and itu2019s length.

But, I still donu2019t get how can I map info from u201Capplication datau201D from EDID4 with every field name from EDSAPPL table. As a result, I need to see segment, all itu2019s fields and content from every field. Please note that every segment has multiple fields.

Is it possible?

Former Member
0 Kudos

Hi,

The fields that are given for each segment have their length given in EDSAPPL table. How you have to map is explained in below example.

Suppose for segment1, EDSAPPL has 3 fields so below are entries

SEGMENT FIELDNAME LENGTH

SEGMENT1 FIELD1 4

SEGMENT1 FIELD2 2

SEGMENT1 FIELD3 2

Data in EDID4 would be as follows

IDOC SEGMENT APPLICATION DATA

12345 SEGMENT1 XYZ R Y

When you are extracting data from these tables into your internal table, mapping has to be as follows:

FIELD1 = APPLICATIONDATA+0(4) to read first 4 characters of this field, because the first 4 characters in this field would belong to FIELD1

Similarly,

FIELD2 = APPLICATIONDATA+4(2).

FIELD3 = APPLICATIONDATA+6(2).

FIELD1 would have XYZ, FIELD2 = R, FIELD3 = Y

This would remain true in all cases. So all you need to do is identify which fields you want to extract, and simply code as above to extract the data from this table.

Hope this was helpful in explaining how to derive the data.

Former Member
0 Kudos

Great, I appreciate a lot for your help. I was able to extract each SAP field content from "application data" using Excel functions LEFT and MID.

But, have faced another issue - application data field didn't capture all content...

is there any limitation how many characters or how many SAP fields from segment it could capture?

Edited by: Maksims Mihejevs on Nov 24, 2010 1:37 PM

Former Member
0 Kudos

Hi,

I guess what you are referring to is that when you display the contents in SE16, Application data field doesn't show the entire data.

This happens because the screen layout shows only 255 characters for this field, even though the actual length for this field is 1000 characters. You can do as follows:

1. Give the idoc number in EDID4 screen and execute it.

2. When you reach the contents screen, go to Menu bar -> Settings -> Layout-> Change.

3. Change the below on the pop-up screen

Application data - Change the length from 255 to 950(cannot set it 1000 as the maximum characters possible in a screen are 1020 and there are other fields as well that you need to show on screen.)

In normal scenario, I dont think that your IDOC segments should exceed 500/ 600 characters in Application data. So this way should work, else if you need to display all the 1000 characters of this field, you would have to write a program to extract the data from database table to excel file.

Former Member
0 Kudos

Thanks for fast reply!

I have changed "Maximum Width Hit List (in chars.)" field value from 255 to 900, but I still see the same values when I extract table to Excel or when I view it via se16n...

I have found that field via Help -> Setting, as I couldn't find your path.

Please note that I have SAP R3 release 510_620.

By the way, when I tried to execute the same via se16 and got below SAP error message:

Field Appl.data is too wide to display (field will be truncated)

Message no. MO441

Diagnosis

The field Appl.data is more than 200 characters long.

System Response

and I have found another field in Help - Settings, under System defaults with the title -


changeable --- and value 255 (No Limit). It looks that it's restricted by the system not display more then 255 characters.

Is it possible to increase it on user level?

Please kindly comment.

The field is output in a format restricted to 200 characters.

Former Member
0 Kudos

Hi,

The path that I mentioned was on Menu bar( the bar at the topmost of screen). There, Settings -> Layout-> Change and then change the lengthfor Application data to what I had mentioned. What you changed was Maximum Width list. This can only increas width of screen display. As the field length to be displayed for Application data has been restricted to 255, therefore even if you increas Maximum width list, there would be no difference.

Go to the path mentioned, and then increase the length of Application data field to 900.

As to your last question, you can change this field length for display at user level. There is no restriction on that.

Alternatively, try the below as well.

Change the table display from SE16 standard list to ALV list.(Get in touch with any ABAPer in your team and show him this statement, he would be able to help you out). Once you do this, some new icons would come up in Toolbar. One of those icons will be Change Layout. Click on that and change the length of Application data field.

If this way also doesn't works, then you would have to write a report to extract the data from table to excel.

Former Member
0 Kudos

Yeahha, it works !!! This menu appeared when I changed layout to ALV and then I changed application data field to 920. As a result, full content was shown in Excel.

Hei, you saved many days for many people as I need to evaluate almost 10 000 idocs and having this table would extremely help!!! I appreciate a lot for your time spent and extremely valuable answers.

Good luck!

Answers (0)