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: 

Please help me to find link between customer and Business partner

sangeetha_sk
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello

Try table KNVP.

4 REPLIES 4

Former Member
0 Kudos

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.

0 Kudos

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

prasanth_kasturi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello

Try table KNVP.