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

select query needed

Former Member
0 Likes
686

Hello Experts

i am working on inventory management.

Scenario1:For a plant group there exists one key plant and the rest should be non-key plants.

Query 1: How could i prevent the user from entering 2 key plants for a plant group?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
659

use the 'at selection-screen on screen_field' event, where u can right the code to ceck inputs given to a particular field in the selection criteria.

Example: If for example ur field name is 'Field1'.

The statement for that event to start is

At selection-screen on Field1.

In that event u have to raise an error message, which will help the user to identify the field where he has given the wrong input.

refer this program 'demo_*_selection_screen_events'.

In the particular event u have to raise the error message when the user give two key values.

<b>Award if useful</b>

Sudheer

5 REPLIES 5
Read only

Former Member
0 Likes
660

use the 'at selection-screen on screen_field' event, where u can right the code to ceck inputs given to a particular field in the selection criteria.

Example: If for example ur field name is 'Field1'.

The statement for that event to start is

At selection-screen on Field1.

In that event u have to raise an error message, which will help the user to identify the field where he has given the wrong input.

refer this program 'demo_*_selection_screen_events'.

In the particular event u have to raise the error message when the user give two key values.

<b>Award if useful</b>

Sudheer

Read only

Former Member
0 Likes
659

Hi

declare as follows:

tables: t001w

parameters: p_werks like t001w-werks .

At selection-screen.

clear t001w-werks.

select single werks from t001w into t001w-werks werks = p_werks.

if t001w-werks <> 'Key Plant'.

message 'enter correct key plant'.

endif.

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
659

Hi Murli,

Use <b>At selection-screen</b> event to restrict ur user to enter

2 key plants.

Read help on At selection screen event.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
659

Hi Murali,

U can go either for 'At selection-screen' of 'At selection-screen on field'. Both will work, but If u go for the second one when the error message is raised what will happens is: 1) As i said in the previous reply Only the field u have mentioned in the event will be in Input mode and all the others will be display mode., otherwise all the fields will be in Display mode and ready for accepting an input.

<b>Award if useful</b>

Regards,

Sudheer

Read only

0 Likes
659

Hi,

U need to <b>award points for useful answers</b> and u have to mention it as solved if ur question is solved. Dont forget.

Regards,

Sudheer