Skip to Content
avatar image
Former Member

How can I find the vendor role name using vendor code?

Hello all

We use SRM server5.5 with classic scenario.

How can I find the vendor role name using vendor code?

Is there a function module?

I tired to find the vendor role name..

So. I found Table: AGR_USERS - AGR NAME (ROLE NAME) using contact person id (AGR_USERS - UNAME).

But.. we only know the vendor code..

Could you tell me how to find the role name with vendor code.

Thank you,

Best regards,

SH.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 06, 2007 at 07:48 AM

    Hi,

    Have you try BBP_VENDOR_GETLIST?

    or

    BAPI_CHARACT_GETLIST BAPI for Characteristics - Find Name

    BAPI_CREDITOR_GETDETAIL Vendor Details

    Regards,

    Marcin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 06, 2007 at 08:03 AM

    Hi

    <b>You mean to say you are having the Vendor ID (Business Partner ID) in your case.

    And based on which, you want to find out the vendor roles.</b>

    <u>1) Incase the Vendor is created using SU01 Transaction in the SAP System, you can use BAPI_USER_GET_DETAIL Function module to get all the required details of the system user in one go. Here you need to give the SAP Logon Name (USerID) of the person to the function module, to get all the roles provided in the system for this user.

    Incase the vendor iscreated as an ITS USer, use the function module ->

    CALL FUNCTION 'BBP_READ_ATTRIBUTES' for the particular user passing the name of the user in the IV_USER Paramater.

    2) Incase you want to partner roles, and use only Business Partner ID - Go to Table BUT000 and find the required details.</u>

    Or 
    else use the function modules - BBP_PARTNER_GET_DATA 
    
    BAPI_PARTNER_GET_BY_IDNUMBER 
    
    BUPA_PARTNER_GET_BY_IDNUMBER  
    
    BBP_PARTNER_DETERMINE_ADDRESS 
    
    BBP_PARTNER_ADDRESS_GET_COMPL  
    
    BBP_PARTNER_FUNCTION_EXISTENCE 
    
    BBP_PARTNER_FUNCTION_TEXT      
    
    BBP_PARTNER_FUNCTION_TO_TYPE   
    
    BBP_PARTNER_FUNC_TEXT_SINGLE   
    
    BBP_PARTNER_INHERITANCE        
    
    BBP_PARTNER_ON_ITEM_SINGLE_GET 
    
    BBP_PARTNER_TYPE_SELECT        
    
    BBP_PARTNER_TYPE_TO_FUNCTION   
    
    BBP_PDH_GET_PARTNERS_FROM_USER 
    
    BBP_PDH_GET_PARTNER_FTYPE_TEXT 
    
    BBP_PDH_GET_PARTNER_FUNC_TEXTS 
    
    BBP_PDH_PARTNER_GET_FUNC       
    
    BBP_PDH_PARTNER_PROD_READ      
    
    BBP_PDH_PARTNER_P_PROD_READ    
    
    BBP_PDH_PARTNER_TOL_GROUP_GET 

    Hope this will help.

    Please reward suitable points, incase it suits your requirements.

    Regards

    - Atul

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      IV_PERSON_ID is the SAP Username (SAP logon ->UserID - 12 Characters field )

      [ Person Number ]

      Here is one more sample code.

      data :  iv_uname like sy-uname value 'ATUL' . 
      
        CALL FUNCTION 'BP_CENTRALPERSON_GET'
          EXPORTING
            IV_USERNAME         = iv_username
          IMPORTING
            EV_BU_PARTNER_GUID  = lv_bp_user_guid
          EXCEPTIONS
            NO_CENTRAL_PERSON   = 1
            NO_BUSINESS_PARTNER = 2
            NO_ID               = 3
            OTHERS              = 4.
      
        IF SY-SUBRC <> 0.
        else.
      *--- Get Partner guid in partner number
          select single * from but000 into ls_but000_user
                               where partner_guid = lv_bp_user_guid .
          if sy-subrc = 0 .
            lv_bp_user = ls_but000_user-partner.
          endif.
        ENDIF.

      Hope this will help.

      Please reward suitable points, incase it suits your requirements.

      Regards

      - Atul