Sample ABAP Program to Update Customer with CMD_EI_API

SAP CRM e1459022344657

This is a sample ABAP program to Update Customer Or Person / contact with the SAP API Class CMD_EI_API for Customer Modification.
First let’s introduce the main Class Methods , then a sample ABAP Program showing how to use the CMD_EI_API class to update SAP Customer Data.

Class CMD_EI_API Methods

The list of CMD_EI_API Methods will be:

Method Description
PREPARE_SALES_DATA? Fill Internal Tables of Sales Data
PROCESS_COMPANY_DATA? Actual Updating of Company Code Data
PROCESS_KNAS? Read KNAS Data
WORKLIST_CUSTOMER_MAINTAIN? Call Function Module WORKLIST_CUSTOMER_MAINTAIN
PROCESS_KNAT? Read KNAT Data
PROCESS_KNB5? Read KNB5 Data
PROCESS_KNBK? Read KNBK Data
PROCESS_KNBW? Read KNBW Data
PROCESS_KNEX? Read KNEX Data
PROCESS_KNVA? Read KNVA Data
PROCESS_KNVD? Read KNVD Data
PROCESS_KNVI? Read KNVI Data
UPDATE_VENDOR? Change Linked Vendors
UPDATE_STRUC_OF_TABLE? Write Data on Given Table to Internal Structure
UPDATE_SALES_TEXTS? Update Sales Texts
UPDATE_SALES_DATA? Update Sales Data
UPDATE_MODULES_SINGLE? Call Update for a Customer
UPDATE_MODULES? Call All Necessary Update Modules
PROCESS_KNVK? Read KNVK Data
PROCESS_KNVP? Read KNVP Data
PROCESS_SALES_DATA? Actual Updating of Sales Data
PROCESS_VCKUN_VCNUM? Read KNAS Data
SET_KNA1_CONFS? Fill Field KNA1
SET_KNA1_CONFS_DIRECT? Set Confirmation Flag Directly Without Checks
UPDATE_GENERAL_DATA? Update General Data
UPDATE_COMPANY_DATA? Update Company Code Data
UPDATE_COMPANY_CODE_TEXTS? Update Accounting Texts
UPDATE_CENTRAL_TEXTS? Update Central Texts
UPDATE_CENTRAL_PARTNER_TEXTS? Update Central Partner Texts
UPDATE_ADDRESS? Update Address
UNLOCK? Unlock Customer
STRUC_KNVV_COMPLETE? Complete KNVV
STRUC_KNVK_COMPLETE? Complete KNVK
STRUC_KNB1_COMPLETE? Complete KNB1
SET_KNB1_CONFS? Fill Field KNB1
SET_LOCK? Write Lock Table
STRUC_KNA1_COMPLETE? Complete KNA1
ADDRESSES_COMPLETE? Complete Addresses
ADDR_DELETE? Delete Contact Person Address
ADDR_PERSONAL_DELETE? Delete Contact Person Address
ADDR_PERS_COMP_DELETE? Delete Contact Person Address
BUILD_ADDRESS_REFERENCE? Create Address Reference
BUILD_PERSON_REFERENCE? Create Address Reference
CHECK_SENSITIVE_FIELD_KNA1? Check Sensitive Fields KNA1
CHECK_SENSITIVE_FIELD_KNAS? Check Sensitive Fields KNAS
CHECK_SENSITIVE_FIELD_KNB1? Check Sensitive Fields KNB1
CHECK_SENSITIVE_FIELD_KNB5? Check Sensitive Fields KNB5
CHECK_SENSITIVE_FIELD_KNBK? Check Sensitive Fields KNBK
CLEAR_UNCHANGED_CUSTOMER_DATA? Delete Customer Data if Unchanged
COMPLETE_AND_CHECK? Complete and Checks for All Supported Tables
CUSTOMER_ADDRESS? Update Customer Address
CUSTOMER_BTE_1320? Trigger function module OPEN_FI_PERFORM_00001320_E
CUSTOMER_BTE_1321? Call Function Module OPEN_FI_PERFORM_00001321_E
CUSTOMER_BTE_1340? Call Function Module OPEN_FI_PERFORM_00001340_E
CUSTOMER_CHDOC_CREATE? Call Function Module DEBI_WRITE_DOCUMENT
CUSTOMER_INSERT? Call Function Module CUSTOMER_INSERT
PREPARE_GENERAL_DATA? Fill Tables with General Data
PREPARE_COMPANY_CODE_DATA? Fill Internal Tables of Company Code Data
PARTNER_ADDRESSES? Update Partner Addresses (KNVK)
MAINTAIN_TEXT? Create/Update SAPscript Text in Catalog. COMMIT_TEXT Needed
MAINTAIN_SINGLE? Maintain a Customer
MAINTAIN_DIRECT_INPUT? Manage Customer Master Data Using BAPI
MAINTAIN_BAPI? Manage Customer Master Data Using BAPI
MAINTAIN? Manage Customer Master Data
LOCK? Lock Customer
KNKK_INSERT? Generate CreditMgmt Master Data Entry in Credit Control Area
INITIALIZE? Initialize Global and Current Customer Buffer
GET_NUMBER? Get Customer Number
GET_LOCK? Read Lock Table
GET_KTOKD? Get Account Group Customer from Buffer and/or Database
GET_CRITICAL_ROLES? Determine Critical Roles
GET_CONTACT_NUMBER? Get contact person number
GET_ADDRESS_NUMBER? Get Address Number
CUSTOMER_UPDATE? Call Function Module CUSTOMER_UPDATE

Update Customer with CMD_EI_API Sample ABAP Coding

This sample covers updating customer’s contacts using the Class API CMD_EI_API.