Hello SAP Experts,
I have created my own Add-on program which enables BAPI_PRODORDCONF_GET_TT_PROP to be executed continuously. My add-on program has 1 screen and 2 subscreens.
There is a field for selection and 'Goods Movement' button in sub-screen 1. When clicking on the 'Goods Movement' button', the result of BAPI_PRODORDCONF_GET_TT_PROP is shown on sub-screen 2. 'Goods Movement' button can be pressed multiple times. But the determined batches of the second run differ from the first one.
Please follow the steps given below in order to regenerate the issue:
1) First, navigate to transaction code SE37 and execute BAPI_PRODORDCONF_GET_TT_PROP for the first time.
2) Now in table GOODSMOVEMENT check the BAPI result.
3) Now when you click "BACK" icon you will that you don't return to the initial screen of transaction code: SE37.
- The screen will be directed to "Test Function Module: Initial Screen" from "Test Function Module: Result Screen".
- Now you will notice that you don't return to the initial screen of transaction code: SE37, which is "Function Builder: Initial Screen".
4) Now please execute the BAPI again.
5) And now when you check returned GOODSMOVEMENT you will find the batches are different.
In order to resolve the problem please consider initializing the held batches between the separate calls of BAPI_PRODORDCONF_GET_TT_PROP by calling the function module L_PPIM_BATCH_DETERMIN_INIT_INT in the program.