Skip to Content

Summary

In ECC during purchase order creation, it is possible to have different order unit and price unit with conversions maintained (directly while PO creation or in material master). For ex: PO with quantity 5 EA and net price of 10 EUR/1 KG.

The standard SRM SUS (Supplier Self Service) can handle only two cases below:

  • Order unit same as price unit
  • Order unit and price unit are of the same dimension (for ex: order unit = CM and price unit = M and where the conversions are available in transaction CUNI)

The above example of a PO where order unit and price unit belong to different dimensions are not handled in standard SUS solution. The enhancement described in this document enables this functionality in SUS. The enhancement basically converts all the quantity into one unit before sending it to SUS and when the order response/ASN is being created, it will be converted back to order unit.

Applies to:

SAP SRM 7.0 and above

Overview of the enhancement:

1. Customer fields for SUS Purchase order in SRM
2. Proxy enhancements in PI for both ECC and SRM proxies
3. Implementation of BADI PUR_SE_POERPREQOUT_ASYN (enhancement spot PUR_SPOT_SE_PURCHASE_ORDER) in ECC
4. Implementation of BADI /SAPSRM/BD_SOA_MAPPING (enhancement spot /SAPSRM/ES_SOA_MAPPING ) in SRM
5. Implementation of BADI BBP_SAPXML1_OUT_BADI in SRM

Customer fields at SUS PO

Three new customer fields are added to SUS PO – the following three fields are added into the include structures INCL_EEW_PD_ITEM_CSF_SUSPO and INCL_EEW_PD_ITEM_CSF. This is same as mentioned in the SAP Note 672960.

The following values are transferred from ECC to SRM/SUS for these 3 CUF fields:

  • ZZCON_BASE  will hold EKPO-BPUMN (Denominator for Conv. of Order Price Unit into Order Unit)
  • ZZCON_PRICE  will hold EKPO-BPUMZ (Numerator for Conversion of Order Price Unit into Order Unit)
  • ZZBASEUOM  will hold EKPO-MEINS which is the order unit of PO item

Untitled.jpg

Proxy Enhancements in PI

The following proxies are used for PO transmission from ECC to SRM/SUS:

The proxy enhancement is carried out like the normal PI data type enhancements and the steps are as mentioned below:

  • Create a customer SWCV and a customer namespace
  • Add standard SWCV SAP APPL 6.06 and SRM SERVER 7.01 as underlying SWCV for the customer SWCV
  • Create a data type enhancement for ECC:

                         Untitled.jpg

  • Create data type enhancement for SRM:

                           Untitled.jpg

  • Generate the data type enhancement in ECC and SRM in transaction SPROXY
  • Check the standard proxy structure and verify that the proxy enhancement fields are available ECC proxy enhancement:

                           Untitled.jpg

  • Check the standard proxy structure and verify that the proxy enhancement fields are available SRM proxy enhancement:

                         Untitled.jpg

Implementation of BADI PUR_SE_POERPREQOUT_ASYN in ECC

The above BADI method IF_PUR_SE_POERPREQOUT_ASYN~OUTBOUND_PROCESSING is implemented in ECC where the values for these 3 CUF fields are filled when the order unit and price units differ. And the quantities are modified based on the conversion factors maintained from order unit to price unit.

Untitled.jpg

For ex: consider a PO item with quantity = 10 EA, net price = 100 EUR/2 KG, 2 EA = 3 KG. The values sent to SUS are as below:

PO Field ECC PO SUS
Quantity 10 EA 15 KG
Order Unit EA KG
Net Price 100 EUR 100 EUR
Per 2 2
Order Price Unit KG KG
Conversion 2 EA = 3 KG

The values for the CUF fields will be:

ZZCON_BASE 2
ZZCON_PRICE 3
ZZBASEUOM EA

Implementation of BADI /SAPSRM/BD_SOA_MAPPING in SRM

This BADI is implemented in SRM and the method that needs to be implemented is /SAPSRM/IF_BADI_SOA_MAPPING~MAP_XI_TO_BACKEND. In this BADI which is the mapping from the incoming XML to PD structures, the customer field values will be mapped:

Untitled.jpg

