cancel
Showing results for 
Search instead for 
Did you mean: 

How to get business partner number of a Company code

Former Member
0 Kudos

How to get Company code business partner number..
Any FM or table name which can help us to get comapny code business partner number

Actually we want to find the default address number of the company code.

please suggest a way to find partner number of company code or directly to get default address number of the company code

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello,

using company code, select Org Unit ID from HRV5500A view for subtype '0100'.

With this value, get its partner GUID with HR_OBJECTBUPA_GETBUPA function modul for object type 'O'.

Finally, use BUPA_ADDRESSES_READ function modul with this GUID as importing parameter iv_partner_guid.

Regards.

Laurent.

Answers (3)

Answers (3)

Former Member
0 Kudos

Issue solved thanq all

Former Member
0 Kudos

Hello LS Kumar,

Try to use below Code may help:

DATA ls_object              TYPE hrhctobjc.
DATA ls_company             TYPE bbps_es_unit_id.
DATA ls_company_bupa        TYPE hrobjbupas.

ls_object-otype = is_org_unit_id-otype.   
ls_object
-objid = is_org_unit_id-objid.   


 
CALL FUNCTION 'HR_OBJECTBUPA_GETBUPA'
   
EXPORTING
      is_object              
= ls_object
   
IMPORTING
      es_hrobjbupa           
= ls_company_bupa
   
EXCEPTIONS
      object_type_not_allowed
= 1
     
OTHERS                  = 2.
 
IF sy-subrc NE 0.
   
RAISE EXCEPTION TYPE cx_bbp_es_not_found.

endif.

************************

Which determines the company code of the user belongs to:

CALL FUNCTION 'BBP_OM_DETERMINE_COMPANY'
      EXPORTING
        i_user_id = lv_user
      IMPORTING
        et_compc  =lt_compc
      EXCEPTIONS
        OTHERS    = 1.

Regards,

Sankarbabu

Former Member
0 Kudos

HI

check this table in se16n : ADRC

Regards

Elham