Set the breakpoint where the error occurs and debug it. See what goes on there. It's impossible to answer this without seeing how you are calling BAPI exactly. Also this is not an SD but ABAP question. Search in ABAP forum, the order BAPIs have been discussed hundreds of times.
P.S. You are calling BAPI IN VA01? This makes no sense...