银行账号就是我们用来收款,付款时的银行账号了,比如我的银行卡号就是一个银行账号。此功能对应的SAP标准功能是FI12,在ECC版本直接可以在FI12上创建银行账号,但HANA S4时默认时FI12是不可创建的,需要修改配置(网络上可找到),S4推荐的维护银行账号的方法是使用FIORI,在项目中也使用了WEBDypro做了一个更复杂的功能来实现,但我觉得一般需求来说,使用FIORI应该是最好的选择,
银行账号没有做增强,同时也做了一个批量导入账号的程序 。
1.批量导入银行账号
批量导入账号时一般只用于系统上线时的初期导入使用,所以在程序 中做了一些历史账号的删除操作,
程序 中主要使用EXECL模板文件,上载数据 ,并调用函数 BAPI_HOUSE_BANK_REPLICATE,来创建银行账号
注:在导入银行账号时,为了方便后面的银企直联使用,做了一个自定义表T012K(T012T),一些标准表没有的数据,写到了自定义表中,
2.FIORI 创建银行账号
在此介绍标准的创建银行账号APP的实施过程, 可以在线演示,(账号:ZTEST01,密码: Ut163.com)
由于银行账号的一些信息SAP标准表没提供,但银企直联是需要的,所以自定义了一个表,用于存放银行账号的相关的一些标准、非标准信息,所以在做创建银行账号 FIORI APP时,得增强写入一些自定义的信息,并在账号保存时写到自定义表中。
先在sap FIORI library功能中找到FI12对就的管理银行的功能APP信息,这是我当前 找到的,里面应该还有其它的账号管理的APP,可以找了试试。打开后得到下面使用到的一些信息,比如:ODATA,APP运用名,角色名,都是我们所需要的(在查看时注意选择SAP服务的版本)
2.1.激活ODATA
如上图,OData Service为:FCLM_BAM_ACCOUNTWD_SRV,FIN_USER_DEFAULTPARAMETER_SRV,C_SITNINSTANCETP_CDS *,
所以使用事务码/n/IWFND/MAINT_SERVICE,添加服务,
2.2.Launchpad配置启用APP
Business Group为SAP_SFIN_BCG_BANK_REL,这与前一步中银行代码的组是同一个,如在上一步中启用的是这个组那在这里就不用设置了
使用事务码/UI2/FLP ,在IE中打开Launchpad的配置页而,这个出来的是带CLIENT的,直接启用 SAP_SFIN_BCG_BANK_REL ,这样会把银行相关的很多东西都一起启用,如要细节的显示指定的功能APP,那需要建立一个新的GROUP,并把APP分配给组,更多细节操作可以我的网站上找,在其它章节有细说,
2.3.给用户分配角色权限
角色 对像为:SAP_BR_CASH_MANAGER
使用事务码PFCG,把这两角色都分配给用户,
2.4.增强扩展字段
比如不是每一个银行账号都可以用来做银行直连支付的,所以我们需要表中记录账号是否可用做银企直连接,及直连开户日期等。
增强扩展细节可参看:FIORI 增强/扩展
银行账号扩展标准文档:App Extensibility: Manage Bank Accounts
到此,前台用户就可以使用FIORI APP 进行银行管理了。比如我们的演示地址:演示
由于后面在做银企直连时,要用到银行账号,所以需要把银行账号的属性记录到自定表中(主要是以前做的银企直连功能在ECC中使用的都是自定义表,所以在此只能把银行账号也写到自定义表中,以后考虑把自定义表取消,只使用标准表及在标准表中增加的扩展字段)
创建增强字段后,会在表FCLM_BAM_AMD,增强对应的字段,最终在显示银行账号时先用CDS视图IBKACCTNUMBERVH按账号取得技术标识 ,再调用CDS视图IBANKACCOUNTTP,并显示版本号(修订编号)为0的账号数据。来显示出完整的银行账号数据。
2.5.注:
1.在FIORI APP“管理银行账号”中创建完银行账号后,需要使用另外一个账号来激活(不知为什么用当前账号不能激活,应该不是权限的问题,可能是那里配置不对,用其它相同权限的账号就能激活),
2.在账号修改后,也需要用另外的账号来激活。这里应该可以参考一下,在Financial Supply Chain Management -》现金和流动性管理 -》常规设置中配置后,可直接激活。。
3.WEBDypro 创建银行账号
WEBDYPRO或者是自开发程序时,数据会保存到自定义表,同时保存在标准表,而如使用标准的FIORI时,自定义表就没有数据(应该也可以使用增强在保存账号时把数据保存到自定表中),此种情况下可以做一个“替代”标准表的CDS然后在自定义表中使用替代表,这样就会指向CDS,当从自定表表读取数据时就可以从自定义表中取数了。
以下是在 自定义程序中创建银行账号数据的一段代码例子
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
method z_create_bapi . data lv_app_name type string. data ls_0003 type ztrs0003. data ls_ztrt0003 type ztrt0003. data lt_ztrt0013 type table of ztrt0013. data ls_ztrt0013 type ztrt0013. data lt_t012 type table of t012. data lt_t012k type table of t012k. lv_app_name = cl_wdr_task=>application->name. ls_0003 = wd_comp_controller->get_detail( ). move-corresponding ls_0003 to ls_ztrt0003. * ls_ztrt0003-hbkid = wd_this->gv_hbkid. * ls_ztrt0003-hktid = wd_this->gv_hktid. * 开户银行的简要键 select single * into @data(ls_t012) from t012 where bukrs = @ls_0003-bukrs and banks = @ls_0003-banks and bankl = @ls_0003-bankl. if sy-subrc = 0. ls_ztrt0003-hbkid = ls_t012-hbkid. else. select max( hbkid ) into @data(lv_hbkid) from t012 where bukrs = @ls_0003-bukrs. if lv_hbkid is initial. ls_ztrt0003-hbkid = '10001'. else. ls_ztrt0003-hbkid = lv_hbkid + 1. endif. * shift ls_ztrt0003-hbkid right deleting trailing space. endif. * condense ls_ztrt0003-hbkid. * 帐户细目的代码 select max( hktid ) into @data(lv_hktid) from t012k where bukrs = @ls_0003-bukrs and hbkid = @ls_ztrt0003-hbkid. if lv_hktid is initial. ls_ztrt0003-hktid = '10001'. else. ls_ztrt0003-hktid = lv_hktid + 1. endif. * condense ls_ztrt0003-hbkid. * shift ls_ztrt0003-hktid right deleting trailing space. ls_ztrt0003-text1 = wd_this->gv_text1. data ls_housebank type bapi_housebank. data ls_hbankparameter type bapi_hbankparameter. data lt_housebankaccount type table of bapi_housebankaccount. data ls_housebankaccount type bapi_housebankaccount. data lt_hbankaccountname type table of bapi_hbankaccountname. data ls_hbankaccountname type bapi_hbankaccountname. data lt_return type table of bapiret2. data ls_return type bapiret2. *Transfer structure object t012:House Bank ls_housebank-bukrs = ls_ztrt0003-bukrs. ls_housebank-hbkid = ls_ztrt0003-hbkid. ls_housebank-banks = ls_ztrt0003-banks. ls_housebank-bankl = ls_ztrt0003-bankl. * Parameters for DMEs and foreign pmnt transactions ls_hbankparameter-bukrs = ls_ztrt0003-bukrs. ls_hbankparameter-hbkid = ls_ztrt0003-hbkid. *Transfer structure object T012K: House Bank Account ls_housebankaccount-bukrs = ls_ztrt0003-bukrs. ls_housebankaccount-hbkid = ls_ztrt0003-hbkid. ls_housebankaccount-hktid = ls_ztrt0003-hktid. ls_housebankaccount-bankn = ls_ztrt0003-yhzh+0(18). * ls_housebankaccount-bkont = ls_ztrt0003-bkont. ls_housebankaccount-waers = ls_ztrt0003-waers. ls_housebankaccount-refzl = ls_ztrt0003-yhzh+18(12). * ls_housebankaccount-hkont = ls_ztrt0003-hkont. call function 'CONVERSION_EXIT_ALPHA_INPUT' exporting input = ls_ztrt0003-hkont importing output = ls_housebankaccount-hkont. append ls_housebankaccount to lt_housebankaccount. clear ls_housebankaccount. ls_hbankaccountname-spras = ls_ztrt0003-spras. ls_hbankaccountname-bukrs = ls_ztrt0003-bukrs. ls_hbankaccountname-hbkid = ls_ztrt0003-hbkid. ls_hbankaccountname-hktid = ls_ztrt0003-hktid. ls_hbankaccountname-text1 = ls_ztrt0003-text1. append ls_hbankaccountname to lt_hbankaccountname. clear ls_housebankaccount. call function 'BAPI_HOUSE_BANK_REPLICATE' exporting is_housebank = ls_housebank is_hbankparameter = ls_hbankparameter importing return = ls_return tables it_housebankaccount = lt_housebankaccount it_hbankaccountname = lt_hbankaccountname et_return = lt_return. read table lt_return into ls_return with key type = 'E'. if sy-subrc = 0. zcl_wd_message=>show_msg_detail( exporting iv_type = ls_return-type iv_msgid = 'ZTR01' iv_msgno = '000' iv_msgty = ls_return-type iv_msgv1 = |{ ls_return-message }| ir_controller = wd_this->wd_get_api( ) ). ev_err_flg = 'X'. rollback work. exit. else. * zcl_wd_message=>show_msg_detail( * exporting * iv_type = 'S' * iv_msgid = 'ZTR01' * iv_msgno = '029' * iv_msgty = 'S' * iv_msgv1 = |{ ls_ztrt0003-docno }| * ir_controller = wd_this->wd_get_api( ) "单据号:& 保存成功! * ). call function 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X'. move-corresponding ls_ztrt0003 to ls_ztrt0013. if ls_ztrt0013-is_nxh = space. ls_ztrt0013-is_nxh = '0'. endif. append ls_ztrt0013 to lt_ztrt0013. clear ls_ztrt0013. modify ztrt0013 from table lt_ztrt0013[]. * modify ztrt0003 from ls_ztrt0003 transporting hbkid hktid . update ztrt0003 set hbkid = ls_ztrt0003-hbkid hktid = ls_ztrt0003-hktid where docno = ls_ztrt0003-docno. commit work. endif. endmethod. |
4.S4 特殊处理
上面的代码update_house_bank_account在ECC中能正确创建银行账号,但在S4上确不能创建,在类CL_FCLM_BAM_HOUSE_BANK_API-》UPDATE_HOUSE_BANK_ACCOUNT中的开头写入增强,就可正常
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
ENHANCEMENT 1 ZTR_IMP_BANK_ACCOUNT. "active version *BAPI_HOUSE_BANK_REPLICATE调用创建账号时,在ECC正常,但S4运行到这后,只会使用UPDATE,不会INSERT, *所以在这里把不已存在的数据使用INSERT, *不存在的数据运行进update_house_bank_account时不会处理,所以不用修改。 *--------------------------------------------------------------------* DATA: ls_t012tz TYPE t012t, lt_t012t_ins TYPE TABLE OF t012t, lT_MESSAGE TYPE bapirettab. DATA: l_zbapi TYPE char10 ."VALUE 'ZBAPI'. IMPORT L_ZBAPI = L_ZBAPI FROM MEMORY ID 'ZBAPI'. IF l_zbapi = 'ZBAPI'. SELECT bukrs, hbkid, hktid FROM fclm_bam_t012k_base INTO TABLE @DATA(lt_existance) WHERE bukrs = @is_t012k-bukrs AND hbkid = @is_t012k-hbkid AND hktid = @is_t012k-hktid. IF sy-subrc <> 0."不存在,新账号 * IF it_hbankacctname IS NOT INITIAL. * LOOP AT it_hbankacctname INTO DATA(ls_hbankacctn) WHERE bukrs = is_t012k-bukrs * AND hbkid = is_t012k-hbkid * AND hktid = is_t012k-hktid * AND deletion_flag = ''. * MOVE-CORRESPONDING ls_hbankacctn TO ls_t012tz ##ENH_OK . * APPEND ls_t012tz TO lt_t012t_ins. * ENDLOOP. * ENDIF. IF is_t012k IS NOT INITIAL OR lt_t012t_ins IS NOT INITIAL. cl_fclm_house_bank_account_api=>insert_house_bank_account( EXPORTING it_t012k = VALUE #( ( is_t012k ) ) it_t012t = lt_t012t_ins IMPORTING et_message = lT_MESSAGE ). READ TABLE lT_MESSAGE INTO DATA(ls_MESSAGE) WITH KEY type = 'E' . IF sy-subrc = 0. MOVE-CORRESPONDING ls_MESSAGE TO es_return. ENDIF. ENDIF. CLEAR:lt_t012t_ins. RETURN. ENDIF. ENDIF. ENDENHANCEMENT. |
对原ZBAPI_HOUSE_BANK_REPLICATE函数复制为新函数 ,并进行修改。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
FUNCTION ZBAPI_HOUSE_BANK_REPLICATE. *"---------------------------------------------------------------------- *"*"本地接口: *" IMPORTING *" VALUE(IS_HOUSEBANK) TYPE BAPI_HOUSEBANK OPTIONAL *" VALUE(IS_HBANKPARAMETER) TYPE BAPI_HBANKPARAMETER OPTIONAL *" VALUE(IS_BANK) TYPE BAPI_BANK OPTIONAL *" EXPORTING *" VALUE(RETURN) TYPE BAPIRET2 *" TABLES *" IT_HOUSEBANKACCOUNT STRUCTURE BAPI_HOUSEBANKACCOUNT OPTIONAL *" IT_HBANKACCOUNTNAME STRUCTURE BAPI_HBANKACCOUNTNAME OPTIONAL *" ET_RETURN STRUCTURE BAPIRET2 OPTIONAL *“20220817 YS ** 原函数 BAPI_HOUSE_BANK_REPLICATE在ECC可以创建银行账号,但S4不能,在此修改后创建银行账号。 *1。在CL_FCLM_BAM_HOUSE_BANK_API~UPDATE_HOUSE_BANK_ACCOUNT,增加当为新行时创建功能。 *2在在cl_fclm_bam_fo_util=>generate_fo_objnr开头做增强,改cs_amd-status = if_fclm_bam_constants=>cc_account_status-active,使用新创建的银行账号自动激活。 ********************************************************************** *在类方法CL_FCLM_HOUSE_BANK_ACCOUNT_APICP~INSERT_HOUSE_BANK_ACCOUNT,第256行,标准代码如下 ** <fs_amd>-status = if_fclm_bam_constants=>cc_account_status-inactive. "Even brand new Bank Account shall be activated manually! * 在此设置为不激活,如需要创建成激活的可以考虑在此改为 -active ,02。 ********************************************************************** DATA: L_ZBAPI TYPE CHAR10 VALUE 'ZBAPI'. export L_ZBAPI = L_ZBAPI to memory id 'ZBAPI'. *"---------------------------------------------------------------------- DATA :ls_return TYPE bapiret2, lt_return TYPE bapiret2_t. DATA :ls_t012 TYPE t012, ls_t012d TYPE t012d, ls_t012k TYPE t012k, ls_t012t TYPE LINE OF fclm_t_hbankaccountname, ls_housebankaccount TYPE bapi_housebankaccount, ls_hbankaccountname TYPE bapi_hbankaccountname, lt_t012k TYPE TABLE OF t012k, lt_t012t TYPE TABLE OF t012t, lo_badi_ff_house_bank_extend TYPE REF TO ff_house_bank_extend, lt_t012t_cpy TYPE fclm_t_hbankaccountname. "NOTE:2613677 Replication Tool: Filter doesnot work on Change Mode Insert START DATA: LS_T012_EXIST TYPE T012. "NOTE:2613677 Insert END DATA: LS_T012D_EXIST TYPE T012D. * Security note 2734675 start DATA: lv_actvt TYPE activ_auth, lo_hbank TYPE REF TO cl_fclm_bam_house_bank_api. IF lo_hbank IS NOT BOUND. lo_hbank = NEW #( ). ENDIF. "20220817 MODIFY lv_actvt = '01'. " 03 Display lo_hbank->check_authority_for_hbank( EXPORTING iv_bukrs = is_housebank-bukrs iv_actvt = lv_actvt IMPORTING es_return = ls_return ). IF ls_return-type CA 'EAX'. return = ls_return. APPEND ls_return TO et_return. RETURN . ENDIF. * Security note 2734675 end * add fields processing logic IF lo_badi_ff_house_bank_extend IS NOT BOUND. TRY. GET BADI lo_badi_ff_house_bank_extend. CATCH cx_badi_not_implemented. ENDTRY. ENDIF. IF lo_badi_ff_house_bank_extend IS BOUND. CALL BADI lo_badi_ff_house_bank_extend->replicate_house_bank IMPORTING et_return = et_return[] CHANGING cs_housebank = is_housebank cs_hbankparameter = is_hbankparameter cs_bank = is_bank ct_hbankaccountname = it_hbankaccountname[] ct_housebankaccount = it_housebankaccount[]. ENDIF. * deal with house bank MOVE-CORRESPONDING is_housebank TO ls_t012 . MOVE-CORRESPONDING is_hbankparameter TO ls_t012d . *check current system * CALL FUNCTION 'FUNCTION_EXISTS' * EXPORTING * funcname = 'FCLM_BAM_AMD_MODIFY_MULTI_CD' * EXCEPTIONS * function_not_exist = 1 * OTHERS = 2. * * IF sy-subrc = 0 ."SFIN system * 总是执行创建银行账号 IF 1 = 2. "NOTE:2613677 Replication Tool: Filter doesnot work on Change Mode Insert START "compare house bank data does not change, the house bank account only change IF ls_t012 IS NOT INITIAL. SELECT SINGLE * INTO ls_t012_exist FROM t012 WHERE bukrs = ls_t012-bukrs AND hbkid = ls_t012-hbkid. CLEAR ls_t012_exist-mandt. IF ls_t012_exist EQ ls_t012 AND is_housebank-deletion_flag IS INITIAL. CLEAR ls_t012. ENDIF. ENDIF. "NOTE:2613677 Insert END IF ls_t012D IS NOT INITIAL. SELECT SINGLE * INTO ls_t012D_exist FROM t012D WHERE bukrs = ls_t012D-bukrs AND hbkid = ls_t012D-hbkid. CLEAR ls_t012D_exist-mandt. IF ls_t012D_exist EQ ls_t012D. CLEAR ls_t012D. ENDIF. ENDIF. IF ls_t012 IS NOT INITIAL or ls_t012D is NOT INITIAL. MOVE-CORRESPONDING is_housebank TO ls_t012 . MOVE-CORRESPONDING is_hbankparameter TO ls_t012d . "update house bank master data CALL FUNCTION 'HOUSE_BANK_REPLICATE' EXPORTING iv_deletion_flag = is_housebank-deletion_flag is_t012 = ls_t012 is_t012d = ls_t012d IMPORTING et_return = et_return[]. CHECK et_return[] IS INITIAL . CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' . ENDIF. ELSE."Non SFIN system "NOTE:2613677 Replication Tool: Filter doesnot work on Change Mode Insert START "compare house bank data does not change, the house bank account only change IF ls_t012 IS NOT INITIAL. SELECT SINGLE * INTO ls_t012_exist FROM t012 WHERE bukrs = ls_t012-bukrs AND hbkid = ls_t012-hbkid. CLEAR ls_t012_exist-mandt. IF ls_t012_exist EQ ls_t012 AND is_housebank-deletion_flag IS INITIAL. CLEAR ls_t012. ENDIF. ENDIF. "NOTE:2613677 Insert END IF ls_t012D IS NOT INITIAL. SELECT SINGLE * INTO ls_t012D_exist FROM t012D WHERE bukrs = ls_t012D-bukrs AND hbkid = ls_t012D-hbkid. CLEAR ls_t012D_exist-mandt. IF ls_t012D_exist EQ ls_t012D. CLEAR ls_t012D. ENDIF. ENDIF. IF ls_t012 IS NOT INITIAL or ls_t012D is NOT INITIAL. MOVE-CORRESPONDING is_housebank TO ls_t012 . MOVE-CORRESPONDING is_hbankparameter TO ls_t012d . "update house bank master data CALL FUNCTION 'HOUSE_BANK_REPLICATE' EXPORTING iv_deletion_flag = is_housebank-deletion_flag is_t012 = ls_t012 is_t012d = ls_t012d IMPORTING et_return = et_return[]. CHECK et_return[] IS INITIAL . "when one house bank deleted,delete all house bank account in house bank IF is_housebank-deletion_flag = 'X'. SELECT * INTO TABLE lt_t012k FROM t012k WHERE bukrs = is_housebank-bukrs AND hbkid = is_housebank-hbkid. LOOP AT lt_t012k INTO ls_t012k. CALL FUNCTION 'HOUSE_BANK_ACCOUNT_REPLICATE' EXPORTING iv_deletion_flag = 'X' is_t012k = ls_t012k IMPORTING et_return = et_return[]. ENDLOOP. ELSE. "update house bank account LOOP AT it_housebankaccount INTO ls_housebankaccount. MOVE-CORRESPONDING ls_housebankaccount TO ls_t012k. LOOP AT it_hbankaccountname INTO ls_hbankaccountname WHERE bukrs = ls_t012k-bukrs AND hbkid = ls_t012k-hbkid AND hktid = ls_t012k-hktid . MOVE-CORRESPONDING ls_hbankaccountname TO ls_t012t. APPEND ls_t012t TO lt_t012t_cpy. ENDLOOP. CALL FUNCTION 'HOUSE_BANK_ACCOUNT_REPLICATE' EXPORTING iv_deletion_flag = ls_housebankaccount-deletion_flag iv_check_hbank_flag = '' "doesn't chek if house bank exist is_t012k = ls_t012k it_hbankacctname = lt_t012t_cpy IMPORTING et_return = lt_return. APPEND LINES OF lt_return TO et_return[]. CLEAR : lt_t012t_cpy, lt_return. ENDLOOP. CHECK et_return[] IS INITIAL . CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' . ENDIF. ELSE. "NO house bank data filled ,Only update house bank account LOOP AT it_housebankaccount INTO ls_housebankaccount. MOVE-CORRESPONDING ls_housebankaccount TO ls_t012k. LOOP AT it_hbankaccountname INTO ls_hbankaccountname WHERE bukrs = ls_t012k-bukrs AND hbkid = ls_t012k-hbkid AND hktid = ls_t012k-hktid . MOVE-CORRESPONDING ls_hbankaccountname TO ls_t012t. APPEND ls_t012t TO lt_t012t_cpy. ENDLOOP. CALL FUNCTION 'HOUSE_BANK_ACCOUNT_REPLICATE' EXPORTING iv_deletion_flag = ls_housebankaccount-deletion_flag iv_check_hbank_flag = 'X' is_t012k = ls_t012k it_hbankacctname = lt_t012t_cpy IMPORTING et_return = lt_return. APPEND LINES OF lt_return TO et_return[]. CLEAR : lt_t012t_cpy, lt_return. ENDLOOP. CHECK et_return[] IS INITIAL . CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' . ENDIF. ENDIF. ENDFUNCTION. |