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: 

BAPI_Create_Bank, problems with returning message

Former Member
0 Kudos

HI getleman's!! I`m new in SAP (ABAP).

I`m using BAPI_Create_Bank and I realize that, when the data is commited rightly the message doesn't return anything.

althought when I'm trying to insert some replicate data the message of the Bapi return me and "E" Error.

I'm not sure if the message only return when it happened an error.

the options of the data element BAPIRET2 (message) shows:

Field: type

Description:

- Message type: S Success, E Error, W Warning, I Info, A Abort.

The 'S' has never been returned.

Thanks for your help.

regards.

Polak.-

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

Welcome to SDN.

That's normall. SAP dohave its own share of clinches. Just check for return messages or SY-SUBRC and if it is 0 assume the object uploaded successfully.

Regards,

Amit

Former Member
0 Kudos

Hi Hernan Szmajser ,

The return table parameter data population is based on the code inside the BAPI. for this BAPI the Return parameter is getting populated only for the error situation . If you look into the function module / BAPI they are calling a form routine "bank_distribute" in include L1011F01

Inside this include they are populating the return table only if the SY-SUBRC NE 0.

Check this piece of code inside the form routine:

    • Distribution of Bank*

CALL FUNCTION 'ALE_BANK_SAVEREPLICA'

EXPORTING

bankctry = bankcountry

bankkey = bankkey

bankaddress = bank_address

bankdetail = bank_detail

    • SERIAL_ID = '0'*

TABLES

receivers = receivers

    • COMMUNICATION_DOCUMENTS =*

    • APPLICATION_OBJECTS =*

EXCEPTIONS

error_creating_idocs = 1

OTHERS = 2.

IF sy-subrc <> 0.

PERFORM set_return_message USING sy-msgty sy-msgid sy-msgno

sy-msgv1 sy-msgv2

sy-msgv3 sy-msgv4

CHANGING return.

ENDIF.

Hope it helps.

Thanks,

Greetson

Former Member
0 Kudos

thanks!! i'll try it...

regards,

Polak.-