I hv to automate the following process.
VA01-> VL01n-> VF01
User will create Sales Return Order only (VA01).
When Sales return order get created, Post goods receipt (vl01n) and credit note (vf01) should be created automatically.
Now the problem is , i am able to find the right BAPI to create post goods receipt and credit note.
can anyone pls suggest the BAPI that i should use.
And also, If I write my automative code in USEREXIT_SAVE_DOCUMENT user exit, will it work.