Object | Type | Description | Comments |
CRMD_ORDER | TCODE |
|
|
CRM_ORDER_READ | REPORT | To get the CRM details from GUID |
|
COMMPR01 | TCODE | CRM Products |
|
CRMV_EVENT | TCODE | Customizing Event Handler |
|
WUI_SSO
| TCODE | Web UI |
|
CRMC_ACTION_DEF | TCODE | Define action profile and actions | |
CRMC_ACTION_CONF | TCODE | Configure start and schedule conditions |
|
PPFTTRIGG | Table | Table of actions |
|
SPPFC or SPPFCADM | TCODE | specify Processing Time within an Action Definition |
|
CRMC_ACTION_JOB | TCODE | Action Monitor |
|
SD11 | Transaction | To view CRM Business Partner Data Model | Data Model PRM_BP |
BAPI_BUPA* | BAPI | All BUPA related BAPIs |
|
BAPI_BUPA_SEARCH | BAPI | Search Business Partner |
|
BAPI_BUPA_CENTRAL_GETDETAIL | BAPI | Get Business Partner details |
|
BAPI_BUPA_CREATE_FROM_DATA | BAPI | Create Business Partner |
|
Table Name | Description |
BUT000 | General data |
BUT020 | Address data |
BUT050 | Relationships |
BUT100 | Business partner roles |
BUT000 | Table | General Data |
|
BUT000-PARTNER | Field | 10 Digit alphanumeric primary key |
|
BUT000-PARTNER_GUID | Field | To link with other CRM tables |
|
BUT000-TYPE | Field | Person, Organization, Group |
|
BUT000-BPKIND | Field | For filed control |
|
BUT000-BU_GROUP | Field | For number range |
|
CI_EEW_BUT000 | Include | Include for enhancing BP with new attributes |
|
Field Name | Field Description |
NAME_LAST | Last name of person |
NAME_FIRST | First name of person |
NAME_ORG1 | Name 1 of organization |
NAME_ORG2 | Name 2 of organization |
NAME_ORG3 | Name 3 of organization |
NAME_ORG4 | Name 4 of organization |
NAME_GRP1 | Name 1 of a group |
NAME_GRP2 | Name 2 of a group |
Data Segment | Table |
Business hours | CRMM_BUT_FRG0060 |
Partner function | CRMM_BUT_FRG0081 |
Sales employee | CRMM_BUT_SEMPL00 |
Sales classification | CRMM_BUT_FRG0041 |
Status | CRMM_BUT_FRG0100 |
Data Segment | Table |
Sales rule | CRMM_BUT_LNK0011 |
Sales data | CRMM_BUT_SET0010 |
Shipping rule | CRMM_BUT_LNK0021 |
Shipping data | CRMM_BUT_SET0020 |
Bill rule | CRMM_BUT_LNK0031 |
Billing data | CRMM_BUT_SET0030 |
Organization rule | CRMM_BUT_LNK0141 |
CRMM_BUT_LINK* | Link a set of attribute data to business partner |
|
|
CRMM_BUT_SET* | unique set of attributes for a given period |
|
|
BAPI_BUPA_FRG<NUMBER> | BAPIs for each set of attributes |
|
|
BUT020 | Table | Address Data |
|
BUPA_ADDRESSES_GET | Function Module | Get the list of addresses for a business partner |
|
BUPA_ADDRESSES_GET_DETAIL | Function Module | Get the detail of a particular address |
|
BUPR_CONTP_ADDRESSES_GET | Function Module | Retrieves the addresses for a contact person relation of the business partner |
|
BUPR_CONTP_ADDR_GET_DETAIL | Function Module | Retrieves the details of an address for a contact person relation of the business partner |
|
BUT050 | Table | Relationship Data |
|
BUT050-RELNR | Field |
|
|
BUT050-PARTNER1 | Field | Parent partner in the relationship |
|
BUT050-PARTNER2 | Field | Child partner in the relationship |
|
BUT050-DATE_TO | Field | Relationship end date |
|
BUT050-RELTYP | Field | Type of relationship BUR001 - Has Contact Person BUR001 - Has the Employee Responsible |
|
BUT051 | Table | Specific information for a contact person relationship. Contains work address which is equivalent to relationship address for the contact person |
|
#Contact Person Retrieval for a Business Partner
DATA: Iv_partner TYPE bu_partner.
lt_partner type table of bu_partner.
lt_addresses type table of
lt_return type table of bapiret2.
field-symbols: type bu_partner.
* LV_PARTNER is the main partner that you wish to find contact
* persons for
SELECT partner2 FROM but050 INTO TABLE It_partner
WHERE partner1 = Iv_partner
AND date_to le sy-datum
AND reltyp = 'BUR001'.
LOOP AT It_partner ASSIGNING <fs_partner>.
refresh: It_addresses, lt_return.
CALL FUNCTION 'BUPR_CONTP_ADDRESSES_GET'
EXPORTING
IV_PARTNER = Iv_partner
IV_CONTACTPERSON = <fs_partner>
TABLES
ET_ADDRESSES = lt_addresses
ET_RETURN = lt_return.
ENDLOOP .
CL_CRM_DOCUMENTS | Class | To retrieve attachments from CRM Document Management System |
|
#Retrieve Document Attachments for a Business Partner
DATA:
ls_business_object TYPE SIBFLPORB,
lt_phioloios TYPE SKWF_LPIOS,
LT_IOS_PROPERTIES_RESULT TYPE CRM_KW_PROPST,
LS_IOS_PROPERTIES_RESULT TYPE CRM_KW_PROPST.
data:
ls_loio TYPE SKWF_IO,
ls_phio TYPE SKWF_IO,
lt_bad_ios TYPE SKWF_IOERRS,
ls_properties TYPE SDOKPROPTL.
lv_filename TYPE SDOK_FILNM,
lv_directory TYPE SDOK_CHTRD.
FIELD-SYMBOLS: <fs_phioloios> TYPE SKWF_LPIO.
* The instance ID is the GUID of the partner
* The type ID is business object BUS1006 which is SAP Business Partner
lv_directory = 'C:'.
ls_business_Object-instid = iv_guid.
ls_business_object-typeid = 'BUS1006'.
ls_business_object-catid = 'BO'.
CALL METHOD CL_CRM_DOCUMENTS=>GET_INFO
EXPORTING
BUSINESS_OBJECT = ls_business_object
IMPORTING
PHIOLOIOS = lt_phioloios
ios_properties_result = lt_ios_properties_result.
LOOP AT lt_phioloios ASSIGNING <fs_phioloios>.
CLEAR: ls_loio, ls_phio. ls_ios_properties_result,
lv_filename, ls_properties.
ls_loio-OBJTYPE = <fs_phioloios>-OBJTYPELO.
ls_loio-CLASS = <fs_phioloios>-CLASSLO.
ls_loio-OBJID = <fs_phioloios>-OBJIDLO.
ls_phio-OBJTYPE = <fs_phioloios>-OBJTYPEPH.
ls_phio-class = <fs_phioloios>-CLASSPH.
ls_phio-objid = <fs_phioloios>-OBJIDPH.
READ TABLE lt_ios_properties_result into ls_ios_properties_result
WITH KEY objtype = ls_loio-objtype
class = ls_loio-class
objid = ls_loio-objid.
READ TABLE ls_ios_properties_result-properties into ls_properties
WITH KEY name = 'KW_RELATIVE_URL'
Lv_filename = Ls_properties-value.
CALL METHOD CL_CRM_DOCUMENTS=>GET_WITH_FILE
EXPORTING
L0I0 = ls_loio
PHIO = ls_phio
FILE_NAME = lv_filename
DIRECTORY = lv_directory
IMPORTING
BAD_IOS = lt_bad_ios
EXCEPTIONS
NOT_TRANSFERRED = 1
OTHERS = 2.
ENDLOOP.
COMM_PRODUCT | Primary Header Table | General Data |
COMM_PR_FRG_REL | Segment Relationship Table | General Data: Links PRODUCT_GUID to FRAGMENT_TYPE. The actual data associated with the product in the fragment table is identified via FRAGMENT_GUID |
COMM_CATEGORY | Category | |
COMM_PRCAT | Product Category | Links Product Type(Service, Material etc.) with Category |
COMM_CATFRGR | Category Set-Type Assignment | Fragments associated with a Category |
COMC_SETTYPE | Administrative Tables for Set Types | Contains Fragment Types and the corresponding Attribute set tables, FMs etc. |
COM_PRODUCT_MAT_MAINT_MULT_API | Create/Update | |
COM_PRODUCT_GETDETAIL_API | Read |
DATA: lt_product TYPE comt_product_mat_maintain_apit,
ls_product TYPE comt_product_mat_maintain_api,
et_product TYPE comt_product_mat_maintain_apit,
ls_unit TYPE comt_pr_unit_maintain,
lt_bapireturn TYPE bapiret2_tab,
lv_logsys TYPE logsys,
lv_product_guid TYPE comt_product_guid.
DATA: lt_base_category TYPE comt_category_tab,
ls_base_category TYPE comt_category,
ls_short_texts TYPE comt_pr_shtext_maintain,
ls_categories TYPE comt_prod_cat_rel_maintain.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = lv_logsys " Name of own logical system
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Generate a GUID in order link-related tables
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = lv_product_guid. " GUID of length 16 (RAW Format)
.
ls_product-header-com_product-product_guid = lv_product_guid.
ls_product-header-com_product-product_id = 'TESTMATNUM'.
* Product Type is Material
ls_product-header-com_product-product_type = '01'.
ls_product-header-com_product-logsys = lv_logsys.
ls_product-header-update_type = 'I'.
ls_short_texts-data-product_guid = lv_product_guid.
ls_short_texts-data-short_text = 'Test Material Description'.
ls_short_texts-data-langu = sy-langu.
ls_short_texts-data-logsys = lv_logsys.
ls_short_texts-data_x-short_text = 'X'.
ls_short_texts-update_type = 'I'.
APPEND ls_short_texts TO ls_product-header-short_texts.
* Assign the category MAT_FERT to the product
CALL FUNCTION 'COM_PRODUCT_BASE_CATEGORY_READ'
EXPORTING
iv_product_type = '01' " Product Type
iv_read_text = ' '
IMPORTING
et_category = lt_base_category " Category
* et_value =
EXCEPTIONS
nothing_found = 1
application_not_defined = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE lt_base_category INTO ls_base_category WITH KEY category_id = 'MAT_FERT'.
ls_categories-data-product_guid = lv_product_guid.
ls_categories-data-hierarchy_guid = ls_base_category-hierarchy_guid.
ls_categories-data-category_guid = ls_base_category-category_guid.
ls_categories-data-category_id = ls_base_category-category_id.
ls_categories-data-logsys = lv_logsys.
ls_categories-update_type = 'I'.
APPEND ls_categories TO ls_product-header-categories.
* Prepare base unit of measurement
ls_unit-data-product_guid = lv_product_guid.
ls_unit-data-unit = 'KG'.
ls_unit-data-numerator = 1.
ls_unit-data-denominator = 1.
ls_unit-data-logsys = lv_logsys.
ls_unit-data-is_base_unit = 'X'.
APPEND ls_unit TO ls_product-data-comm_pr_unit.
APPEND ls_product TO lt_product.
CALL FUNCTION 'COM_PRODUCT_MAT_MAINT_MULT_API'
EXPORTING
it_product = lt_product
IMPORTING
et_product = et_product
et_bapireturn = lt_bapireturn " Error Messages
EXCEPTIONS
internal_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'COM_PRODUCT_SAVE_API'
EXPORTING
iv_update_task = 'X'
EXCEPTIONS
internal_error = 1
save_not_allowed = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'. " Using the command `COMMIT AND WAIT`
Same data model and APIs for all business transaction types in the system.
Central administration tables and Segment data tables at both Header and Item levels.
Data segment tables are further classified into Header extension and Item extension.
CRMD_ORDERADM_H | Header Central administration table | ||
CRMV_OBJECTS | Complete list of all segments | ||
ACTIVITY_H | CRMD_ACTIVITY_H | Activity header data | |
CUTOMER_H | CRMD_CUSTOMER_H | Customer extension data | |
LEAD_H | CRMD_LEAD_H | Lead header data | |
OPPORT_H | CRMD_OPPORT_H | Opportunity header data | |
PRICING | CRMD_PRICING | Pricing parameter data | |
SALES | CRMD_SALES | Sales data | |
SERVICE_H | CRMD_SERVICE_H | Service header data | |
APPOINTMENT | SCAPPTSEG | Appointments |
CRMD_ORDERADM_I | Item Central administration table | ||
CUTOMER_I | CRMD_CUSTOMER_I | Line item customer extension data | |
OPPORT_I | CRMD_OPPORT_I | Line item opportunity data | |
PRODUCT_I | CRMD_PRODUCT_I | Line item product data | |
PRICING_I | CRMD_PRICING_I | Line item pricing data | |
SERVICE_I | CRMD_SERVICE_I | Line item Service data | |
SERVICE_OS | CRMD_SRV_OSSET | Service OS | |
SERVICE_OS | CRMD_SRV_REFOBJ | ||
SERVICE_OS | CRMD_SRV_SUBJECT | ||
SERVICE_OS | CRMD_SRV_RANGE |
Link Segment tables and primary business transaction tables
CRMD_LINK | Links Segment tables and primary business transaction tables | The segment type/object type is required for this. Segment type and Object type can be picked from table CRMV_OBJECTS. |
CRMV_SUBOB_CAT | Possible Business object types used by One Order Framework | ||
CRMV_OBJECT_ASSI | Assignment of Segments to Business Object Types | ||
CRMV_PROC_TYPE | Transaction Types |
The relationship between business object type, process type, and UI component type is not always clear. To better understand how these are related, let's look at how to find this information for a leads business transaction. Leads are modeled as a business transaction in SAP CRM. SAP delivers a standard transaction type called LEAD. If you go into the IMG and look at the Customizing definition Of the LEAD which is found via CRM • TRANSACTIONS • BASIC SETTINGS • DEFINE TRANSACTION TYPES, you will find that the LEAD transaction type has a leading transaction category of BUS2000108 which is "Lead." The leading transaction category of a business transaction type will control which UI component is used to display that process. TO figure out which UI component is used for the display of the header details of the transaction type, we'll take the last three digits of the leading transaction category which would be "108" in this case. We then know that the lead UI component for the header will start with BT108H_<OBJ>. We can easily search for UI components starting with BT108H to find everything related to leads from a technical perspective.
UI Components: CRM • UI Framework Definition • Access UI Component Workbench.
Now if you want to cheat to figure Out the UI component, you can always click when you're on the screen displaying the transaction and you'll see what UI component was used. The method we describe here allows you to figure out the UI component without needing to log into the Web Client.
Each Transaction Type a defines unique business process based on one or more business object types but will, however, have one business object type for controlling purposes.
To create a new transaction type, we recommend that you copy an existing transaction type to a transaction type that starts with either "Z" or "Y".
You should never change the customizing on the SAP-delivered transaction type because upgrades to your SAP CRM system could overwrite the changes made.
API Segment Function Modules - CRM_<SEGMENTNAME>_<OPERATION>_OW.
Operations - MAINTAIN, READ ETC.
Example: For segment CUSTOMER_H the API function modules are
CRM_CUSTOMER_H_READ_OW and CRM_CUSTOMER_H_MAINTAIN_OW
CRM_<SEGMENTNAME>_<OPERATION>_OW | FM | Segment API FM | |
CRM_ORDER_READ | FM | To read all data related to a Business Transaction | |
CRM_ORDER_READ | Report | To read all data related to a Business Transaction | |
CRMD_ORDER_INDEX | Table | Table created by SAP to allow searching of transactions by Business Partner in more effecient way | |
CRMD_INDEX_JEST | View | Search transactions with status filter | |
# CRM_ORDER_MAINTAIN
# Example to change the Description and Priority of the transaction
INCLUDE CRM_OBJECT_KINDS_CON.
INCLUDE CRM_OBJECT_NAMES_CON.
INCLUDE CRM_MODE_ON.
DATA: LV_TRANS_GUID TYPE CRMT_OBJECT_GUID,
LV_DESCRIPTION TYPE CRMT_PROCESS_DESCRIPTION,
LV_PRIORITY TYPE CRMT_PRIORITY.
DATA: LT_INPUT_FILEDS TYPE CRMT_INPUT_FIELD_TAB,
LS_INPUT_FILEDS TYPE CRMT_INPUT_FIELD.
DATA: LT_INPUT_FILED_NAMES TYPE CRMT_INPUT_FIELD_NAMES_TAB,
LS_INPUT_FILED_NAMES TYPE CRMT_INPUT_FIELD_NAMES,
LT_EXCEPTION TYPE CRMT_EXCEPTION_T.
DATA: LT_OBJECTS_TO_SAVE TYPE CRMT_OBJECT_GUID_TAB,
LT_OBJECTS_NOT_SAVED TYPE CRMT_OBJECT_GUID_TAB.
DATA: LT_ORDERADM_H TYPE CRMT_ORDERADM_H_COMT,
LS_ORDERADM_H TYPE CRMT_ORDERADM_H_COM,
LT_ACTIVITY_H TYPE CRMT_ACTIVITY_H_COMT,
LS_ACTIVITY_H TYPE CRMT_ACTIVITY_H_COM.
LV_TRANS_GUID = '000999888777666' #Input your GUID
LV_DESCRIPTION = 'New Description'.
LV_PRIORITY = '1'.
* ACTIVITY HEADER
ls_activity_h-mode = gc_mode-change.
ls_activity_h-priority = lv_priority.
INSERT ls_activity_h INTO TABLE lt_activity_h.
ls_input_field_names-field_name = 'PRIORITY'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_trans_guid.
ls_input_fields-ref_kind = gc_object_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-activity_h.
ls_input_fields-field_names = lt_input_field_names.
INSERT ls_input_fields TO lt_input_fields.
* Order Header
ls_orderadm_h-mode = gc_mode-change.
ls_orderadm_h-guid = lv_trans_guid.
ls_orderadm_h-description = lv_descripton.
INSERT ls_orderadm_h INTO TABLE lt_orderadm_h.
*Build table with change fields
FREE lt_inut_field_names.
IF ls_orderadm_h-description IS NOT INITIAL.
ls_input_field_names-fieldname = 'DESCRIPTION'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ENDIF.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_trans_guid.
ls_input_fields-ref_kind = gc_object_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-orderadm_h.
ls_input_fields-field_names = lt_input_field_names.
INSERT ls_input_fields INTO TABLE lt_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_activity_h = lt_activity_h
importing
et_exception = lt_exception
changging
ct_orderadm_h = lt_orderadm_h
ct_input_fields = lt_input_fields
exceptions
error_occured = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
others = 5.
READ TABLE lt_exception TRANSPORTING NO FIELDS WITH KEY guid = lv_trans_guid.
IF SY-SUBRC NE 0.
INSERT lv_trans_guid INTO TABLE LT_OBJECTS_TO_SAVE.
IF LT_OBJECTS_TO_SAVE IS NOT INITIAL.
# save object
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE = LT_OBJECTS_TO_SAVE
IMPORTING
ET_OBJECTS_NOT_SAVED = LT_OBJECTS_NOT_SAVED
ET_EXCEPTION = LT_EXCEPTION
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
READ TABLE lt_exception TRANSPORTING NO FIELDS WITH KEY guid =
lv_trans_guid.
IF SY-SUBRC NE 0.
COMMIT WORK.
ENDIF.
ENDIF.
ENDIF.
BOL(Business Object Layer) is an abstraction layer used by Web Client to seperate UI logic from business logic. In the MVC(Model View Controller) paradigm BOL represents the model layer.
BOL uses One Order API for creating, changing, reading and deleting the business transaction maintained in the Web Client interface.
CRMV_OBJ_BTIL | View | Contains BOL Object corresponds to a segment name | |
CRM_BTIL_OBJ | Package | Package contains most of the classes used to implement most of the segments of the One Order data model. |
Attributes: Common characteristics of a business partner that can be used to classify or group one or more common customers together witthin a group.
An example attribute could be sales volume, which might be high, medium, low instead of a specific number.
Attribute set: Similar attributes that describe related characteristics of a business partner can be put together as an attribute set.
Example: Attribute set "Buying Pattern" containing attributes sales volume and order frequency. Both attributes can be maintained independently as well.
Marketing attributes definition can be accessed using Web Client with business role 'MARKETINGPRO'. Go to Marketing work center and choose the Attributes option under Search menu or Transaction CRMD_MKT_TOOLS.
Marketing Attributes is an API on top of the standard SAP classification system.
SAP Classification system | CRM Marketing Attributes |
Characteristics Table - CABN Transaction - CT04 | Attributes |
Class - group of Characteristics Transaction - CL03 Table - KLAH (Class Header) | Attribute Set - Group of attributes |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.