SAP Function BAPI_MESSAGE_GETDETAIL - Read long text of error message

Parameter Reference Type Length Default Optional Text
ID BAPIRET2-ID C 20 Message class
LANGUAGE BAPITGA-LANGU C 1 SY-LANGU X Language of text to be displayed
LINKPATTERN BAPITGA-LINKMASK C 255 X Convert SAPscript Hyperlinks to HTML
MESSAGE_V1 BAPIRET2-MESSAGE_V1 C 50 X Message variable
MESSAGE_V2 BAPIRET2-MESSAGE_V2 C 50 X Message variable
MESSAGE_V3 BAPIRET2-MESSAGE_V3 C 50 X Message variable
MESSAGE_V4 BAPIRET2-MESSAGE_V4 C 50 X Message variable
NUMBER BAPIRET2-NUMBER N 3 Message number
TEXTFORMAT BAPITGA-TEXTFORMAT C 3 Format of text to be displayed

Parameter Reference Type Length Text
MESSAGE BAPIRET2-MESSAGE C 220 Message short text
RETURN BAPIRET2 u 548 Return Messages

Parameter Reference Length Optional Text
TEXT BAPITGB 255 X Message long text

Functionality
This method returns the short and long texts of BAPI error messages. Inthe parameters of this method you can specify the error message forwhich the short and long texts are to be displayed.

Notes
Messages are returned in the return parameter. The parameterdocumentation contains the return codes and their descriptions.

Description
Short text of message.

Description
Error messages for the method

Value range
If an error occurs the following messages are returned:
Type Code Message
E S<(>&<)>100 Message application area (ID)<(>&<)> does notexist
E S<(>&<)>101 Language <(>&<)> is not supported
E S<(>&<)>102 Message short text and long text do not exist
E S<(>&<)>103 Display format <(>&<)> for text is not supported
E S<(>&<)>104 Message long text does not exist
E S<(>&<)>105 Error has occurred when reading the long text
W S<(>&<)>114 Parameter LINKPATTERN can only be set for textformat HTM.

Description
The class of the message.
A message is identified by its class and number.

Example
Message class: S&
Message number: 100

Description
The language in which the error texts are displayed. If this parameterdoes not contain a value, the logon language is used.

Example
To display the error text in English, specify 'EN'.

Description
Specifies how SAPscript hyperlinks are converted. The conversion isonly possible into thetext format HTM,otherwise the returnparameter issues a warning and the hyperlinks are displayed asnormal text.
If the parameter is set to initial, hyperlinks are converted to normaltext.
For a description of the syntax for the conversion see thedocumentation on the data element.

Description
A message can comprise up to four variable texts containing textappropriate to the error scenario.
This parameter contains the first variable message text identified inthe parameters ID and NUMBER. When the text is displayed, the value ofthis parameter is automatically inserted into the relevant place in thetext.

Value range
This parameter is BLANK if the message does not contain a relevantvariable.

Description
A message can comprise up to four variable texts containing textappropriate to the error scenario.
This parameter contains the second variable message text identified inthe parameters ID and NUMBER. When the message text is displayed, thevalue of this parameter is automatically inserted in the relevant placein the text.

Value range
This parameter is BLANK, if the message does not contain a relevantvariable.

Description
A message can comprise up to four variable texts containing textappropriate to the error scenario.
This parameter contains the third variable message text identified inthe parameters ID and NUMBER. When the text is displayed, the value ofthis parameter is automatically inserted in the relevant place in thetext.

Value range
This parameter is BLANK, if the message does not contain a relevantvariable.

Description
A message can comprise up to four variable texts containing textappropriate to the error scenario.
Dhis parameter contains the fourth variable message text identified inthe parameters ID and NUMBER. When the message text is displayed, thevalue of the parameter is auotmatcially inserted in the relevant placein the text.

Value range
This parameter is BLANK, if the message does not contain a relevantvariable.

Description
The number of the message.
A message is identified by its message class and its message number.

Example
Message class: S&
Message number: 100

Description
Display format of error text.

Value range
Possible formats:
HTM (Hypertext Markup Language)
RTF (Rich Text Format)
SCR (SAPscript)
ASC (ASCII)
NON No long text should be output.

Description
Long text of message.
Each line in this parameter can be a maximum of 255 bytes.