2015 Feb 10 7:37 AM
Hi Abapers,
I have the request to extract some master data and related documents from SAP to a Windows network drive. The master data catalogue should be an Excel file, which may be enhanced by additional rows.
For each master data entry there should be a hyperlink to a specific folder, where related documents will be available after download from SAP to this folder.
In a first development step I tried to create this excel catalogue using the interfaces I_OI_DOCUMENT_PROXY and I_OI_SPREADSHEET. As a simple sample I've tried with two fields MARA-MATNR and MAKT-MAKTX.
Already working are the functions:
This is the excel sheet created by my report (Material description is replaced ).
But now I can't find a method to insert a hyperlink to the material number cells. It should link to folder "../000000000000000289' for material number 000000000000000289 in cell A3 (row 3 column 1).
How can I achieve this using the interfaces I_OI_DOCUMENT_PROXY and I_OI_SPREADSHEET ?
Thanks for your help!
Klaus
2015 Feb 10 6:55 PM
Hi,
Here is my quick and dirty attempt.
regards.
See program y_r_eitan_test_25_07 .
2015 Feb 10 8:52 AM
Hi,
Just thinking...... can you generate HTML instead of Excel ?
regards .
2015 Feb 10 9:22 AM
Hi Eitan,
thanks for your interest. I choose excel and DOI, because I can read the excel sheet data with DOI into an internal table, and I have the option to insert rows in a specific sort order. Do you know a tool like DOI to read html table contents into an internal ABAP table like DOI for excel?
The problem is, that I need an existing catalogue to be extended in the correct sort order.
Regards,
Klaus
2015 Feb 10 9:36 AM
Hi,
See if this is useful:
Found it using google "excel with url"
2015 Feb 10 9:44 AM
Hi,
I just noticed that if you use UNC naming it is working....
So maybe just create an extra column with the required path.
Regards.
2015 Feb 10 11:39 AM
Hi Eitan,
I've added a new column and checked this.
These hyperlinks in Excel are working automatically, if I directly insert them in Excel. But If I fill them with DOI, they don't work as hyperlinks, but show as normal text only. This looks like a format issue, but I can't find a hyperlink format option for cells in DOI.
In the last line I simply overwrote the leading F of file with F and it became a hyperlink automatically. But I need to do this with DOI.
I've tried with method UPDATE_DOCUMENT_LINKS of interface I_OI_DOCUMENT_PROXY. But there was no effect.
I've attached my sample report now.
Regards,
Klaus
2015 Feb 10 12:32 PM
Hi,
I need to play with this I have never used package SOFFICEINTEGRATION .
Regards
2015 Feb 10 6:55 PM
Hi,
Here is my quick and dirty attempt.
regards.
See program y_r_eitan_test_25_07 .
2015 Feb 11 7:47 AM
Hi Eitan,
thank you for your input. Your solution told me the way.
After changing field values to '=HYPERLINK("...")' there was still no hyperlink there:
So it didn't work for me, but in your sample it was working. My thought was, that this might be caused by method I_OI_SPREADSHEET->CELL_FORMAT. So in the next try I formatted the header part only and I got the following result:
Now the material number was no longer a text and the hyperlink was working. After searching for some documentation of structure SOI_SELL_ITEM I found some new fields I've never seen in DOI samples until now. So I didn't use them. One of them is field NUMBER. After splitting the format of the data cells into two parts for normal data and hyperlink data it was working as desired and the link opens the folder:
Thank you for your help. Great idea to let excel do the hyperlink job instead of DOI. My Excel knowledge is very poor.
If somebody else has an issue like that, I've attached the report and the DDIC structure ZTBC_EXCEL_SAMPLE below.
Regards,
Klaus
2015 Feb 11 8:19 AM
Hi,
Great !!
I want to thank you on behalf of some grateful people here that were not aware of SOFFICEINTEGRATION .
Regards