Skip to Content
avatar image
Former Member

Sales order from excel to SAP problem

Hi Experts,

I have a excel file which will automatically create a sales order to SAP, information is picked from excel cells. My problem is, if some of the products are out of stock, back order window appears and script fails.

How to write a code, which considers following:

If some product(s) are out of stock, system would press F5, (session.findById("wnd[0]").sendVKey 5), which will approve back order.

if not, the script would ignore code (session.findById("wnd[0]").sendVKey 5) and continue

D

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 28, 2011 at 08:53 AM

    There is only one Possible Way to do this,

    You can check if the backorder Window pops up and then do press F5 (or any Key you need ...)

    PLace this code where the Window will popup

    on error resume next
    If err.number > 0 then
     if session.findbyId("wnd[1]").Text  = "Backorder" Then     ' here goes the Caption of the backorder-Window
              'Do some Keypress
               session.findById("wnd[1]").SendVKey 5  'dont know the KeyCode you need (dont have access to that TA
     End if
    end if
    On error Goto 0
    

    Greetings

    Thomas

    Add comment
    10|10000 characters needed characters exceeded