cancel
Showing results for 
Search instead for 
Did you mean: 

Structure type placeholder in SE91 (message class)

mks2k
Explorer
0 Kudos

CLOSED

Sandra_Rossi
Active Contributor
0 Kudos

It's not a character-like structure so concatenate ONLY the character-like components of the structure.

ABAP doc of MESSAGE - placeholders:

  • "They can have the same data type as a source field of the statement WRITE TO and they are formatted in accordance with the associated predefined formats with an output length of 50."
Sandra_Rossi
Active Contributor
0 Kudos

character-like means C, N, D, T, String and structures containing only character-like data types

ABAP Keyword Documentation (sap.com)

Accepted Solutions (0)

Answers (1)

Answers (1)

turkaj
Active Participant
0 Kudos

Hi Mintu,

store your iv_key between into another variable for example string.

DATA lv_key type string.

....
lv_key = iv_key.

MESSAGE e030(/xy0/3fd_messages)WITH iv_tabname lv_key
INTO /xy0/cl_3ft_registry=>gv_message.

and run it again. So you have typed the variable and the error doesn't come again. Or you can use the command conv string( iv_key ).

MESSAGE e030(/xy0/3fd_messages)WITH iv_tabname conv string( iv_key ).<br>

Of course you can also convert it to another datatype.

Regards
Jim

turkaj
Active Participant

Hi Mintu,

character types are allowed in the messages. So something like char or string. But there are also other character types. You can try it out best in a small test program.

You can convert date fields and display them in the message in the correct format:

lv_str_date = |{ lv_your_date DATE = USER }|.

Regards
Jim

turkaj
Active Participant
0 Kudos

Hi Mintu,

As I can see from the screenshot, a structure is being specified. This means that the information comes from multiple fields.

  • The question is, what exactly do you want to show the user?
  • What information do you want to display/feed back to the user?

To display your information correctly to the user, you need to combine your information into a variable (e.g. of type string) and output it to the user. Note that message field length is limited, so you can't display everything in one message.

If your structure is unstructured, you should structure it first to get the right information from the structure and then concatenate your message.

Regards
Jim

Sandra_Rossi
Active Contributor
0 Kudos

mks2k "as we know iv_key is type of "ANY""

"ANY" is the data type in the code (which is known as a Generic Data Type), not the ACTUAL data type, AT RUN TIME (known in ABAP as a Complete Data Type).

The ABAP debugger indicates the ACTUAL data type (so please tell us, currently you still didn't provide the information).