I am trying to create a script that will go into SAP ( the system we use at work) open an invoice in sap and save it to a specific folder. I have the first part that opens up the invoice working perfectly but I am stuck on the saving part. Once I click on the invoice it opens adobe pdf viewer in IE and I'll get an address that looks like this:
and obviously this address will change with every invoice.
I am not sure if this is even possible but any help I can get would be greatly appreciated as I would be a hero at work. Below is the code I already have but I am not sure how much help it will be as this already works:
Thank you in advance to any help that anyone can give me.
PHP:
'http://tmprapps06.XXXX.net:8080/archive?get&pVersion=0045&contRep=P1&docId=r5jo5r31en6vhmdu2njsj3fmdoya3
I am not sure if this is even possible but any help I can get would be greatly appreciated as I would be a hero at work. Below is the code I already have but I am not sure how much help it will be as this already works:
PHP:
session.FindById("wnd[0]").Maximize
session.FindById("wnd[0]/tbar[0]/okcd").Text = "/nea40"
session.FindById("wnd[0]").SendVKey 0
session.FindById("wnd[0]/usr/ctxtERDK-OPBEL").Text = InvoiceNumber
session.FindById("wnd[0]/usr/ctxtERDK-OPBEL").CaretPosition = 11
session.FindById("wnd[0]").SendVKey 0
session.FindById("wnd[0]/tbar[1]/btn[16]").Press
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").SetCurrentCell -1, "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").SelectColumn "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").PressColumnHeader "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").SetCurrentCell -1, "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").SelectColumn "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").PressColumnHeader "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").CurrentCellColumn = "BITM_DESCR"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").SelectedRows = "0"
session.FindById("wnd[1]/usr/cntlCUSTOM_CONTAINER_100/shellcont/shell").DoubleClickCurrentCell
Thank you in advance to any help that anyone can give me.