和SAP Sales Organization相关的一些有用函数
生活随笔
收集整理的這篇文章主要介紹了
和SAP Sales Organization相关的一些有用函数
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Created by Jerry Wang, last modified on Jun 11, 2015
根據(jù)sales org id取得對應的description
CALL FUNCTION 'COM_OM_ORGOBJECT_TEXTS_GET'EXPORTINGOTYPE = LV_SALES_ORG(2) - O OBJID = LV_SALES_ORG+2(12) - 50000732SELDATE = SY-DATUMIMPORTINGSHORT = LV_SALES_ORG_SHORT - CCNEXT取得order item level的sales org id和distribution channel:
call function 'CRM_ORGMAN_READ_OW'exportingiv_ref_guid = iv_guidiv_ref_kind = gc_object_ref_kind-orderadm_iimportinges_orgman_wrk = ls_orgman_wrkexceptionsothers = 1.lv_sales_org = ls_orgman_wrk-sales_org. - O 50000732lv_distr_chan = ls_orgman_wrk-dis_channel. - 01取得product sales area信息:
call function 'CRM_PRODUCT_SALES_READ_API'exportingi_product_guid = iv_product_guidi_sales_org = lv_sales_org - O 50000732i_distr_chan = lv_distr_chan - 01importinges_product_sales_data = cs_product_sales_data檢查product的sales org信息:
"check, if sales data for products is available: *-----------------------------------------------------------------------------ls_rel-product_guid = is_product-product_guid.ls_rel-sales_org = ls_distr_chain-sales_org.ls_rel-distr_chan = ls_distr_chain-dis_channel.CALL FUNCTION 'CRM_CRMM_PR_SALESA_GET'EXPORTINGiv_product_guid = is_product-product_guidis_rel = ls_reliv_current = i_currentiv_timestamp = i_timestamp * IV_UPDATE_BUFFER = 'X' * IV_READ_DB_VALUES = ' 'IMPORTINGes_set_maintain = ls_set_maintain_a * ES_SET_MAINTAIN_DB =EXCEPTIONSnot_found = 1OTHERS = 2.讀取item 狀態(tài)
CALL FUNCTION 'CRM_STATUS_READ_OW'EXPORTINGit_guid = lt_item_guidsiv_only_active = trueiv_only_systemstatus = trueiv_lean_read = trueIMPORTINGet_status_wrk = lt_status_wrk根據(jù)輸入信息determine出pricing procedure
CALL FUNCTION 'CRM_PRIDOC_COM_PRCPROC_DET_SEL'EXPORTINGiv_sales_org = ls_orgman-sales_orgiv_dis_channel = ls_orgman-dis_channeliv_division = ls_orgman-divisioniv_cust_pric_proc = ls_pricing_wrk-cust_pric_prociv_doc_pric_proc = sv_doc_pric_procIMPORTINGes_prcproc_det = ls_prcproc_detGet team colleagues list
CALL FUNCTION 'CRM_ORGMAN_EMPL_ENVOIREM_GET'EXPORTINGiv_keydate = sy-datum iv_realo = lv_realoTABLESemployes_of_orgunit = lt_emps[].get corresponding handler function module name by object name
CALL FUNCTION 'CRM_OBJECT_NAMES_DETERMINE' EXPORTING iv_object_name = iv_object_name IMPORTING ev_func_name_create_ow = lv_func_name_create_ow ev_wrk_structure_name = lv_wrk_structure_name ev_func_name_merge_mdata_ow = lv_func_name_merge_mdata_ow.讀取order對應的organization unit信息
CALL FUNCTION 'CRM_LINK_GET_OW' EXPORTING iv_guid_hi = <lv_ref_guid> iv_objname_hi = lv_objname_hi - ORDERADM_H iv_objname_set = iv_object_name - ORGMAN iv_inherit_from_str = true IMPORTING et_link = lt_link_comCRMC_SALES_HEAD: 維護transaction type對應的pricing document類型:
總結
以上是生活随笔為你收集整理的和SAP Sales Organization相关的一些有用函数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP tcode CMS_SI 里的t
- 下一篇: 苹果xr怎么拒接电话