Quantcast
Channel: SCN : All Content - Scripting Languages
Viewing all articles
Browse latest Browse all 522

not able to record script to upload a file into sap.

$
0
0

Hello All,

 

Below is my script to upload a file into SAP. But i am not able to get the script for selecting a file. can one please help me to finish this code.

 

 

Sub Rectangle1_Click()

If Not IsObject(Application1) Then

   Set SapGuiAuto = GetObject("SAPGUI")

   Set Application1 = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(Connection) Then

   Set Connection = Application1.Children(0)

End If

If Not IsObject(session) Then

   Set session = Connection.Children(0)

End If

If IsObject(Wscript) Then

   Wscript.ConnectObject session, "on"

   Wscript.ConnectObject Application1, "on"

End If

session.findById("wnd[0]").maximize

session.findById("wnd[0]/tbar[0]/okcd").Text = "/ncor2"

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/usr/ctxtCAUFVD-AUFNR").Text = "1RIR0104"

session.findById("wnd[0]").sendVKey 0

 

 

 

 

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

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

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").pressToolbarContextButton "%ATTA_CREATE"

session.findById("wnd[1]/usr/cntlCONTAINER_0100/shellcont/shell").selectContextMenuItem "%GOS_PCATTA_CREA"

 

-------------

Selecting file script is not coming.. please provide your inputs to select a file through selection window.

-------------

 

 

 

End Sub


Viewing all articles
Browse latest Browse all 522

Latest Images

Trending Articles



Latest Images