on 04-20-2014 12:16 AM
Hi All,
I created a javascript button for save first screen in va01 , after save Sales order, execute transactions : Delivery (VL01N) / post goods isse and billing (VF01).
But the process "Post goods issue" is realized in update task and billin process return this message: "Document XXXX does not exist" Message no. VF03.
However when I inform documento number XXXX (Delivery) in VF01. The error does not happen. Because document number XXXX has been commited in data base.
I belive it is necessary to await processing "Post goods issue", but do not know how to do.
I tried command wait in javascript "setTimeout(function(){},5000);" , but did not work. Can anyone help me with any tips ?
Javascript Button:
{"Id":"405dfdf1-fea6-444f-bdaf-a3783ba5d014","Actions":[{"ActionCategory":"0","Action":"4","ControlID":"ses[0]\/wnd[0]\/menuMAIN\/item[0]\/item[6]","DerivedID":"ses[0]\/wnd[0]\/menuMAIN\/item[0]\/item[6]","AdjustedID":"ses[0]\/wnd[0]\/menuMAIN\/item[0]\/item[6]","Content":null},{"ActionCategory":"0","Action":"4103","ControlID":"ses[0]","DerivedID":null,"AdjustedID":null,"Content":""},{"ActionCategory":"0","Action":"4099","ControlID":"ses[0]\/wnd[0]\/sbar","DerivedID":"ses[0]\/wnd[0]\/sbar","AdjustedID":"ses[0]\/wnd[0]\/sbar","Content":"ov_msg"},{"ActionCategory":"0","Action":"3","ControlID":"ses[0]\/wnd[0]\/tbar[1]\/btn[20]","DerivedID":"ses[0]\/wnd[0]\/tbar[1]\/btn[20]","AdjustedID":"ses[0]\/wnd[0]\/tbar[1]\/btn[20]","Content":null},{"ActionCategory":"0","Action":"4103","ControlID":"ses[0]","DerivedID":null,"AdjustedID":null,"Content":""},{"ActionCategory":"0","Action":"4099","ControlID":"ses[0]\/wnd[0]\/sbar","DerivedID":"ses[0]\/wnd[0]\/sbar","AdjustedID":"ses[0]\/wnd[0]\/sbar","Content":"rm_msg"},{"ActionCategory":"0","Action":"4104","ControlID":"ses[0]","DerivedID":null,"AdjustedID":null,"Content":"setTimeout(function(){},5000);"},{"ActionCategory":"0","Action":"4098","ControlID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","DerivedID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","AdjustedID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","Content":"\/nvf01"},{"ActionCategory":"0","Action":"4097","ControlID":"ses[0]\/wnd[0]\/usrUSRAREA\/tblSAPMV60ATCTRL_ERF_FAKT\/colTABLECOLUMN[0]\/cell[1]","DerivedID":"ses[0]\/wnd[0]\/usrUSRAREA\/tblSAPMV60ATCTRL_ERF_FAKT\/colTABLECOLUMN[0]\/cell[1]","AdjustedID":"ses[0]\/wnd[0]\/usrUSRAREA\/tblSAPMV60ATCTRL_ERF_FAKT\/colTABLECOLUMN[0]\/cell[1]","Content":null},{"ActionCategory":"0","Action":"3","ControlID":"ses[0]\/wnd[0]\/tbar[0]\/btn[11]","DerivedID":"ses[0]\/wnd[0]\/tbar[0]\/btn[11]","AdjustedID":"ses[0]\/wnd[0]\/tbar[0]\/btn[11]","Content":null},{"ActionCategory":"0","Action":"4103","ControlID":"ses[0]","DerivedID":null,"AdjustedID":null,"Content":""},{"ActionCategory":"0","Action":"4099","ControlID":"ses[0]\/wnd[0]\/sbar","DerivedID":"ses[0]\/wnd[0]\/sbar","AdjustedID":"ses[0]\/wnd[0]\/sbar","Content":"ft_msg"},{"ActionCategory":"0","Action":"4098","ControlID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","DerivedID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","AdjustedID":"ses[0]\/wnd[0]\/tbar[0]\/okcd","Content":"\/nva01"},{"ActionCategory":"0","Action":"4100","ControlID":"Personas\/7878dbab-c737-45ba-9dde-eaf1564dc3dd","DerivedID":"Personas\/7878dbab-c737-45ba-9dde-eaf1564dc3dd","AdjustedID":"Personas\/7878dbab-c737-45ba-9dde-eaf1564dc3dd","Content":"ov_msg"},{"ActionCategory":"0","Action":"4100","ControlID":"Personas\/5e15fd00-a24f-4423-8c2e-3155d25cdccf","DerivedID":"Personas\/5e15fd00-a24f-4423-8c2e-3155d25cdccf","AdjustedID":"Personas\/5e15fd00-a24f-4423-8c2e-3155d25cdccf","Content":"rm_msg"},{"ActionCategory":"0","Action":"4100","ControlID":"Personas\/dca90938-f5a4-467b-8bf2-e373908a1c61","DerivedID":"Personas\/dca90938-f5a4-467b-8bf2-e373908a1c61","AdjustedID":"Personas\/dca90938-f5a4-467b-8bf2-e373908a1c61","Content":"ft_msg"}]}
I suppose you could always write a WebRFC and in its code you'd verify if the document is actually posted in the database, returning control to Personas only if the update task completed the goods issue.
It may not be the most elegant solution, but it'd work...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.