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

Dynamic long text for error message

Former Member
0 Likes
2,524

Can we create error message long text dynamically. Suppose the error message is 'no valid entry for plant 1000'. I want to display all valid values in long text of message. These values can be read in program from Ztable based on plant value. Any help will be appreciated.

Thanks,

Srinivas.

5 REPLIES 5
Read only

andreas_mann3
Active Contributor
0 Likes
1,141

hi,

it's possible up to a defined string length with a message like 001 of msg-class 00 (look trx se91)

-> fill the variables (&1&2&3&4&5&6&7&8) with your values

e.g.:

loop at itab.

concatenate mfield ',' itab-val into mfield.

endloop.

message i001(00) with 'blabla..' mfield.

A.

Message was edited by: Andreas Mann

Read only

Former Member
0 Likes
1,141

Just a guess... Go to the message class assigned to your message... Select the message number and then select long text... The long text screen is similar to the script editor... Try writing some code here... The system variables sy-msg1..4 will be avaliable in this editor. You can set these variables to the plant data i.e. 1000, and then use them to retrieve the list of valid values from the Z-table.

-Kiran

Read only

Former Member
0 Likes
1,141

1) YOu can use the function module SAVE_TEXT or CREATE_TEXT to create long texts.

But as an alternative, you can give a F4 help for the valid values that can be selected for a particular plant.

You can use popupwithtabledisplay* function module to diplay a list of values ,from which the user can select one valid value.

regards,

ravi

Read only

Former Member
0 Likes
1,141

you can display it as POPUP, use function module POPUP_TO_INFORM.

Read only

Laxmana_Appana_
Active Contributor
0 Likes
1,141

Hi,

Use the FM :'POPUP_WITH_TABLE_DISPLAY'

Sample code :

&----


*& Form POPUP_WITH_TABLE_DISPLAY

&----


  • text

----


  • -->pi_table text

  • -->p_endcol text

  • -->p_endrow text

  • -->p_srtcol text

  • -->p_srtrow text

  • -->p_titletext text

  • <--P_WS_CHOISE text

  • <--P_WS_RTCODE text

----


form popup_table_display

tables pi_table structure st_popupstrct

using value(p_endcol)

value(p_endrow)

value(p_srtcol)

value(p_srtrow)

value(p_titletext)

changing p_choise

p_rtcode.

clear: p_choise ,

p_rtcode .

check not pi_table[] is initial.

call function 'POPUP_WITH_TABLE_DISPLAY'

exporting

endpos_col = p_endcol

endpos_row = p_endrow

startpos_col = p_srtcol

startpos_row = p_srtrow

titletext = p_titletext

importing

choise = p_choise

tables

valuetab = pi_table

exceptions

break_off = 1

others = 2.

  • Move sy-subrc as return code

p_rtcode = sy-subrc.

endform. " POPUP_WITH_TABLE_DISPLAY

perform popup_table_display tables x_data

using '100'

'10'

'01'

'01'

'Values'

changing x_choise

x_rtcode.

Regards

Appana