Skip to Content
0
Former Member
Feb 23, 2009 at 12:13 PM

bapi_ret2

181 Views

HI All,

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = lv_ekpo_ebeln

TABLES

return = lt_returns

poitem = lt_items

poitemx = lt_itemxs.

In the above Function module lt_returns is internal table in this iam getting 3 error messages and coming to below function module CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

here iam getting only 1 error message .

here is the code which they have mentioned.

CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'

CLEAR ls_ekpo_item_to_process.

LOOP AT lt_ekpo_items_to_process INTO ls_ekpo_item_to_process.

ls_ekpo_item_to_process-txz01 = c_failed_message_2.

APPEND ls_ekpo_item_to_process TO lt_processed_ekpo_items.

CLEAR ls_ekpo_item_to_process.

ENDLOOP.

ENDIF.

and i have wriiten the code as in CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'

CLEAR ls_ekpo_item_to_process.

Data : w_msg type string.

Data : bapiret2 type BAPIRET2 occurs 0 with header line.

LOOP AT lt_ekpo_items_to_process INTO ls_ekpo_item_to_process.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = bapiret2-ID

  • LANG = '-D'

NO = bapiret2-number

V1 = bapiret2-MESSAGE_V1

V2 = bapiret2-MESSAGE_V2

V3 = bapiret2-MESSAGE_V3

V4 = bapiret2-MESSAGE_V4

IMPORTING

MSG = w_msg.

  • EXCEPTIONS

  • NOT_FOUND = 1

  • OTHERS = 2

write : w_msg.

here it is going to dump can any one correct the syntax that where i have done the fault.