Implementation of BADI BBP_SAPXML1_OUT_BADI in SRM

In this BADI implementation, the values are converted back to order unit based on the values specified by vendor while creating order response and ASN creation.

Method PURCHASEORDER_SUS:

The schedule lines and confirmed schedule lines in the PO response sent from SUS to ECC is modified to convert values back to order unit:

LOOP AT cs_purchase_order_messagepurchase_orderitem INTO cs_xml_item.
LOOP AT it_item INTO cs_item.
*       Only proceed if PO contained different UoMs
CHECK NOT cs_itemzzbaseuom IS INITIAL.

IF cs_itemnumber_ext EQ cs_xml_itemidvalue.
*         Convert Schedule Line (original PO values)
ct_sched
= cs_xml_itemschedule_line.

LOOP AT ct_sched INTO cs_xml_schedule.
CALL FUNCTION ‘UNIT_OF_MEASURE_SAP_TO_ISO’
EXPORTING
sap_code   
= cs_itemzzbaseuom
IMPORTING
iso_code   
= cs_xml_schedulequantityunit_code
EXCEPTIONS
not_found  
= 1
no_iso_code
= 2
OTHERS      = 3.
IF cs_itemzzcon_price IS NOT INITIAL.
cs_xml_schedule
quantityvalue = cs_xml_schedulequantityvalue * cs_itemzzcon_base / cs_itemzzcon_price.
ELSE.
cs_xml_schedule
quantityvalue = cs_xml_schedulequantityvalue * cs_itemzzcon_base.
ENDIF.

MODIFY ct_sched FROM cs_xml_schedule.
ENDLOOP.

cs_xml_itemschedule_line = ct_sched.

*         Convert Confirmed Schedule line (confirmed values)
ct_sched_conf
= cs_xml_itemconfirmed_schedule_line.

LOOP AT ct_sched_conf INTO cs_sched_conf.
CALL FUNCTION ‘UNIT_OF_MEASURE_SAP_TO_ISO’
EXPORTING
sap_code   
= cs_itemzzbaseuom
IMPORTING
iso_code   
= cs_sched_confquantityunit_code
EXCEPTIONS
not_found  
= 1
no_iso_code
= 2
OTHERS      = 3.

IF cs_itemzzcon_price IS NOT INITIAL.
cs_sched_conf
quantityvalue = cs_sched_confquantityvalue * cs_itemzzcon_base / cs_itemzzcon_price.
ELSE.
cs_sched_conf
quantityvalue = cs_sched_confquantityvalue * cs_itemzzcon_base.
ENDIF.
MODIFY ct_sched_conf FROM cs_sched_conf.
ENDLOOP.

cs_xml_itemconfirmed_schedule_line = ct_sched_conf.
ENDIF.
MODIFY cs_purchase_order_messagepurchase_orderitem FROM cs_xml_item.
ENDLOOP.

Method ASN_SUS:

Untitled.jpg

To report this post you need to login first.

4 Comments

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

  1. Former Member

    I also have the the very same kind of requirement in which I have to add Customer fields for SUS INVOICE basic data in SRM. Following are my queries:

    1. Customer fields for SUS Invoice  in SRM – Done it
    2. Proxy enhancements in PI for both ECC and SRM proxies – done it
    3. Implementation of BADI . Can any body suggest which BADI in case of Invoice??
    4. Implementation of BADI /SAPSRM/BD_SOA_MAPPING (enhancement spot /SAPSRM/ES_SOA_MAPPING ) in SRM – Can i use the same for invoice as well???
    5. Implementation of BADI BBP_SAPXML1_OUT_BADI in SRM

    Can any body put some light on how to achieve the requirement for iNvoice??

    Thanks & Regards,

    Ramesh Kumar Singh

    (0) 
  2. sankara rao bhatta

    Hi Prasanna,

    Instead of using /SAPSRM/IF_BADI_SOA_MAPPING~MAP_XI_TO_BACKEND,  can we use BBP_SAPXML1_IN_BADI method PURCHASEORDER_SUS to map the customer fields in SRM. What is the difference?

    thanks,

    sankar.

    (0) 

Leave a Reply