Get Business Partner for username

Problem: You need to get Business Partner for a username.

Solution: Nothing easier.

Simply call FM BP_CENTRALPERSON_GET and you will get what you need.

CALL FUNCTION 'BP_CENTRALPERSON_GET'
  EXPORTING
    iv_username               = sy-uname
  IMPORTING
    ev_bu_partner_guid        = lv_partner_guid
  EXCEPTIONS
    no_central_person         = 1
    no_business_partner       = 2
    no_id                     = 3
    OTHERS                    = 4.
CALL FUNCTION 'BP_CENTRALPERSON_GET'
  EXPORTING
    iv_username               = sy-uname
  IMPORTING
    ev_bu_partner_guid        = lv_partner_guid
  EXCEPTIONS
    no_central_person         = 1
    no_business_partner       = 2
    no_id                     = 3
    OTHERS                    = 4.

1 Komentarze.

  1. Ya learn something new evyerday. It’s true I guess!