Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read Longtext with Parameters using BAPI_MESSAGE_GETDETAIL

Former Member
0 Likes
1,807

Hi ALL,

I am trying to read the Longtext of a Message using FM BAPI_MESSAGE_GETDETAIL with Parameters.

How do I have to write the Parameter in the Longtext so that the FM replaces it with the parameter message_v1 given to the FM?

I have tried &V1 and &V1& but the FM dumps!

Let me know!!

THANKS, Johannes

3 REPLIES 3
Read only

Former Member
0 Likes
1,336

Hi

Example:

DATA:

g_message_v1 LIKE bapiret2-message_v1 VALUE 'A',

g_message_v2 LIKE bapiret2-message_v2 VALUE 'B',

g_message_v3 LIKE bapiret2-message_v3 VALUE 'C',

g_message_v4 LIKE bapiret2-message_v4 VALUE 'D',

g_message LIKE bapiret2-message,

gt_text TYPE TABLE OF bapitgb.

CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'

EXPORTING

id = '00'

number = '398'

  • LANGUAGE = SY-LANGU

textformat = 'ASC'

  • LINKPATTERN =

message_v1 = g_message_v1

message_v2 = g_message_v2

message_v3 = g_message_v3

message_v4 = g_message_v4

IMPORTING

message = g_message

  • RETURN =

TABLES

text = gt_text.

Read only

0 Likes
1,336

I was talking about how to write the Parameter in the Longtext. I don't know what to write in the Longtext...

Is it &V1& or what not??

Like I said, I have tried &V1& and the FM dumps...

Thanks, Johannes

Read only

0 Likes
1,336

Hi

what is the dump saying?

In the long text of standard messages the variables are entered like here:

&V1& &V2& &V3& &V4&