2013 Oct 08 10:52 AM
hi abap experts.
I am working bapi development. why are we using fm:bapi_transaction_rollback,when error occured how can we see that error then how to update those errors.
thanks,
Balajip
Moderator message - Please search before posting.
Message was edited by: Suhas Saha
2013 Oct 08 11:04 AM
Hi Balaji,
1). BAPI method
2). Commit Method for committing the work
3). Roll Back Method for reverting the command.
By using BAPI or method your creating any no.(ex. delivery num.) and it is created successfully then you have to commit the work then only that data will update into data base if suppose any errors happens then system itself won't store the data if requires you can use the Rollback method by using sy-subrc or by return parameter (or return table )
And we can see the errors by using the Return table or return parameters .
Thanks & Regards,
Krishna
2013 Oct 08 11:20 AM
HI Kiran,
Thanks a lot for quick response.but can you please tell me how can we see the errors by using the Return table or return parameters.If you dont mind can you elaborate entire bapi.I am new to bapi development.hopt that you understand my posion.
2013 Oct 08 12:40 PM
Hi,
As per my knowledge , Bapiret2 will return the details like success as well as failure , etc..,
: S Success, E Error, W Warning, I Info, A Abort in TYPE.
based on that we can display the error messages by using type = 'E'.
basic:
loop bapiret2 into wa_ret2 where type = 'E'.
write : wa_ret2-MESSAGE_V1 , wa_ret2-MESSAGE_V2.......
endloop.
like this.
this is only for basic we can display by using FM (log display Fm also).
Thanks & Regards,
Krishna
2013 Oct 08 11:36 AM
Hi,
You can normally check whether the BAPI has failed from the Importing parameter and the Return Table. Inorder the get the error occurred during the process, LOOP the return table ( Eg: which has a structure BAPIRET2 ) based on the TYPE field i.e. which displays the error type ( Eg. W - Warning , E - Error ).
This return table contains all the details as follows:
TYPE
ID
NUMBER
MESSAGE
LOG_NO
LOG_MSG_NO
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER
ROW
FIELD
SYSTEM
Note: You can use the where-used List for BAPI_TRANSACTION_ROLLBACK in your system for your reference.
Regards,
Mayur Priyan
2013 Oct 08 11:49 AM
sorry mayure,
I am not getting what you are saying.I opend FM And see where used list but system throughs error
Message no. ED339
how to loop return table can you give one example.
my requirement is :I am uploading 500 records 450 records are uploaded .50 records were not updated how can we those error 50 records.how to upadated them.where they 50 records are stored
how to use these fields I means in loop statement.
what fields to choose in write statement:
Message was edited by: balaji pachipulusula
2013 Oct 08 12:35 PM
Hi,
Please try to position the cursor on the name of the Function module and then try selecting Where-used list.
2013 Oct 08 1:03 PM