cancel
Showing results for 
Search instead for 
Did you mean: 

Validation on vat registration number for customer and vendor

0 Kudos

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.

   CLEARzmdg_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.

  CLEARzmdg_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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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 ?