Skip to Content
0
Former Member
Jan 06, 2006 at 11:21 AM

Problem with VA01 User Exit

34 Views

I have put a USer Ecit on VA01 that user will not enter more than 70 line items in Sale Order. i have put this in MV45AFZZ in form

*---------------------------------------------------------------------*
*       FORM USEREXIT_SAVE_DOCUMENT_PREPARE                           *
*---------------------------------------------------------------------*
*       This userexit can be used for changes or checks, before a     *
*       document is saved.                                            *
*                                                                     *
*       If field T180-TRTYP contents 'H', the document will be        *
*       created, else it will be changed.                             *
*                                                                     *
*       This form is called at the beginning of form BELEG_SICHERN    *
*                                                                     *
*---------------------------------------------------------------------*
FORM userexit_save_document_prepare.
  DATA : vl_line TYPE i.

  DESCRIBE TABLE xvbap LINES vl_line.

  IF vl_line > 70.
    MESSAGE e063(zsd).
  ENDIF.

ENDFORM.                    "USEREXIT_SAVE_DOCUMENT_PREPARE

The Error comes when I enter more than 70 items, but when I delete the line items and make it to 70 items, then also the error comes when debugging i found that the no. of items which i have deleted are not deleted from XVBAP table.

can any one tell wat's missing here.

abhishek suppal