Skip to Content
Former Member
Nov 19, 2011 at 09:12 AM

How to execute the first program without using SUBMIT and RETURN


Hi Experts,

My requirement is , I need to select thet value from VA02 at runtime and need to pass that value to VF01 transaction and press save then it creates proforma document.The created document we can see in VA02 by clicking on document flow.

My program is processed through OUTPUT TYPE.

To get this functionality i written coding like this.

1) i am selecting the value at runtime from VA02 using FORM ROUTINE.Now iam passing this selected value to VF01 for

genarate proforma document using BDC.Here the problem is,first time when i am selecting the value form VA02 at runtime it is in open status,now my BDC code need to update the value in VA02 locking problem occurres the document is not getting updated.

To overcome this problem i have done changes like this......

2) i splited my program into two parts, that is into two programs.

a) In first program i am only selecting the value form VA02 at runtime using FORM ROUTINE and in this program i have written SUBMIT statement to call another program there my BDC code will create documet and update in VA02,upto here everything is doing fine,

But here again the problem is when i process OUTPUT type my program is triggering and giving correct result but the status is not changing form YELLOW to GREEN.Why means when SUBMIT statement trigger, control is going to second program and creating a new document,but not coming to first program so the status is not changing as the first prohram is still processing. .If i write RETURN along with SUBMIT the VA02 is in open STATUS only, till control comes to first it will not uodate document in VA02.

If i execute all line in my program status will automatically change from YELLOW to GREEN how to acheive this

please suggest me the solution.