Quantcast
Channel: SCN : Discussion List - Scripting Languages
Viewing all articles
Browse latest Browse all 325

Excel VBA Script for Services for Object ToolBox - the "Import File" dialog Box

$
0
0

Dear Community,

 

I'm trying to automate the creation of attachments using Services for Object in SAP transaction IW22 via Excel VBA.

 

My issue is similar to what umur erkmen  faced 3 years ago, which was solved together with Script Man  in this thread: http://scn.sap.com/thread/1799453

 

From what I understand from the discussion, the solution was to start a script which loops to detect for the "Import File" window and if found send the filename string via sendkey method to the dialog box. Concurrently, run the main script to execute Services for Object create attachment i.e. the following:

 

session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"

session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_PCATTA_CREA"

(****the "Import File" dialog box pops here****)

 

Is there a better way to do this i.e. Is there any method or properties within the SAP Scripting API or VBA that allow to send data to the "Import File" dialog box directly?

 

BTW, script recording does not record the selection of files in the "Import File" dialog box or capture any path and filename string. This is because the dialog box is not an SAP screen but a native Windows screen.

 

Thanks in advance for any tips.

Sayuti.

 


 

Message was edited by: Sayuti Azmi


Viewing all articles
Browse latest Browse all 325

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>