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

Display Message

Former Member
0 Likes
761

Dear all,

I'm entering values to a database table Module pool programming.

I have taken 5 fields.

Suppose if the user is directly entering value on 4th field , I want to display a message

"PLEASE FILL THE FIRST THREE VALUES".

How I can do this?

Regards

Harilal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

Hi,

Try this.

In the PAI of the screen which is having those input fields. for eg.screen 0100.

In the PAI of the screen 0100.

Use CHAIN and ENDCHAIN keyword and FIELD keyword as below.

CHAIN.

FIELD <field 1>.

FIELD <field 2>.

FIELD <field 3>.

FIELD <the 4th input field name> MODULE <the module name to handle your message> eg. MESSAGE_HANDLE.

ENDCHAIN.

In the module MESSAGE_HANDLE.

Enter the code like this.

IF <field 4> is not initial

AND

( IF <field 1> is initial.

OR <field 2> is initial

OR <field 3> is initial ).

MESSAGE : 'Please enter the First three fields' TYPE 'E'.

ENDIF.

Regards,

Smart

5 REPLIES 5
Read only

Former Member
0 Likes
738

Try Something like this :


If field_4th is not initial
 and field_3rd is initial
 and field  2nd is initila.
 and field_1st is initial.

Message 'Please enter the first three fields' type 'E'.

Endif.

Regards

Mishra

Read only

Former Member
0 Likes
739

Hi,

Try this.

In the PAI of the screen which is having those input fields. for eg.screen 0100.

In the PAI of the screen 0100.

Use CHAIN and ENDCHAIN keyword and FIELD keyword as below.

CHAIN.

FIELD <field 1>.

FIELD <field 2>.

FIELD <field 3>.

FIELD <the 4th input field name> MODULE <the module name to handle your message> eg. MESSAGE_HANDLE.

ENDCHAIN.

In the module MESSAGE_HANDLE.

Enter the code like this.

IF <field 4> is not initial

AND

( IF <field 1> is initial.

OR <field 2> is initial

OR <field 3> is initial ).

MESSAGE : 'Please enter the First three fields' TYPE 'E'.

ENDIF.

Regards,

Smart

Read only

former_member233090
Active Contributor
0 Likes
738

hi

{code]

INSIDE OF PAI MODULE WRITE THIS CODE.

DATA : CURSORFIELD(25), "DECLEAR IN TOP INCLUDE

PERFORM GET_CURSOR.

FORM GET_CURSOR .

If field4th is not initial and field3rd is initial and field 2nd is initial

and field1st is initial.

CLEAR : CURSORFIELD.

GET CURSOR FIELD CURSORFIELD.

MESSAGE 'Please enter all the first three fields TYPE 'S' DISPLAY LIKE 'E'.

ENDIF.

ENDFORM. " GET_CURSOR

****************************************************************

INSIDE OF PBO WRITE THIS CODE.

PERFORM SET_CURSOR.

FORM SET_CURSOR .

SET CURSOR FIELD CURSORFIELD.

ENDFORM. " SET_CURSOR

{code}

Read only

Former Member
0 Likes
738

Thanks all.

Now it's working

Read only

0 Likes
738

Hi,

If the answers were helpful for ur question to be solved ,

helpful answers should be rewarded with points.

Cheers

Bhavana