04-17-2014 8:30 AM
I am sending a mail with excel attachement.In this excel there are POs .User wants hotspot like as in alv or double click which leads to transaction me23n with clicked PO.Is there any way to do this.
04-17-2014 12:45 PM
Hi Oldun,
I suppose your requirement is to double click or hotspot event upon your Excel file and not ALV report. Is this how it is supposed to be? Correct me if I am wrong.
This is possible but requires Object Link Enabling (OLE) programming. You will have to open the file using OLE-OPEN at runtime , read the file and the get the purchase order number selected by the user at runtime, set the parameter-id of that PO number and close the file at runtime.
This is gonna be difficult though. Just check. This requirement seems to be a bit weird though. I mean how much effort does it take to just select a particular PO number from the excel go to ME23 and paste it.??
Regards,
Dnyanesh.
04-17-2014 12:45 PM
Hi Oldun,
I suppose your requirement is to double click or hotspot event upon your Excel file and not ALV report. Is this how it is supposed to be? Correct me if I am wrong.
This is possible but requires Object Link Enabling (OLE) programming. You will have to open the file using OLE-OPEN at runtime , read the file and the get the purchase order number selected by the user at runtime, set the parameter-id of that PO number and close the file at runtime.
This is gonna be difficult though. Just check. This requirement seems to be a bit weird though. I mean how much effort does it take to just select a particular PO number from the excel go to ME23 and paste it.??
Regards,
Dnyanesh.
04-17-2014 1:05 PM
04-18-2014 10:57 PM
As far as I know you cannot call transaction with SAP.net connector, you can only call RFC FM , but this could also help you. You can call an RFC in SAP to set parameter for PO number and then from excel you should build a temporary SAP link file which will call ME23N, then execute it.
At the end SAP link file it's only text file.
Regards
Lukasz
04-17-2014 12:49 PM
Did you search and read Creating a SAP shortcut for any transaction and sending it by mail or similar documents before posting ?
Regards,
Raymond
04-17-2014 1:06 PM
04-17-2014 1:19 PM
Well you could include the shortcut as an hyperlink in Excel...
Regards,
Raymond
04-17-2014 3:22 PM
04-17-2014 3:57 PM
Or just some OLE2 to execute a code similar to this recorded macro :
Range("C3").Select | |
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="xxxxxx", TextToDisplay:="yyyy" |
Regards,
Raymond
04-17-2014 5:59 PM
Yes, it is the better way to get it done.
I thought the moment i write OLE, next person will jump in with abap2xlsx suggestion, irrespective of whether he has actually given it a try.
04-17-2014 8:21 PM
Why using Macro for creating an external link?
You can simply write something like (see ZDEMO_EXCEL1)
lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'http://www.abap2xlsx.org' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 4 ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ).
Ivan
04-18-2014 5:18 AM
User wants the hotspot to launch SAP GUI with transaction ME23N displaying the PO number that is in clicked cell.
SAP GUI or a shortcut for ME23N can be launched using external link.
I am not sure whether a PO can be opened this way.
04-21-2014 3:08 PM