Adding ECC Custom Fields in CRM Web UI ERP Order Using LORD
Adding ECC Custom Fields in CRM Web UI ERP Order Using LORD
Applies to:
SAP CRM7.0 SP06 or Higher
SAP ECC 6.0 with EhP4 with following activate switch
SD_01
LOG_SD_CI_01
ESOA_OPS01
LOG_SD_SIMP_02
Summary
This article is based on a customer specific requirement which I have undertaken on a project. It describes a
scenario where ERP custom fields are required in CRM Web UI to create Quotation/Order in ERP Order
scenario in SAP CRM.
The ERP order setup was done through LORD Lean Order Management, Web UI enhancement via AET and
BADI enhancement (for populating data in custom fields)
This article explains how the custom fields and BADI was implemented in configured in SAP CRM and ECC
step by step.
Author Bio
Aditya Karkare is an SAP Development Consultant working for Cognizant Technology Solution. He has 10
years of SAP experience which includes SAP ECC and SAP CRM. He has undertaken projects for
customers based in India, Germany, Belgium and USA.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Table of Contents
Requirement ....................................................................................................................................................... 3
Implementation Steps ......................................................................................................................................... 4
Enhance CRM UI component and add custom fields in CRM. ....................................................................... 4
Maintain Interface Communication in ECC ..................................................................................................... 6
Maintain mapping tables in ECC: .................................................................................................................... 8
BADI Implementation in ECC ........................................................................................................................ 10
Related Content ................................................................................................................................................ 14
Disclaimer and Liability Notice .......................................................................................................................... 15
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Requirement
Create ERP order from CRM using lean order management – LORD; to create any quotation/ order in ERP
few custom fields are mandatory in ECC. To achieve this, these custom fields are mandatory in ERP order
Web UI screen.
Additional custom fields required at header level and item level.
ERP order Web UI screen after enhancement in SAP CRM.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Implementation Steps
1. Enhance CRM UI component and add custom fields in CRM.
2. Maintain interface communication structure in ECC.
3. Maintain Mapping tables in ECC
4. Implement BADI ENH_SPOT_LORD in ECC
5. Enhance CRM Web UI screen using application enhancement tool.
Open ERP Quotation/Order Web UI Screen and Click on ‘Show Configuration Area’ button.
Select part of BO based on requirement and click OK button. Here I am selecting Header
Changeable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Tip: You can get Object ID, field name, internal field name, Program name and reference field name by
pressing F1 on that field.
In this case name of the field in the LORD interface is different ZZVKBUS and name of the field in
program logic is VBAP-VKAUS.
BADI_LORD_DO_PAI :- Maps the fields and calls for check & processing routines
BADI_LORD_DO_PBO :- Contain formatting routine for fields
BADI_LORD_GET_INPUT_MODE : set the input mode for fields
BADI_LORD_SET_DATA_SINGLE : set default values for fields
BADI_LORD_START_DEFAULT: Set default value for first screen
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Implementation code
BADI_LORD_DO_PBO
METHOD if_badi_lord_do_pbo~fill_supply_list.
IF iv_object_id = 'HEAD' .
ENDIF.
ENDMETHOD.
PERFORM get_no_deal_id_param
IN PROGRAM sapmv45a
IF FOUND .
ENDMETHOD.
BADI_LORD_DO_PAI
Field = custom field
Module = logic written for custom field ( in user exit)
Program = Main program name
METHOD if_badi_lord_do_pai~fill_supply_list.
DATA : ls_supply TYPE tds_field_supply.
IF iv_object_id = 'HEAD' .
**ZZ_OWNER
ls_supply-field = 'ZZ_OWNER' .
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
ls_supply-module = 'ZZ_SALES_ORDER_OWNER'.
ls_supply-program = 'SAPMV45A'.
ls_supply-on_check = 'R' .
ls_supply-field = 'ZZVKAUS' .
APPEND ls_supply TO ct_supply.
CLEAR : ls_supply.
ENDIF.
ENDMETHOD.
BADI_LORD_GET_INPUT_MODE
METHOD if_badi_lord_get_input_mode~get_input_mode.
DATA : ls_screen TYPE screen .
IF is_screen-name EQ 'VBAK-ZZ_OWNER' OR
is_screen-name EQ 'VBAK-ZZ_ZSC_CODE' OR
is_screen-name EQ 'VBAP-ZZMVGR5' OR
is_screen-name EQ 'VBKD-BSTKD_E' .
es_screen-active = 1.
es_screen-input = 1.
ENDIF.
ENDMETHOD.
BADI_LORD_SET_DATA_SINGLE
METHOD if_badi_lord_set_data_single~get_change_request.
*
lv_lord_object ?= io_object_ref .
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
RECEIVING
rv_object_id = lv_object.
IF lv_object = 'HEAD' .
ASSIGN cs_object_comv TO <fscomv> .
ASSIGN cs_object_comx TO <fscomc> .
<fscomv>-vendreg = 'ZA' .
<fscomc>-vendreg = 'X' .
<fscomv>-zz_zsc_code = '01' .
<fscomc>-zz_zsc_code = 'X' .
<fscomv>-zzelecdel = 'E' .
<fscomc>-zzelecdel = 'X' .
*
ENDIF.
ENDMETHOD.
BADI_LORD_START_DEFAULT
METHOD if_badi_lord_start_default~set_start_default.
IF ls_default_data-active = 'X'.
cv_kunag = ls_default_data-kunag .
cv_vkorg = ls_default_data-vkorg .
cv_vtweg = ls_default_data-vtweg .
cv_spart = ls_default_data-spart .
cv_vkbur = ls_default_data-vkbur .
ENDIF.
ENDIF.
ENDMETHOD.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 13
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
Related Content
Please Refer to OSS Note 1224179.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Add ECC Custom Fields in CRM Web UI ERP Order Using Lean Order Framework
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15