Hi Michael,
Thanks for your further input.
I did agree with you before I tried the BAdI.
This BAdI turns out chaning the Location List
From:
1000 - 2000 - 3000
To:
2000 - 1000- 3000
Then even I selected "Create Rem.Reqmt for 1st Subst.Product (or Input prod.) in 1st Subst.Location" in the rule maintenance, system will leave the remaining qty in 2000 instead of 1000, when none of location can meet the complete delivery request.
Below is the BAdI method:
The output is just the changed location list,
"
/SAPAPO/IF_ATP_LPDG_LST~LIST_MODIFY.
IF lo_badi_lpdg_lst IS BOUND.
CALL BADI lo_badi_lpdg_lst->list_modify
EXPORTING
it_intreq = it_intreq
is_atpglobpar = gtc->ms_atpglobpar
iv_free_value = iv_free_value
is_komgo = ls_komgo
CHANGING
ct_loc = ct_loc.
ENDIF.
"
I am trying to find in the program where to choose the plant, which to be assigned with remaining qty, then modify it to the lowest cost plant, 1000 in this case.
---Where in the program would be possible?
Would it be the case that I use the BAdI in the incorrect way?
Looking forward to your further input.
Best regards,
Ying