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

5
How to extract data from custom made Idoc that is not sent This question has been Answered. Max M Nov 23, 2010 5:03 PM 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! Correct Answer by Rahul K Rai on Nov 24, 2010 8:22 PM 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. 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.

description

data extraction

Transcript of How to extract data from custom made Idoc that is not sent.docx

Page 1: How to extract data from custom made Idoc that is not sent.docx

How to extract data from custom made Idoc that is not sentThis question has been Answered.

Max MNov 23, 2010 5:03 PMHi 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!

Correct Answer by Rahul K Rai  on Nov 24, 2010 8:22 PMHi, 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.

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 containsSegment 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.

Max M Nov 24, 2010 12:49 AM (in response to Rahul K Rai)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 numbercounter - (blank)

Page 2: How to extract data from custom made Idoc that is not sent.docx

number - it looks like it counts number of lines in this tableSAP segment name u2013 name of segmenthier.level u2013 1st row has u201C1u201D and all the rest rows has u201C2u201Dlength u2013 all rows has the same value of u201C1.000u201Dapplication 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?

Rahul K Rai Nov 24, 2010 2:13 AM (in response to Max M)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           LENGTHSEGMENT1         FIELD1                   4SEGMENT1         FIELD2                   2SEGMENT1         FIELD3                   2 Data in EDID4 would be as follows IDOC           SEGMENT                          APPLICATION DATA12345         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 FIELD1Similarly,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.

Max M Nov 24, 2010 1:40 PM (in response to Rahul K Rai)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

Rahul K Rai Nov 24, 2010 3:23 PM (in response to Max M)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: 

Page 3: How to extract data from custom made Idoc that is not sent.docx

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.Max M Nov 24, 2010 6:53 PM (in response to Rahul K Rai)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 DiagnosisThe 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.

Rahul K Rai Nov 24, 2010 8:22 PM (in response to Max M)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.

Max M Nov 25, 2010 12:13 AM (in response to Rahul K Rai)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.

Page 4: How to extract data from custom made Idoc that is not sent.docx

 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! 

Exporting data from IDOC to excel sheetThis question has been Answered.

Dear All,

I wanted to export IDOC information into excel sheet how can I do that?

I have suggested the client to go to WE02 select the IDOC in question and then select PRINT IDOC and then

select list and select export and then excel sheet and location of the file and save. But in the client screen the

movement he selects Print IDOC he is getting an option to select printer.

Can anyone guide me as to how we can export the IDOC data into excel sheet.

Alternatively you can go to the transaction IDOC and check Analyse Idoc field values in the check programs tab.

Once you execute, it will ask for the idoc number. Execute with the idoc number and you would get a ALV list.

You can go to system> List> Save as Local file.

 

go to WE02 => Menu "IDoc" => Print IDoc => Menu "List" => Export => Spreadsheet

Choose all avalilable formats.

Save the XLS file

thank you for the reply ,

 

but when they go to Tcode WE02, and get the display of IDOC, and when they select the IDOC by double

clicking it . and when they select MENU-IDOC-Print IDOC they are not going to the screen where we get the

various columns , here itself they r getting the printer option. is there  way to deactivate the printer option and for

them to get varios colums for us to export it to excel

you can try this:

Menu "System" => User profile  => Own data

Go to tab "Defaults" and enter LOCL under OutputDevice.

 

If this does not work there might be no sufficient authorization for the user in his roles. You must contact

someone form basis / security then.

Alternatively you can go to the transaction IDOC and check Analyse Idoc field values in the check programs tab. Once you execute, it will ask for the idoc number. Execute with the idoc number and you would get a ALV list. You can go to system> List> Save as Local file.

I have tired the method which you have given me but will it give me the same data as i get from WE02? as i can

see i get ony 119 fields in this way (IDOC method) whereas WE02 is giving me 241 feilds   a difference of 122 feilds

I presume what you do not get are the empty fields by using the IDOC transaction as compared to WE02. In IDOC transaction click on Also Output Empty fields, and see if it works.