cancel
Showing results for 
Search instead for 
Did you mean: 

How can we find the purchasing group code with User ID

Former Member
0 Kudos

Hello Friend.

I have some questions.

I made the org plan for purchasing department and assign the purchasing group' backend system to created org.

And then, i created user with buyer role and assign user to purchasing group org.

I want to find the purchasign group code using user id.

-Which table has the purchasign group code?

-Can we find out the purchasing group code with user ID?

Thank you,

Best Regards,

SH

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use


CALL FUNCTION 'BBP_OM_DETERMINE_RESP_PGRP'
   EXPORTING
     IV_USER                 = iv_uname
   IMPORTING
     ES_PURCH_DATA           = ls_purch_data
   EXCEPTIONS
     CAT_NOT_FOUND           = 1
     NO_RESP_PGRP            = 2
     NO_PGRP                 = 3
     SRC_SYS_AMBIGUOUS       = 4
     OTHERS                  = 5.

Regards,

Marcin

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Any updates ? Is the problem resolved ?

If yes, Please reward suitable points.

Else, let me know.

Regards

- Atul

Ramki
Active Contributor
0 Kudos

Hello

2) Table for purchasing group code:

HRP1000

2) Purchasing group code from user:

a) FM BBP_OM_STRUC_GET_ORG_FROM_USER will give you Org ID of purchasing group for a user(buyer).

b) From table HRP1000 you can get purchasing grp description given a org id (OTJID)

Best regards

Ramki

Former Member
0 Kudos

Hi

You can try this also. Depending on your SRM system version.

<b>Use either of the standard SAP recommended function modules to read all the attributes of the EBP (ITS) User maintained in the Organizational Plan.</b>

     CALL FUNCTION 'BBP_READ_ATTRIBUTES'
      EXPORTING
        iv_object                     = iresult
        IV_USER                       = 'USERID'        --> Give the SAP User ID here
        iv_scenario                   = 'BBP'
        it_attr_list                  = i_att_name
      IMPORTING
        et_attr_dft                   = ilocattribs
      EXCEPTIONS
        object_id_not_found           = 1
        no_attributes_requested       = 2
        attributes_read_error         = 3
        OTHERS                        = 4.

----


----
----

OR Try this ....

  CALL FUNCTION 'BBP_USER_GET_ATTRIBUTES'
    EXPORTING
      username            = 'USERID'        --> Give the SAP User ID here
    TABLES
      it_attr_p           = lt_attr_p
    EXCEPTIONS
      user_not_found      = 1
      orgunit_not_found   = 2
      object_id_not_found = 3
      OTHERS              = 4.

----


----
----

Hope this will help.

Please reward suitable points.

Regards

- Atul

yann_bouillut
Active Contributor
0 Kudos

Hi,

Try FM BBP_OM_FIND _SC

Input : USERID

OUtput : Porg, Pgroup...

Kind regards,

Yann

Message was edited by:

Yann Bouillut