cancel
Showing results for 
Search instead for 
Did you mean: 

BADI BBP_WF_LIST

Former Member
0 Kudos

Hi,

has anyone used method BBP_WF_LIST_SOCO of BADI BBP_WF_LIST?

I want the user accessing the sourcing cockpit to see all shopping cart item requiring sourcing regardless of the purchasing group of the shopping item. The complete list of carts should be displayed in the worklist rather than having to search for them using the find tab.

Does anyone have any hints?

Cheers

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Here is a sample code for the BADi:

METHOD if_ex_bbp_wf_list~bbp_wf_list.

DATA: t_header_guids TYPE TABLE OF bbp_guid_tab,

t_pdlist TYPE TABLE OF bbp_pds_pdlist,

t_messages TYPE TABLE OF bbp_pds_messages,

t_sc_guids TYPE TABLE OF bbp_guid_tab,

t_ref_doc TYPE TABLE OF bbps_sc_refdata,

t_itemlist TYPE TABLE OF bbp_pds_sc_itemlist,

t_conf_pdlist TYPE TABLE OF bbp_pds_pdlist.

DATA: wa_sc_guids TYPE bbp_guid_tab,

wa_pdlist TYPE bbp_pds_pdlist,

wa_ref_doc TYPE bbps_sc_refdata,

wa_itemlist TYPE bbp_pds_sc_itemlist,

wa_conf_pdlist TYPE bbp_pds_pdlist.

IF sy-tcode EQ 'BBPCF02'.

First Get all the Reference documents

Get all the Shopping Carts

CALL FUNCTION 'BBP_PD_SC_GETLIST'

TABLES

i_header_guids = t_header_guids

e_pdlist = t_pdlist

e_messages = t_messages.

Sort the SC based on SC number

SORT t_pdlist BY object_id.

Get all the Header Guids

LOOP AT t_pdlist INTO wa_pdlist.

wa_sc_guids-guid = wa_pdlist-guid.

APPEND wa_sc_guids TO t_sc_guids.

ENDLOOP.

Get all the Reference Document for the Header Guids

CALL FUNCTION 'BBP_PD_SC_REF_GETLIST'

EXPORTING

i_item_not_deleted = 'X'

TABLES

it_header_guids = t_sc_guids

et_refdata = t_ref_doc

it_logical_systems = 'R3BACKENDSYSTEM' -> Give he R/3 backend system RFC Destination name here

EXCEPTIONS

nothing_found = 1

OTHERS = 2.

Retain only the PO (Business Object 2012)

DELETE t_ref_doc WHERE ( be_object_type NE 'BUS2012' AND

be_object_type NE 'BUS2012001' ).

Sort all reference documents based on be_object_id - Purchase Order numbers.

SORT t_ref_doc BY be_object_id.

Loop on all remaianing POs

Use SC Guid (Header)

LOOP AT t_ref_doc INTO wa_ref_doc.

DELETE e_pdlist WHERE object_id = wa_ref_doc-be_object_id.

ENDLOOP.

Here make a call to the R/3 system by using your RFC Function module

and update e_pdlist [] table which finally will contain all the

detialed confirmations starting with Document type - "EB"

based on the document type "ECDP" and "ECPO" - Add one more document type "EB" ..

so when ever BBPCF02 is called in ITS it should disply the POs

which are based on document types as "ECDP" "ECPO" and "EB".

ELSEIF sy-tcode EQ 'BBPCF03'. " Display All PO/Confirmations

Do let me know if you need any further help.

BR,

Disha.

Former Member
0 Kudos

Hi Disha,

thanks for the repsponse but the sample code you provided is geared at restricting a list of PO's. What I want to know is is it possible to display all shopping carts in the worklist of the sourcing cockpit that requiring sourcing regardless of what the purchasing group is.

Regards

Chris

Former Member
0 Kudos

Hi Chris,

I have tried to implement the same logic within the Badi.

As far as I understand the standard behaviour here, you can not enlarge the list of POs with Badi functionality.

Reason:

Have a look at standard FM BBP_PDH_TEO_GETITEMLIST

Badi method BBP_WF_LIST_SOCO is called within this standard FM.

Unfortunately after you have enlarged your PO list within Badi implementation the standard checks your personel PO list against the standard initial PO list, so all your new POs are not within the final PO results...

-> please refer to line 192 in standard FM BBP_PDH_TEO_GETITEMLIST

Only chance to enlarge PO list from my point of view: Do a modification within standard FM BBP_PDH_TEO_GETITEMLIST

Regards

Andreas

Former Member
0 Kudos

Hi

Additionally to the points made earlier ->

Please go through the code in the SAP OSS Note - 926434, as a reference to identify, how to make sure that All shopping cart data is retrieved in the Soucring Cockpit(SOCO). As pointed earlier, inside the Function module - BBP_PDH_TEO_GETITEMLIST

A call is made to the Function module - BBPPROCDOC_GETITEMLIST to retreive the Item detailed data in internal table - lt_pditemlist, which is finally transferred to E_pditemlist[] table used in the BADI Interface parameter (named as IT_SOS_ITEMLIST )._

Note 926434 - Purchasing group displayed incorrectly in internal list

The logic you have design here is some what as follows..

So you have to make something here to retrieve all Item details related to every Purchasing group and finally modify the E_PDITEMLIST[] / IT_SOS_ITEMLIST tables with all SC Item data accordingly.

Other related pointer ->

Note 868382 - SRM Sourcing Cockpit

Hope this will help.

Regards

- Atul

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

As pointed earlier, the detailed answer and code can be found on the links below ->

Which SRM version are you using ?

Incase of any queries, Please do let me know.

Regards

- Atul

Former Member
0 Kudos

Hi Atul, I need to use the Method BBP_WF_LIST_SOCO of BADI BBP_WF_LIST for Filtering the requisitions the buyer can see based on this area of responsibility.

Filtering of requisition should be based on product category and the purchase organization the buyer belongs to. In case of buyer for Workforcelogic, the filter should be done based on the vendor on the requisition and product category that belongs to consulting services.

Anybody who can suggest