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

Question on Module Pool

Former Member
0 Likes
533

Hi,

Please have a look at the code below.

if deptno-low is initial and deptno-high is initial.

message i003(z_mp4).

leave to screen 100.

endif.

Explanation of the above code:-

I have added two text fields (deptno-low & deptno-high) in screen 100.

If both of these fields are initial, i will display a message "Please enter atleast one field value" in a dialog window in screen 100.

Question?

I want to display the same error message on a different screen (say 300) in a text field (of type output only).

How do i approach this??

Thanks & Regards,

Vijay

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
512

Hi,

You can do it as follows.

IN TOP INCLUDE.

DATA: msg type string.

Use this along with your message statement.

message i003(z_mp4) INTO msg.

Make sure msg is declared in some global place TOP include.

And then you can assign this msg to that output only field.

Regards,

Sesh

.

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
513

Hi,

You can do it as follows.

IN TOP INCLUDE.

DATA: msg type string.

Use this along with your message statement.

message i003(z_mp4) INTO msg.

Make sure msg is declared in some global place TOP include.

And then you can assign this msg to that output only field.

Regards,

Sesh

.

Read only

Former Member
0 Likes
512

hi,

in top include declare a vraible of type string as

DATA: msg1 type string.

and in pai module where u give message use that variable as .

message i003(z_mp4) INTO msg. -> where z_mp4 is a message class [SE91]

Make sure msg is declared in some global place TOP include.

And then you can assign this msg to that output only field.

or create a another screen in that in PBO module give message as

message w000(messageclassname) with 'NTER ATLEAST ONE VALUE'.

if useful reward some points.

with Regards,

suresh.

Read only

Former Member
0 Likes
512

Hi Vijayakrishna,

Create a text field in screen 300 and set it properties as "Output only" in the screen attributes.

Now, you can directly pass this message to that text field.

Reward points if it is useful.

Thanks.

Hari.

Read only

Former Member
0 Likes
512

save it in a global variable and display in that screen