Skip to Content
0

How To Validate Tax Number in Business Partner (BP)

Jun 27, 2017 at 01:20 PM

207

avatar image
Former Member

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

kmpif.png (7.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Feb 13 at 03:35 PM
0


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.

Share
10 |10000 characters needed characters left characters exceeded