2024 Jun 24 3:30 AM
Hi,
My team has a requirement to validate user entering split batch quantity that is greater than initial quantity on tcode VL31N/VL32N.
Example:
Initial Quantity : 38 pcs -> Split batch into 3 batches,
- TEST01 - 15 pcs,
- TEST02 - 15 pcs,
- TEST03 - 15 pcs
Since the total is 45 pcs -> we need to validate and don't let user save the documents until it change the split batch total to 38 pcs.
Currently there is a warning/information dialog pop up from standard SAP, but it is just a warning, user still can save the document, and SAP update the initial quantity from 38pcs to 45pcs (which we don't want this scenario to happen).
Have been trying a several enhancement point but there is no solutions for this validation, any help is appreciated. 🙏🏻
2024 Jun 24 10:33 AM - edited 2024 Jun 24 10:34 AM
2024 Jun 25 9:51 AM - edited 2024 Jun 25 9:52 AM
Hi @RaymondGiuseppi , thanks for your prompt reply.
we are not using those config, as per our understanding, those configs is the tolerance for PO Qty with Delivery Qty.
But in my case, we want to validate the amount of initial delivery quantity with the total of the split batch quantity.
2024 Jun 25 9:18 AM
Hello @jackyhjj_sn
You can implement any delivery validations with delivery user-exits as documented with the note 415716 - User exits in delivery processing Alternatively you can use the BAdI enhancement LE_SHP_DELIVERY_PROC.
The message "Specified quantity is greater than the open quantity" is VL287. It is always sent as an information message and can't be customized - include FV50PF0P_POS_GEN_AENDERN_2, form routine position_generiert_aendern_2, line 411:
IF lo_menge < 0 AND v50agl-chargenfindung IS INITIAL.
*******************************************
* ARun handling in Delivery document *
*******************************************
PERFORM arun_batch_split_validation IN PROGRAM arun_routines_obd IF FOUND
USING go_arun_obd_process xlips xlips[] lips lo_menge v50agl-chargenfindung
v50agl-dialog t180-trtyp xlikp.
*----ARun handling in Delivery documents---*
save_287_menge = save_287_menge + lo_menge.
save_287_menge_flo = save_287_menge_flo + local_float.
lo_menge = 0.
local_float = 0.
IF gs_lips_batch-called_by = char2. "v_n_1236368
gs_lips_batch-lgmng = 0.
gs_lips_batch-lgmng_flo = 0.
ENDIF. "^_n_1236368
MESSAGE i287.
ENDIF.
Best regards
Dominik Tylczynski
2024 Jun 26 7:59 AM
HI, that is the code that I want to change, can you please help to point me to the right directions to which one user exit ?
2024 Jun 26 8:20 AM
As you can see there is no user-exit or any other enhancment around VL287 message. It is always issued as an information message.
You can either change the SAP standard code and make the message an error one (be aware of possible side effects and test throughly) or use one of the enhancement I've mentioned previousely to implement your own validation.