2024年3月6日发(作者:)
buzei bschl lifnr as zlknn hkont wrbtr waers dmbtr rebzg rebzj rebzz rstgr shkzg umskz zuonr zfbdt into corresponding fields of table gt_post from bsik for all entries in gt_uncle where bukrs = gt_uncle-bukrs and gjahr = gt_uncle-gjahr and belnr = gt_uncle-belnr and buzei = gt_uncle-buzei and lifnr = gt_uncle-lifnr. "供应商标识 gw_post-zlkfg = 'K'. modify gt_post from gw_post transporting zlkfg where zlkfg is initial. "bsid select bukrs belnr gjahr budat blart buzei bschl kunnr as zlknn hkont wrbtr waers dmbtr rebzg rebzj rebzz rstgr shkzg umskz zuonr zfbdt appending corresponding fields of table gt_post from bsid for all entries in gt_uncle where bukrs = gt_uncle-bukrs and gjahr = gt_uncle-gjahr and belnr = gt_uncle-belnr and buzei = gt_uncle-buzei and kunnr = gt_uncle-kunnr. "客户标识 gw_post-zlkfg = 'D'. modify gt_post from gw_post transporting zlkfg where zlkfg is initial. sort gt_post by bukrs gjahr zlknn belnr buzei . if gt_post is not initial. " TBSL select bschl shkzg koart xsonu into corresponding fields of table gt_tbsl from tbsl for all entries in gt_post where bschl = gt_post-bschl. sort gt_tbsl by bschl shkzg koart. delete adjacent duplicates from gt_tbsl comparing all fields. "整合数据 loop at gt_post into gw_post. read table gt_tbsl into gw_tbsl with key bschl = gw_post-bschl. if sy-subrc = 0. gw_post-koart = gw_tbsl-koart. gw_post-bshkzg = gw_tbsl-shkzg. gw_post-xsonu = gw_tbsl-xsonu. modify gt_post from gw_post. clear : gw_tbsl. endif. clear : gw_post. endloop. "表t074u select koart umskz umsks into corresponding fields of table gt_t074u from t074u for all entries in gt_post where koart = gt_post-koart and umskz = gt_post-umskz. sort gt_t074u by koart umskz umsks. delete adjacent duplicates from gt_t074u comparing all fields. endif.
clear : lt_zmseg,gw_zmseg. if p_mod = 'X'. "加锁 call function 'ENQUEUE_EZ_TCM_001' exporting mode_zcm_t_001 = 'E' zoaid = pw_fail-zoaid _scope = '1' exceptions foreign_lock = 1 system_failure = 2 others = 3. if sy-subrc <> 0. gw_zmseg-tabix = p_index. gw_zmseg-ztype = 'E'. "消息 concatenate text-009 pw_fail-zoaid ',' text-012 sy-msgv1 text-031 into gw_zmseg-zmesg. append gw_zmseg to lt_zmseg. clear : gw_zmseg. endif. else. do 5 times. call function 'DEQUEUE_EZ_TCM_001' exporting mode_zcm_t_001 = 'E' mandt = sy-mandt zoaid = pw_fail-zoaid _scope = '1'. if sy-subrc = 0. exit. else. wait up to '0.2' seconds. endif. enddo. endif. "加锁或解锁不成功 if lt_zmseg is not initial. p_flag = 'F'. append lines of lt_zmseg to gt_zmseg. clear : lt_zmseg. m. " FRM_ADDORR_PAYLOCK*&---------------------------------------------------------------------**& Form FRM_OPEN_CLOSE_BDC*&---------------------------------------------------------------------** text 打开录屏*----------------------------------------------------------------------** -->P_2107 text*----------------------------------------------------------------------*form frm_open_close_bdc using p_mode. if p_mode = 'O'. call function 'POSTING_INTERFACE_START' exporting i_client = sy-mandt i_function = 'C' exceptions client_incorrect = 1 function_invalid = 2 group_name_missing = 3 mode_invalid = 4
select single name_first name_last into (l_name_first,l_name_last) from adrp where persnumber = l_persnumber. if sy-subrc = 0. concatenate l_name_last l_name_first into p_nametx. condense p_nametx no-gaps. endif. m. " FRM_GET_UNAME*&---------------------------------------------------------------------**& Form FRM_GET_RETURN_MSEG*&---------------------------------------------------------------------** text 得到返回信息*----------------------------------------------------------------------** -->PT_RETURN text* <--PW_PAYRE text*----------------------------------------------------------------------*form frm_get_return_mseg tables pt_return structure zcm_s_007 changing pw_payre like gw_payre. "返回信息 read table pt_return with key node = 'RetMsg'. if sy-subrc = 0. concatenate text-018 pt_return-content into pw_payre-zrmsg. "返回消息 endif. "返回信息 read table pt_return with key node = 'iRetMsg'. if sy-subrc = 0. if pt_return-content is not initial. concatenate pw_payre-zrmsg ',' text-019 pt_return-content into pw_payre-zrmsg. "返回消息 else. case pw_payre-zstat . when '10'. concatenate pw_payre-zrmsg ',' text-019 text-020 into pw_payre-zrmsg. "返回消息 when '09'. concatenate pw_payre-zrmsg ',' text-019 text-021 into pw_payre-zrmsg. "返回消息 when '08'. concatenate pw_payre-zrmsg ',' text-019 text-022 into pw_payre-zrmsg. "返回消息 endcase. endif. else. if pw_payre-zstat = '20'. concatenate pw_payre-zrmsg ',' text-023 into pw_payre-zrmsg. "返回消息 endif. m. " FRM_GET_RETURN_MSEG*&---------------------------------------------------------------------**& Form FRM_CHECK_AUTHORITY*&---------------------------------------------------------------------** text 检查权限*----------------------------------------------------------------------** -->P_FUNC text* <--P_FLAG text*----------------------------------------------------------------------*form frm_check_authority using p_func changing p_flag. data : e_index1 like sy-tabix.
endform. " FRM_LOCK_PAYDATA*&---------------------------------------------------------------------**& Form FRM_SAVE_PAYMENT*&---------------------------------------------------------------------** text 保存付款申请数据*----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*form frm_save_payment . if gt_s001 is not initial. do 10 times . modify zcm_t_001 from table gt_s001. if sy-subrc = 0. commit work . exit. else. wait up to '0.2' seconds. endif. enddo. m. " FRM_SAVE_PAYMENT*&---------------------------------------------------------------------**& Form FRM_GET_BLART_RSTGR*&---------------------------------------------------------------------** text 确定凭证类型,原因代码*----------------------------------------------------------------------** -->PW_PAYRE text* <--P_BLART text* <--P_RSTGR text*----------------------------------------------------------------------*form frm_get_blart_rstgr using pw_payre like gw_payre changing p_blart p_rstgr. if pw_payre-zlkfg = 'D'. "对客户付款 p_blart = 'DA'. elseif pw_payre-zlkfg = 'K'. "对供应商付款. if pw_payre-zdept = 'PC'. "部门 p_blart = 'ZC'. else. p_blart = 'KZ'. endif. endif. "原因代码 if pw_payre-zanlf = 'X'. "根据资产标识确定 p_rstgr = ( 'D01''D02' ). else. p_rstgr = ( 'B01''B02' ). m. " FRM_GET_BLART_RSTGR*&---------------------------------------------------------------------**& Form FRM_SYN_UNCSTAT*&---------------------------------------------------------------------** text 同步未清项状态*----------------------------------------------------------------------** -->PT_S001 text*----------------------------------------------------------------------*form frm_syn_uncstat tables pt_s001 structure zcm_t_001. data : lt_s002 type table of zcm_t_002. data : lw_s002 like line of lt_s002. "根据付款申请得到未清项 if pt_s001[] is not initial.


发布评论