04-09-2008 9:18 PM
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.-
04-09-2008 9:33 PM
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
04-09-2008 9:35 PM
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
04-11-2008 7:02 PM