函数使用十一:BAPI_BANK_CREATE详解编程语言

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.

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/18690.html

(0)
上一篇 2021年7月19日
下一篇 2021年7月19日

相关推荐

发表回复

登录后才能评论