Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManojKumarN
Associate
Associate

Product:

      SAP Ariba Direct Materials Sourcing for Automotive and Industrial Manufacturing in SAP S/4HANA (Private Cloud and On-premise)

Business Scenario

Organizations often rely on a variety of applications to manage supplier-related processes, including supplier onboarding, risk assessment, and qualification etc. In the context of direct material sourcing, having access to comprehensive supplier information is crucial for buyers to make informed decisions.

Key Challenges

  • Multiple Supplier Management Applications:
    • Many organizations use separate applications for supplier onboarding, risk assessment, and qualification.
    • This fragmented approach can lead to inefficiencies and difficulties in accessing a consolidated view of supplier data.
  • Lack of Combined Supplier Information:
    • Within the direct material sourcing process, buyers need a holistic view of supplier details.
    • Existing solutions often lack the ability to seamlessly integrate information from various supplier management applications.

Solution: Leveraging Extensibility Options

To address these challenges, organizations can leverage extensibility options within SAP S/4HANA. Below are two possible solutions:

  • Use Case 1: Custom Fields for External Supplier Information
    • By adding custom fields to the standard view of the relevant Fiori applications, organizations can display information from external supplier management applications.
    • Developers can code the necessary logic to populate these custom fields with data.
    • The information can also be fetched in real-time via API (Application Programming Interface) calls to third-party applications or retrieved from custom tables.
  • Use Case 2: Hyperlink Navigation to External Applications
    • Within the business context of sourcing projects, users can navigate to external supplier management applications directly via hyperlinks.
    • This seamless integration allows users to access detailed supplier information with just a click on the same browser.

Supported SAP S/4HANA Fiori Applications

The following Fiori applications support extensibility for displaying additional supplier information. Custom fields can be added in the below applications to show relevant information from external applications.

  • Manage Preferred Supplier Lists:
    • Navigate to the Suppliers facet to view extended supplier details.
  • Manage Sourcing Projects:
    • Access the Supplier List facet within sourcing projects.
  • Compare Supplier Quotations:
    • While evaluating quotations, users can benefit from additional supplier context.
  • Manage Awarding Scenarios:
    • For awarding scenarios, having comprehensive supplier information is critical.

Implementation

Common Steps for Use Case 1 and Use Case 2

To add extensions, you will have to extend the CDS (Core Data Services) view responsible for holding the custom field. For example, the Suppliers facet in Manage Preferred Supplier Lists uses the CDS view ‘C_SuplrListBusinessPartnerTP_2’ and we have to extend this CDS view by creating a new data definition and entering the referenced object as ‘C_SuplrListBusinessPartnerTP_2’. In the next window, select extendViewEntity and click on Finish. For more information, please refer to the below help link.

https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_751_IP/cc0c305d2fab47bd808adcad3ca7ee9d/dd02965db1c6...

 

ManojKumarN_0-1715854818414.png

Click on Next.

 

ManojKumarN_1-1715854818420.png

Select extendViewEntity and click on Finish.

CDS views to be extended for the respective applications are maintained in the below table:

Please follow above steps for all these CDS views.

Application

CDS View

Manage Preferred Supplier Lists

C_SuplrListBusinessPartnerTP_2

Manage Sourcing Projects

C_SrcgProjImprtdSuplrListBP

C_SrcgProjPubdSuplrListBPTP

Compare Supplier Quotations

C_SrcgProjQuotationCompare

Manage Awarding Scenarios

C_SrcgProjAwdgScenQuotation

Use Case 1

Display additional information in the Suppliers facet in the Manage Supplier Lists app as below.

  • Add a field with color-coded values for risk related information. Column name: ‘Risk’.
  • Add a field with color-coded values for qualification related information. Column name: ‘Qualification’.

Add four virtual fields:

  1. SupplierInfo standing for the hyperlink.
  2. Risk holding one of the risk values (Low, Medium, High and Unknown)
  3. Qualification having one of the qualification values (Qualified, Partially Qualified, Not Qualified and Unknown).
  4. The virtual field Criticality is used for color-coding using the below annotation.

