Posted: Sat Apr 26, 2008 3:40 pm Post subject: BAPI_MESSAGE_GETDETAIL
BAPI_MESSAGE_GETDETAIL - Read long text of error message
This report uses the service BAPI BapiService.MessageGetDetail(), to display the short text and the long text of error messages.
Code:
* ------------------------------------------------------------------------
* read a message short and long text using the BAPI
* BAPI_MESSAGE_GETDETAIL of the object BapiService.
* ------------------------------------------------------------------------
* Data declaration
DATA: my_id LIKE bapiret2-id,
my_number LIKE bapiret2-number,
my_textformat LIKE bapitga-textformat,
my_message_v1 LIKE bapiret2-message_v1,
my_message LIKE bapiret2-message,
my_return TYPE bapiret2.
DATA BEGIN OF my_text OCCURS 1.
INCLUDE STRUCTURE bapitgb.
DATA END OF my_text.
* enter values in object
move 'FI' to my_id. "message id of message to read
MOVE '024' TO my_number. "message number of message to read
MOVE 'ASC' TO my_textformat. "text format, here ASCII
MOVE '0001' TO my_message_v1. "text to fill into message
*BAPI call
CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
EXPORTING
id = my_id
number = my_number
language = sy-langu
textformat = my_textformat
message_v1 = my_message_v1
* message_v2 =
* message_v3 =
* message_v4 =
importing
message = my_message
return = my_return
TABLES
text = my_text
.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.