Skip to Content
avatar image
Former Member

Validation on vat registration number for customer and vendor

Hi Experts ,

Hi Experts ,

I am doing the vat registration number validation in IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY method of CL_MDG_BS_BP_DESCRIPTION But the customized message not displaying on UI side.

What could be the reason ? can any one explain and  is this right method to do the vat registration number ?

Sample code :

if lv_taxnum is not initial.

   CLEAR:  zmdg_cl_badi_mat=>gv_second.

If lv_taxnum CA SY-ABCDE or lv_taxnum  CA '~!@#$%^&*()+{}|:"<>?/,;]' .

        ls_message-msgid = 'R11'.

        ls_message-msgty = 'E'.

        ls_message-msgno = '690'.

       APPEND ls_message TO lt_message.

        zmdg_cl_badi_mat=>gv_second = 'X'.

ELSE.

  CLEAR:  zmdg_cl_badi_mat=>gv_first.

   IF   lv_mlen1 = strlen( lv_taxnum ).

     if lv_mlen1 > 11.                               "strlen( lv_taxnum ) LE 11.

       ls_message-msgid = 'R11'.

        ls_message-msgty = 'E'.

        ls_message-msgno = '691'.

       APPEND ls_message TO lt_message.

          zmdg_cl_badi_mat=>gv_first = 'X'.

          endif.

ENDIF.


et_message = lt_message.

Customized message appending to lt_message but it is not displaying on UI.

Thanks and Regards

Raj

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 23, 2016 at 07:06 AM

    Hi Raj,

    Method could be CHECK_ENTITY only. Please check the filter values.

    Whether you have maintained your TYPE4 entity in the filter which is holds this attribute taxnum ?

    Add comment
    10|10000 characters needed characters exceeded