SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_MESSAGE_GETDETAIL



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Apr 26, 2008 3:40 pm    Post subject: BAPI_MESSAGE_GETDETAIL Reply with quote

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
.

* print results
write : / 'Input' color 5.
WRITE : / 'my_id...........:', my_id.
WRITE : / 'my_number.......:', my_number.
WRITE : / 'my_textformat...:', my_textformat.
WRITE : / 'my_message_v1...:', my_message_v1.
WRITE : / 'Output' COLOR 5.
WRITE : / 'my_message........:', my_message.
WRITE : / 'my_return.........:', my_return.
WRITE : / 'Text output' COLOR 5.
LOOP AT my_text.
  WRITE : / my_text.
ENDLOOP.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.