‎2007 Dec 20 6:22 AM
Is it mandatory to set BAPIRETURN structure as return value for every BAPIs which we are creating?
The Function Module (remote) when i tried to wrap in the SWO1, it is not showing the output/table structure
where i may went wrong?
nikhil
‎2007 Dec 20 6:25 AM
a RETURN structure is defined as an interface parameter of a BAPI which is used to log all the errors, warnings and the successful processes tha are triggered in the course of execution of a BAPI.
A successful execution of a BAPI requires the data to be commited and this process of performing a COMMIT is achieved by calling the BAPI_TRANSACTION_COMMIT' explicitly if there are no errors logged in the RETURN structure.
Hence it is mandatory to pass BAPI Return structure.
Reward Points if useful.
‎2007 Dec 20 6:25 AM
a RETURN structure is defined as an interface parameter of a BAPI which is used to log all the errors, warnings and the successful processes tha are triggered in the course of execution of a BAPI.
A successful execution of a BAPI requires the data to be commited and this process of performing a COMMIT is achieved by calling the BAPI_TRANSACTION_COMMIT' explicitly if there are no errors logged in the RETURN structure.
Hence it is mandatory to pass BAPI Return structure.
Reward Points if useful.
‎2007 Dec 20 6:29 AM
Yes it is mandatory to pass BAPI Return structure.
Try again obviously it will show the output/table structure.
Better u can elaborate your need. and actual requirement.
Regards
Srimanta
‎2007 Dec 20 6:30 AM
there will be a chance of short dump.. may be in background processing..
‎2007 Dec 20 6:33 AM
Hi,
yes we should maintain return structure for the bapi...becoz we have to capture the messages that will arise after executing the bapi...for a noraml function module we fenerally use exceptions to handle the errors but for bapi we use return structure for the same.
Regards,
nagaraj
‎2007 Dec 20 6:35 AM
yes u should declare the BAPIRETURN structure,otherwise it gives error in SWO1.
u can update the values in BAPIRETURN structure using the system variables like
r eturn-id = sy-msgid.
return-type = sy-msgty.
return-number = sy-msgno.
return-message_v1 = sy-msgv1.
return-message_v2 = sy-msgv2.
return-message_v3 = sy-msgv3.
return-message_v4 = sy-msgv4.
Reward if helpful............
Regards,
Rajesh Akarte
‎2007 Dec 20 6:35 AM
Hi,
We need to release the function module after u create generally we do tht mistake then only it wont be visible in the swo1 tcode. So to release the function module u can go to se37 give ur fm name and in tht first page itself u will hav an option like release the fm so release it. Then u can view it in SWo1,..
Hope it will solve ur problem.
Regards,
Sana
reward if u found useful///
‎2007 Dec 20 7:03 AM