Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Split Batch Validation on VL31N/VL32N

jackyhjj_sn
Explorer
0 Kudos
1,407

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. 🙏🏻

5 REPLIES 5

RaymondGiuseppi
Active Contributor
1,337

Questions

  • Is an overdelivery tolerance or underdelivery tolerance maintained in the order item for the delivery item with a batch split.
  • Did you check Customizing overdelivery or underdelivery (TVLP-UEBPR)

0 Kudos
1,295

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.

DominikTylczyn
SAP Champion
SAP Champion
0 Kudos
1,303

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

0 Kudos
1,268

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 ?

0 Kudos
1,259

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.