ManojKumarN_0-1716202080944.png

 

extend view entity C_SuplrListBusinessPartnerTP_2 with
{
          @ObjectModel: {
                          virtualElement: true,
                          virtualElementCalculatedBy: 'ABAP:ZCL_SUPLRLISTBUSINESSPARTNERTP' }         
          @ui.lineItem: [{ position: 10,
                           importance: #HIGH
                        }]
          @Consumption.semanticObject: 'zriskurl'
          @EndUserText.label: 'Display Supplier Information'
  virtual SupplierInfo  : abap.string,


          @ObjectModel: {
                          virtualElement: true,
                          virtualElementCalculatedBy: 'ABAP:ZCL_SUPLRLISTBUSINESSPARTNERTP' }
          @ui.lineItem: [{ position: 11,
                           importance: #HIGH,
                           criticality: 'Criticality' }]
          @EndUserText.label: 'Risk'
  virtual Risk          : abap.string,

  
          @ObjectModel: {
                          virtualElement: true,
                          virtualElementCalculatedBy: 'ABAP:ZCL_SUPLRLISTBUSINESSPARTNERTP' }
          @ui.lineItem: [{
                           position: 12,
                           importance: #HIGH,
                           criticality: 'Criticality'
                         }]
          @EndUserText.label: 'Qualification'
  virtual Qualification : abap.string,


          @ObjectModel: {
                          virtualElement: true,
                          virtualElementCalculatedBy: 'ABAP:ZCL_SUPLRLISTBUSINESSPARTNERTP' }
          @ui.hidden: true
  virtual Criticality   : abap.int1
}

 

Create an exit class for the virtual element according to the help link given below and implement the if_sadl_exit_calc_element_read~calculate method.

https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_751_IP/cc0c305d2fab47bd808adcad3ca7ee9d/a7fc007921d4...

In this method, fill the Display Supplier Information as Supplier Name to be displayed on the UI (User Interface). Based on the business partner id, assign the respective Risk, Qualification and Criticality values as below:

BusinessPartner

Risk

Qualification

Criticality

Color

SUPPLIER1

Low

Qualified

3

Green

SUPPLIER2

Medium

Partially Qualified

2

Yellow

SUPPLIER3

High

Not Qualified

1

Red

OTHERS

Unknown

Unknown

0

Default

Note: This is just to show that colour coding is possible. Condition and its value can vary as per customer requirement. It is not recommended to add conditions based on suppliers. Customers also have the option to persist the supplier risk data in custom tables (via their own programs or background jobs). Then, in the virtual element implementation class, they can access these values themselves, and control the colour-coding if needed.

Fill ct_calculated_data of all the exit class of C_SuplrListBusinessPartnerTP_2.

  • Example implementation of zcl_suplrlistbusinesspartnertp

 

CLASS zcl_suplrlistbusinesspartnertp IMPLEMENTATION.
  METHOD if_sadl_exit_calc_element_read~calculate.
    DATA lt_original_data TYPE STANDARD TABLE OF C_SuplrListBusinessPartnerTP_2 WITH DEFAULT KEY.

    CHECK it_original_data IS NOT INITIAL
      AND it_requested_calc_elements IS NOT INITIAL.  

    lt_original_data = CORRESPONDING #( it_original_data ).

    LOOP AT lt_original_data ASSIGNING FIELD-SYMBOL(<fs_original_data>).        
      CASE <fs_original_data>-BusinessPartner.
        WHEN 'Supplier1'.
          <fs_original_data>-SupplierInfo = 'Supplier1'.
          <fs_original_data>-Criticality = 3.
          <fs_original_data>-Risk = 'Low'.
          <fs_original_data>-Qualification = 'Qualified'.

        WHEN 'Supplier2'.
          <fs_original_data>-SupplierInfo = 'Supplier2'.
          <fs_original_data>-Criticality = 2.
          <fs_original_data>-Risk = 'Medium'.
          <fs_original_data>-Qualification = 'Partially Qualified'.

        WHEN 'Supplier3'.
          <fs_original_data>-SupplierInfo = 'Supplier3'.
          <fs_original_data>-Criticality = 1.
          <fs_original_data>-Risk = 'High'.
          <fs_original_data>-Qualification = 'Not Qualified'.

        WHEN OTHERS.
          <fs_original_data>-SupplierInfo = 'Supplier4'.
          <fs_original_data>-Criticality = 0.
          <fs_original_data>-Risk = 'Unknown'.
          <fs_original_data>-Qualification = 'Unknown'.
      ENDCASE.
    ENDLOOP.

    ct_calculated_data = CORRESPONDING #( lt_original_data ).

  ENDMETHOD.
