Skip to Content

 Requirement

If there is a business requirement in which we have to hide columns in Sourcing cockpit and also need to add few columns this document will be very helpful as a reference. Understanding of Sourcing Cockpit and BADI is a must to understand this document.

 

Hiding of columns in Sourcing Cockpit

The BADI which needs to be implemented for removal of columns is BBP_UI_CONTROL_BADI. Using this BADI we can control the visibility and ready-to-input status of header and item fields, pushbuttons, and navigation links of the concerned applications. Method BBP_SOCO_UI_CTRL is used for field control in the purchaser’s Sourcing application. The BADI is a filter dependent and it can be activated for Sourcing cockpit filter value SOCO.

Let’s consider our requirement is to remove columns Requested by and Vendor Name form Sourcing Cockpit. Below is the procedure which needs to be followed:  

  • Create a custom Implementation for BADI: BBP_UI_CONTROL_BADI.
  • Declare filters for  Shopping cart and Sourcing Cockpit :

                  BUS2121 – Shopping Cart

                  SOCO      – Sourcing Cockpit

    

 

  • Method to be implemented: BBP_SOCO_UI_CTRL.
  • Check if IV_FIELDNAME values if it is equal to Vendor and Requestor fields hide them.

Sample Code for above scenario:

METHOD if_ex_bbp_ui_control_badi~bbp_soco_ui_ctrl.

DATA: lt_field TYPE RANGE OF dynfnam,           “Fieldname range table        

           ls_field LIKE LINE OF lt_field.                       “Work area for Range table

CONSTANTS : c_vendor_name TYPE dynfnam VALUE ‘BBPS_SOCO_ITEM-VENDOR_NAME’,   “Vendor Name    

 c_req_nam    TYPE dynfnam VALUE ‘BBPS_SOCO_ITEM-REQ_NAME’,       “Requestor  

   c_true   TYPE c  VALUE ‘1’,                    “Flag   

   c_sign   TYPE c   VALUE ‘I’,                   “Sign    

   c_option(2)  TYPE c     VALUE ‘EQ’.         “Option  

 * Assign sign value as I 

 ls_field-sign = c_sign.

* Assign option value as ‘EQ’  

ls_field-option = c_option. 

* Vendor name

  ls_field-low = c_vendor_name. 

 APPEND ls_field TO lt_field. 

CLEAR: ls_field-low. 

* Requestor 

 ls_field-low = c_req_nam. 

APPEND ls_field TO lt_field. 

CLEAR: ls_field-low.

* Check if fields which needs to be hide is present in range table  

IF iv_fieldname IN lt_field .    cv_invisible = c_true.

Endif.

ENDMETHOD.

Addition of columns in Sourcing Cockpit

For addition of new columns in Sourcing Cockpit, we have to append a Z structure with required fields which needs to be added to ‘INCL_EEW_PD_ITEM_CSF’ and ‘INCL_EEW_PD_HEADER_CSF_SC’.

Let’s consider we are adding Date and Dummy indicator columns:

Below is the procedure which needs to be followed: 

  • Create a Z structure in SE11 with Date and Indicator fields.
  • Append the newly created structure to ‘INCL_EEW_PD_ITEM_CSF’ and ‘INCL_EEW_PD_HEADER_CSF_SC’ structures.
  • After following above regenerate the sourcing cockpit screen using SAP Note 632982 : Regenerating sourcing cockpit screens. This is required to display columns in Sourcing Cockpit where it is not required when you are adding custom fields in Header or Item levels.
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply