We are using two step transfer process with STO. During development of this process, we were able to test and confirm that when the GR is greater than GI, the system posts 101 for total qty; the excess qty (gain posting) automatically happens (with 858 movement) after posting material document.
For example, if goods issue is for 200 units and goods receipt is for 205, the 101 movement is posted with 205 units and once material document is posted, we get two lines as below.
101 mvt - 205 units
858 mvt - 5 units representing the difference between GI and GR.
But during the technical development process, we are having issue when posting through the BAPI_GOODSMVT_CREATE_OIL. While we are able to populate the GR qty with 101 movement, 858 being an automatic movement, we could neither post it through BAPI nor it is populated automatically.
Is there any specific field required to be populated for getting this gain posting with 858 mvt or any other settings needed in BAPI ? Appreciate any inputs.
Thanks.