Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Re: Pull up data from excel and update it in SAP then Save.

$
0
0

How to save a pdf copy of invoice from vf03 t-code in SAP using the vbscript?

 

Hi Holger Kohn,

 

 

I am trying to save PDF copy of invoices from VF03 screen to desktop.

When i record the scripts for the navigation which i do...it records the script till the print preview screen as mentioned below and i am not able to proceed further to save it in desktop.

Invoice print preview screen.JPG

Can you please help me get the VB scripts until it saves it in desktop.

I appreciate your help.


Codes as below:-

********************************************************************************************

If Not IsObject(application) Then

   Set SapGuiAuto  = GetObject("SAPGUI")

   Set application = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(connection) Then

   Set connection = application.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 application, "on"

End If

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

session.findById("wnd[0]/tbar[0]/okcd").text = "/nvf03"

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

session.findById("wnd[0]/usr/ctxtVBRK-VBELN").text = "5100078962"

session.findById("wnd[0]/mbar/menu[0]/menu[11]").select

session.findById("wnd[1]").sendVKey 37

 

****************************************************************************************************

 

Invoice print preview screen.JPGT

Thanks,

Karthik


Viewing all articles
Browse latest Browse all 8451

Trending Articles



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