11-11-2008 5:04 AM
Hi All,
With the help of customer number as input for my report, i have to find the Business partner.
Please help me how to find the Business partner based on the customer number using tables.
11-11-2008 5:52 AM
11-11-2008 5:20 AM
you can get a link betwen this in IHPA table but u have to pass the object number to this table
, and you can get it from transactional data table like AUFK-OBJNR.
Amresh&Imtiaz.
11-11-2008 5:27 AM
Hi Amresh&Imtiaz,
Thanks for your reply. But i have only customer number as input and with the help of it how to find business partner?
San
11-11-2008 5:51 AM
hi,
Get the customer address number from the KNA1 table
and pass that to the FM ADDR_GET with address group as BP( business partner)
you get the Business partner address number and from that you can find the business partner number from KNA1 table
or in KNVP table field KUNN2 gives the BP number
DATA: w_selection_ds TYPE addr1_sel,
w_addrprnt_ds TYPE adrs_print,
w_adrs1_ds TYPE adrs1.
clear w_address_value_ds.
w_selection_ds-addrnumber = w_kna1_ds-adrnr. "address number
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = w_selection_ds
address_group = 'BP' "business partner
IMPORTING
address_value = w_address_value_ds
EXCEPTIONS
address_not_exist = 1
OTHERS = 2.
regards
Prasanth
11-11-2008 5:52 AM