Application Development 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: 

How To Validate Tax Number in Business Partner (BP)

Former Member
0 Kudos

Hi experts,

I need to validate Business Partner For Tax Number Fields , though I use one badi

BUPA_FURTHER_CHECKS

But I could not able to find the values for the below table control details , can any one please suggest me how to full fill the same and I have used the below declaration to pull the value using the below statement

lf_gst(50) type c value '(SAPLBUS_LOCATOR)DFKKBPTAXNUM-TAXNUMXL[1]'.

seniors help me out

Best,

Uday..,

1 REPLY 1

Former Member
0 Kudos


data : lt_tax type TABLE OF DFKKBPTAXNUM ,"WITH HEADER LINE.
w_tax type DFKKBPTAXNUM.

CALL FUNCTION 'BUP_BUPA_TAX_GET'
TABLES
et_tax = lt_tax
EXCEPTIONS
no_taxnumbers_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* safety refresh
REFRESH lt_tax.
ENDIF.

if lt_tax is NOT INITIAL and ADRS_POST_FIELDS-REGION is NOT INITIAL.
LOOP AT lt_tax into w_tax.


IF ADRS_POST_FIELDS-REGION ne W_TAX-TAXNUM+0(2) .
message 'Tax Number not Matching With Region' type 'E' DISPLAY LIKE 'S'.

ENDIF.


ENDLOOP.
endif.