T-CODE: BP ( 附加:T-CODE: UKM_MALUS_DSP 信誉透支清单)
维护信贷管理数据
上图选择“SAP 信贷管理” ,维护字段:“风险类”“检查规则”。
点击“信誉数据”按钮,如下
维护字段:“信誉段”“定义的限额”。
通过如下方法实现:
TYPES: BEGIN OF ty_alv, sel(1) TYPE c, light TYPE icon-name, index(10) TYPE n, partner TYPE ukmbp_cms_sgm-partner, credit_sgmnt TYPE ukmbp_cms_sgm-credit_sgmnt, risk_class TYPE ukmbp_cms-risk_class, risk_class_txt TYPE ukm_risk_cl0t-risk_class_txt, check_rule TYPE ukmbp_cms-check_rule, credit_limit TYPE ukmbp_cms_sgm-credit_limit, status TYPE string, END OF ty_alv.*&---------------------------------------------------------------------**& Form FRM_METHOD_CALL*&---------------------------------------------------------------------**& text*&---------------------------------------------------------------------*FORM frm_method_call USING u_alv TYPE ty_alv CHANGING c_return TYPE ukm_t_monitor_return. DATA: io_facade TYPE REF TO cl_ukm_facade, io_bupa_factory TYPE REF TO cl_ukm_bupa_factory, io_partner TYPE REF TO cl_ukm_business_partner, io_account TYPE REF TO cl_ukm_account, lw_bp_credit_sgm TYPE ukm_s_bp_cms_sgm. DATA: lwa_ukm_s_bp_cms TYPE ukm_s_bp_cms. DATA: lv_partner TYPE bu_partner, lv_credit_sgmnt TYPE ukm_credit_sgmnt.* 创建'MAINTAIN'对象 io_facade = cl_ukm_facade=>create( i_activity = cl_ukm_cnst_eventing=>bp_maintenance ). io_bupa_factory = io_facade->get_bupa_factory( ). lv_partner = u_alv-partner. "客户代码 lv_credit_sgmnt = u_alv-credit_sgmnt."信誉段 io_partner = io_bupa_factory->get_business_partner( lv_partner ). io_partner->get_bp_cms( IMPORTING es_bp_cms = lwa_ukm_s_bp_cms ). lwa_ukm_s_bp_cms-risk_class = u_alv-risk_class. "风险类 lwa_ukm_s_bp_cms-check_rule = u_alv-check_rule. "检查规则 io_partner->set_bp_cms( lwa_ukm_s_bp_cms ). CALL METHOD io_bupa_factory->get_credit_account EXPORTING i_partner = lv_partner i_credit_sgmnt = lv_credit_sgmnt RECEIVING ro_credit_account = io_account. io_account->get_bp_cms_sgm( IMPORTING es_bp_cms_sgm = lw_bp_credit_sgm ). lw_bp_credit_sgm-credit_limit = u_alv-credit_limit."信誉额度 io_account->set_bp_cms_sgm( EXPORTING is_bp_cms_sgm = lw_bp_credit_sgm ). io_bupa_factory->save_all( EXPORTING i_upd_task = abap_false RECEIVING et_return = c_return ).ENDFORM.注意:
假设“信誉段”中没有维护任何数据,该“信誉段”的描绘不会呈现“(已维护)”
|