Register Login

BAPI_PRODORDCONF_GET_TT_PROP determined batches of second run differ from first

Updated May 19, 2018

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.


Comments

  • 27 Dec 2016 5:59 pm Abhijeet Mudgal Helpful Answer

    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.

     

  • 27 Dec 2016 6:06 pm Romil Tripathi Helpful Answer

     

    As the batches which are proposed for the first run are locked, therefore they will not be the object for the second run.

    Note: The sole purpose of function module BAPI_PRODORDCONF_GET_TT_PROP is to provide the data in order to post the time ticket confirmation by BAPI_PRODORDCONF_CREATE_TT subsequently and therefore only reason for having the BAPI_PRODORDCONF_GET_TT_PROP as a separate function module is to enable the customers to change the proposed data before posting the confirmation by BAPI_PRODORDCONF_CREATE_TT.

    The goods movements are supposed to be posted which requires batches, therefore the batch determination keeps the locks. Some batches don't sufficient stock available for a second-time ticket confirmation. Therefore resetting the batch locks would result in assigning the same batches to different confirmations and failed goods issues because of missing stock.

     


×