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:
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.
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 |
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:
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:
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.
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 |
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:
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.
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_message-purchase_order-item INTO cs_xml_item.
LOOP AT it_item INTO cs_item.
* Only proceed if PO contained different UoMs
CHECK NOT cs_item-zzbaseuom IS INITIAL.
IF cs_item-number_ext EQ cs_xml_item-id-value.
* Convert Schedule Line (original PO values)
ct_sched = cs_xml_item-schedule_line.
LOOP AT ct_sched INTO cs_xml_schedule.
CALL FUNCTION 'UNIT_OF_MEASURE_SAP_TO_ISO'
EXPORTING
sap_code = cs_item-zzbaseuom
IMPORTING
iso_code = cs_xml_schedule-quantity-unit_code
EXCEPTIONS
not_found = 1
no_iso_code = 2
OTHERS = 3.
IF cs_item-zzcon_price IS NOT INITIAL.
cs_xml_schedule-quantity-value = cs_xml_schedule-quantity-value * cs_item-zzcon_base / cs_item-zzcon_price.
ELSE.
cs_xml_schedule-quantity-value = cs_xml_schedule-quantity-value * cs_item-zzcon_base.
ENDIF.
MODIFY ct_sched FROM cs_xml_schedule.
ENDLOOP.
cs_xml_item-schedule_line = ct_sched.
* Convert Confirmed Schedule line (confirmed values)
ct_sched_conf = cs_xml_item-confirmed_schedule_line.
LOOP AT ct_sched_conf INTO cs_sched_conf.
CALL FUNCTION 'UNIT_OF_MEASURE_SAP_TO_ISO'
EXPORTING
sap_code = cs_item-zzbaseuom
IMPORTING
iso_code = cs_sched_conf-quantity-unit_code
EXCEPTIONS
not_found = 1
no_iso_code = 2
OTHERS = 3.
IF cs_item-zzcon_price IS NOT INITIAL.
cs_sched_conf-quantity-value = cs_sched_conf-quantity-value * cs_item-zzcon_base / cs_item-zzcon_price.
ELSE.
cs_sched_conf-quantity-value = cs_sched_conf-quantity-value * cs_item-zzcon_base.
ENDIF.
MODIFY ct_sched_conf FROM cs_sched_conf.
ENDLOOP.
cs_xml_item-confirmed_schedule_line = ct_sched_conf.
ENDIF.
MODIFY cs_purchase_order_message-purchase_order-item FROM cs_xml_item.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.