FI01创建银行主数据:
BAPI:BAPI_BANK_CREATE
*&---------------------------------------------------------------------* *& Report ZBAPI_BANK_CREATE *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZBAPI_BANK_CREATE. DATA:GV_BCY TYPE BANKS, GW_ADD TYPE BAPI1011_ADDRESS, GV_BCK TYPE BANKK, GW_RETURN TYPE BAPIRET2. GV_BCY = ‘CN‘. GV_BCK = ‘10000000037‘. GW_ADD-BANK_NAME = ‘TEST BANK1‘. GW_ADD-BANK_BRANCH = ‘TEST BANK2‘. GW_ADD-REGION = ‘190‘. * CALL FUNCTION ‘BAPI_BANK_CREATE‘ EXPORTING BANK_CTRY = GV_BCY BANK_KEY = GV_BCK BANK_ADDRESS = GW_ADD * BANK_METHOD = * BANK_FORMATTING = * BANK_ADDRESS1 = * I_XUPDATE = ‘X‘ IMPORTING RETURN = GW_RETURN * BANKCOUNTRY = BANKKEY = GV_BCK. IF GV_BCK IS NOT INITIAL. CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT‘ EXPORTING WAIT = ‘X‘. WRITE GV_BCK. ELSE. CALL FUNCTION ‘BAPI_TRANSACTION_ROLLBACK‘. ENDIF.