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: 

Hotspot in excel

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member228804
Participant
0 Kudos

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.

12 REPLIES 12

former_member228804
Participant
0 Kudos

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.

0 Kudos

Hi Dnyanesh

Yes ı think its possible with ole . But I didnt find any samples like this . But I found out this link

it is very help full . If  I could combine ole with this link I think my problem wil be solved

0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

Did you search and read Creating a SAP shortcut for any transaction and sending it by mail or similar documents before posting ?

Regards,

Raymond

0 Kudos

@raymond

yep its useless for me .

0 Kudos

Well you could include the shortcut as an hyperlink in Excel...

Regards,

Raymond

Former Member
0 Kudos

Yes there should be a way similar to hyperlinks in excel (using macros).

You need to first learn the usage of abap2xlsx project, and then ask excel macro question in space.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

You can use webgui

http://scn.sap.com/thread/1423207

I haven't tried with a PO...