Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

is it corect way to write a bapi

Former Member
0 Kudos


*data: begin of itab occurs 0,
*country like BAPI1011_KEY-BANK_CTRY,
*address like BAPI1011_ADDRESS,
*end of itab.
*
*start-of-selection.
*
*  CALL FUNCTION 'WS_UPLOAD'                                 "#EC *
*    EXPORTING
*      FILENAME                = 'C:/FILE.TXT'
*      FILETYPE                = 'DAT'
*    TABLES
*      DATA_TAB                =  itab
*    EXCEPTIONS
*      CONVERSION_ERROR        = 1
*      FILE_OPEN_ERROR         = 2
*      FILE_READ_ERROR         = 3
*      INVALID_TYPE            = 4
*      NO_BATCH                = 5
*      UNKNOWN_ERROR           = 6
*      INVALID_TABLE_WIDTH     = 7
*      GUI_REFUSE_FILETRANSFER = 8
*      CUSTOMER_ERROR          = 9
*      NO_AUTHORITY            = 10
*      OTHERS                  = 11.
*  IF  SY-SUBRC <> 0  .
**    MESSAGE E000.
*  ENDIF.
*
*loop at itab.
*CALL FUNCTION 'BAPI_BANK_CREATE'
*  EXPORTING
*    bank_ctry             = itab-country
**   BANK_KEY              =
*    bank_address          = itab-address
**   BANK_METHOD           =
**   BANK_FORMATTING       =
**   BANK_ADDRESS1         =
** IMPORTING
**   RETURN                =
**   BANKCOUNTRY           =
**   BANKKEY               =
*          .
* endloop.
*
*          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
**           EXPORTING
**             WAIT          =
**           IMPORTING
**             RETURN        =
*                    .
*  if sy-subrc = 0.
*  write:/ ' succesfully updated'.
*  endif.

10 REPLIES 10

Clemenss
Active Contributor
0 Kudos

Hi,

to me it looks good. Did you try?

If it does not work, please compare the [documentation of the function module|http://abap.wikiprog.com/wiki/BAPI_BANK_CREATE]

Regards,

Clemens

Former Member
0 Kudos

Hello,

Do not use WS_UPLOAD. Use gui_upload. WS_upload is outdated and obsolate.

Thanks and rgds,

Anand

Former Member
0 Kudos

above code works fine .but which tables i have to see so that i kow banks are created

Former Member
0 Kudos

Hi,

Code seems to be ok.

Thanks,

Sriram POnna.

0 Kudos

yes its ok but i have uploaded some data which tables i have to see that data is present or not

0 Kudos

table bnka

0 Kudos

Hi,

Please refer table BNKA.

Thanks,

Sriram Ponna.

0 Kudos

hi,

this BAPI wud help u create banks. Check the table BNKA to check the updated data.

Thanks

Nayan

0 Kudos

when i try to view the contents of able bnka its saying changes to sap objects not allowed .

i am unable to view the contents

0 Kudos

are u trying to edit the table?

go to se16-->bnka