ENDCLASS.

 

After the above implementation, the Suppliers facet in the Manage Preferred Supplier Lists app would appear as shown in the image below:

ManojKumarN_3-1715854818432.png

As you can see, the Display Supplier Information column has only the plain text value. This is because the semantic object 'zriskurl' is not created yet. Once the semantic object is ready, we can use the annotation @Consumption.semanticObject: 'zriskurl' to enable the hyperlink.

Follow the steps mentioned under Use Case 2 to enable the hyperlink for Display Supplier Information and to understandzriskurl’.

Use Case 2

Hyperlink field with the URL (Uniform Resource Locators) of the external application. The user can use this field to navigate to the required application. Column name: ‘Display Supplier Information’.

To enable hyperlink using semantic object:

  • In your front-end system, create a new catalog through transaction /ui2/flpd_cust and create a new target mapping. Example: Catalog: ‘ZSUPPLIERRISK’ 

    ManojKumarN_4-1715854818439.png

 

  • Enter a new semantic object name, select Application Type as “URL”, enter the URL, select Allow additional parameters, add the URL parameter, and save. Semantic object can also be created through transaction /UI2/SEMOBJ. Then it would appear in the semantic object value help that you can choose from. Example: ‘ZRISKURL’

ManojKumarN_5-1715854818442.png

 

Assume the URL to be “www.testurl.com" and you want to pass a parameter “param” to this URL. Then, you would enter “param” in the Target Name and a value from the view such as “Business Partner” in the Name of the parameter. The URL would appear as "www.testurl.com?param=<BusinessPartner>". Example of the added parameter:

Name

Mandatory

Value

Is Regular Expression

Default Name

Target Name

BusinessPartner

 

1234567890

 

 

param

  • Go to transaction PFCG, create a new role name by clicking on Single Role. Example: ‘ZSUPPLIERRISK’
    ManojKumarN_6-1715854818448.png

 

  • In Menu, select SAP Fiori Launchpad Catalog->Launchpad Catalog  and add the catalog created in Step 1(‘ZSUPPLIERRISK’).
    ManojKumarN_7-1715854818455.png

 

  • Go to transaction SU01 and assign the above role to your user.

Once the above steps are implemented, the Suppliers facet in the Manage Preferred Supplier Lists app would appear as below:

ManojKumarN_8-1715854818460.png

The above screenshot shows combined output for Use Case 1 and Use Case 2.

Example implementation in other applications

  • Manage Sourcing Projects

ManojKumarN_9-1715854818470.png

 

  • Compare Supplier Quotations

ManojKumarN_10-1715854818477.png

 

  • Manage Awarding Scenarios

ManojKumarN_11-1715854818483.png

 

Conclusion

By strategically using extensibility options, organizations can bridge the gap between disparate supplier management applications and create a unified view of supplier information. Whether through custom fields or hyperlinks, the goal is to empower buyers with the data, so that they can make informed decisions during the sourcing process. The above mentioned approach is very specific to the product mentioned in the beginning and is only for SAP S/4HANA Private Cloud and On-premise editions.