I would like to have your help in order to find the solution for the following. I would like to extract SAP standard invoices to PDF files. The steps are VF03 - insert billing doc - Menu: Billing Document - Issue output - select the line - print preview - PDF! + and then I have the pop-up window below. In the pop up window I would like to press the 'SAVE button' and then save the file with specific filename, which I have already copied to clipboard.
The code is the following
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 = invoice ' "1094542982"
SESSION.findById("wnd[0]/usr/ctxtVBRK-VBELN").caretPosition = 10
SESSION.findById("wnd[0]/mbar/menu[0]/menu[11]").Select
SESSION.findById("wnd[1]/usr/tblSAPLVMSGTABCONTROL").getAbsoluteRow(0).Selected = True
SESSION.findById("wnd[1]/tbar[0]/btn[37]").press
SESSION.findById("wnd[0]/tbar[0]/okcd").Text = "PDF!"
SESSION.findById("wnd[0]").sendVKey 0