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

selection-screen

Former Member
0 Likes
921

Hi,

I have 3 select-option fields(production scheduler,MRP Controller,plant) in selection-screen.If I enter values for production scheduler and MRP Controller,the plant field should become mandatory.Can anyone tell me the logic for this?

Regards,

Hema

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
894

Hi hema,

1. For this obligatory will not work.

2. we have to keep the field normal,

and check using abap code.

3. like this.

4.

start-of-selection.

if productionscheudler is not initial

and mrp is not initial.

if plant is initial.

message 'Plant is mandatory' type 'I'.

leave list-processing.

endif.

endif.

5. Note : message shouold be of type 'I' and not 'E'.

leave list-processing is important.

regards,

amit m.

11 REPLIES 11
Read only

Former Member
0 Likes
894

Hi Hema,

See this code.

selection-screen output.

if s_production is not initial and s_MRP_con is not initial.

Loop at screen.

screen-name cp 'plant'.

screen-required = 1.

modify screen.

endloop.

endif.

Plzz Reward if useful,

Mahi.

Read only

former_member402443
Contributor
0 Likes
894

Hi Hema,

You can check this on the at selection screen event.

At Selection-Screen.

if prod_sch is not initial and mrp_contro is not initial.

if plant is initial.

Message 'Plant should contain a value', 'E'.

endif.

endif.

Reward Points,if useful.

Regards

Manoj Kumar

Read only

Former Member
0 Likes
894

hi,

Provide MODIF-ID for each select option.

M1, M2, M3

in AT SELECTION-SCREEN OUTPUT event

LOOP AT SCREEN.

if SCREEN-GROUP1 = m2 or m3 and SEL_OPT1 is not initial.

SCREEN-REQUIRED = 'X'.

MODIFY SCREEN.

ENDLOOP.

Reward if useful

Regards

ANUPAM

Read only

Former Member
0 Likes
894

suppose the user press the continue button for processing after he enters the first two values and does not fill the mandatory plant field.

in the PAI module of the screen where you usually do the processing

eg

if ok_code = 'CONTINUE'

  • add the chk code here

  • and if the chk is true continue processing else do nothing

*it will automatically go to pbo module by performing nothing

****check statement

if not production_scheduler is initial.

if not MRP_Controller is initial.

if not plant_field is intial.

  • do the processing call the subroutines ,anything

else.

MESSAGE ID 'Values Missing ' TYPE 'W' NUMBER '001'

WITH 'plant_field cannot be left empty'.

*no more processing

endif.

endif.endif.

endif.

reward if useful

Edited by: Sumesh Nair on Dec 24, 2007 10:32 AM

Read only

Former Member
0 Likes
894

Hi,

Try as follows:

AT SELECTION-SCREEN ON p_werks.

IF NOT p_fevor IS INITIAL AND NOT p_dispo IS INITIAL.

IF p_werks IS INITIAL.

MESSAGE E()..with 'PLANT is mandatory ......'.

ENDIF.

ENDIF.

Read only

0 Likes
894

Hi Ramesh,

I have used this code in my program. when i enter values in fevor and dispo fields and leave the plant field blank and execute the program,it is not giving any error and it is displaying the o/p.If I enter values for either dispo or fevor fields,and leave the plant field blank,then it is showing error. My requirement is,when the user enters MARC-FEVOR or MARC-DISPO or both, the plant field is mandatory.

Read only

Former Member
0 Likes
894

Hi Hema,

Try this,

Select-options: field1(10) type c MODIF ID SC1,

field2(5) type c MODIF ID SC1,

field3(15) type p MODIF ID SC3.

if field1 is not initial.

if field2 is not initial

LOOP AT SCREEN.

if SCREEN-GROUP1 = 'SC3'.

SCREEN-REQUIRED = '1'.

MODIFY SCREEN.

ENDLOOP.

Endif.

endif.

<b>reward if useful </b>

Regards,

sunil kairam.

Read only

Former Member
0 Likes
894

hai hema,

ithink it is better to use OBLIGATORY addition to select option of plant field.

Read only

0 Likes
894

Hi Ramesh,

If I use obligatory for plant field,then if i enter some value for fevor or dispo fields or even if i don't enter values for these 2 fields,it is giving error message.My requirement is,If the user enters MARC-FEVOR or MARC-DISPO or both, the plant field should become mandatory.Can anyone suggest me some correct solution for this?

Regards,

Hema

Read only

Former Member
0 Likes
895

Hi hema,

1. For this obligatory will not work.

2. we have to keep the field normal,

and check using abap code.

3. like this.

4.

start-of-selection.

if productionscheudler is not initial

and mrp is not initial.

if plant is initial.

message 'Plant is mandatory' type 'I'.

leave list-processing.

endif.

endif.

5. Note : message shouold be of type 'I' and not 'E'.

leave list-processing is important.

regards,

amit m.

Read only

0 Likes
894

Hi Amit,

This solved my problem.Thank you very much.

Regards,

Hema