cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Name in BBP_PD_SC_GETDETAIL

marc_naujokat
Explorer
0 Kudos

Hello, I use BBP_PD_SC_GETDETAIL to get the details of a sc. Then I loop over the table e_partner. Then I select the partner_fct = '00000016'. Then I select BUT000 with die guid. But the field but000-xubname is empty

Here is the Conding:

if wa_partner-partner_fct = '00000016'.

clear: but000,

adrp.

select single * from but000 where

partner_guid = wa_partner-partner_no.

select single * from adrp where

persnumber = but000-persnumber.

wa_zselectsc-created_for = but000-xubname.

In which table is the User-Id ???

Marc

Accepted Solutions (0)

Answers (2)

Answers (2)

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

The field xbuname is not filled for an employee in but000.

You can try this to retrieve the user name of the requester:

data: lr_employee TYPE REF TO if_bbp_es_employee,

lv_partner_guid TYPE guid,

lv_requester type ERNAM.

MOVE wa_partner-partner_no TO lv_partner_guid.

TRY.

lr_employee =

cl_bbp_es_enterprise=>get_employee_by_guid(lv_partner_guid ).

lv_requester = lr_employee->get_username( ).

CATCH cx_bbp_es_not_found.

CATCH cx_bbp_es_not_an_employee.

ENDTRY.

Rgds,

Pierre

marc_naujokat
Explorer
0 Kudos

Hello,

many thanks for the hints. Pierre one question:

In which table do you select the name of the requester ? I would try your coding example but I can't use it. I wrote a report to select shopping cards. In the case that the creator = requester I can use the field "bbp_pds_sc_item_d-created_by" from the function "BBP_PD_SC_GETDETAIL". But what can I do if the creator <> requester ?

Marc

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Keep using requester name and not the creator.

About tables, it depends on SRM release.

Prior to SRM5, you still can find the username with table but000, then user table (usr21 ?) to retrieve the user name from the person number in but000. The link BP - employe - user is avaible.

From SRM5, this link is not avaible anymore and I suggest you use the sample code (change the call cl_bbp_es_enterprise=>get_employee_by_guid(lv_partner_guid) with pattern if necessary).

PS: please award point for helpfull answer

Rgds,

Pierre

Former Member
0 Kudos

Hi Marc,

If this chopping cart not been creating by a user that not customizing in organizational unit a field is initial.

Please verify control a user by transaction BBP_CHECK_USER that created shopping cart.

Thanks