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

Screen-required

Former Member
0 Likes
3,297

Hi Gurus,

In the selection screen 2 fields are there ( burks and vkorg).If burks and vkorg is initial ,i have to change the vkorg field to be a mandatory field and mandatory mark should also appear in the field.

Hoe to use screen-required = '1' and where to use this code in the program.I am using this as

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF s_bukrs[] IS INITIAL and s_vkorg[] IS INITIAL.

IF screen-name = 'S_VKORG-LOW'.

screen-active = '1'.

screen-input = '1'.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Bt it is not working .Plz help me .

Regards,

Ashok...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,039

hi,

once u check,are u declared the fields vkorg and bukrs are using select-options or not.

select-options: s_vkorg for <refarence field>,

s_bukrs for <refarence field>.

<b>follow this code for making as mandatory fields dynamically..</b>

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF s_bukrs IS INITIAL and s_vkorg IS INITIAL.

IF screen-name = 's_vkorg-low'.

screen-active = '1'.

screen-input = '1'.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

<b>or</b>

<b>follow this statement to make fields as mandatory</b>

<b>select-options: s_vkorg for <refarence field> obligatory.</b>

regards,

Ashokreddy.

6 REPLIES 6
Read only

Former Member
0 Likes
2,039

WHY DONT YOU MADE THE VKORG AS OBLIGATORY?

SELECT-OPTIONS : S_VKORG FOR VBAK-VKORG OBLIGATORY.

REGARDS

SHIBA DUTTA

Read only

0 Likes
2,039

No i want to have that field to be obligatory only in run time and also when bukrs and vkorg are empty .I dn't want that <b>vkorg</b> field to be empty when <b>bukrs</b> is not initial.

Read only

0 Likes
2,039

hi,

use SELECT-OPTIONS : S_VKORG FOR VBAK-VKORG OBLIGATORY.

regards,

Santosh.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
2,039

Hi,

since it is a select-option best thing is to assign a MODIF ID to that

SELECT-OPTIONS s_bukrs for xxx modif id 'ABC'.

SELECT-OPTIONS s_vkorg for xxx modif id 'ABC'.

and then use

SCREEN-GROUP1 in the IF instead of SCREEN-NAME.

LOOP AT SCREEN.

IF s_bukrs[] IS INITIAL and s_vkorg[] IS INITIAL.

IF screen-group1 = 'ABC'.

screen-active = '1'.

screen-input = '1'.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Regards,

Sesh

\

Read only

Former Member
0 Likes
2,039

OK THEN DO ONE THING

DATA : FLAG.

AT SELECTION-SCREEN OUTPUT.

IF s_bukrs[] IS INITIAL and s_vkorg[] IS INITIAL AND FLAG = 'X'.

LOOP AT SCREEN.

IF screen-name = 'S_VKORG-LOW'.

screen-active = '1'.

screen-input = '1'.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

CLEAR FLAG.

ENDIF.

AT SELECTION-SCREEN.

IF NOT s_bukrs[] IS INITIAL .

IF s_vkorg[] IS INITIAL.

FLAG = 'X'.

ENDIF.

ENDIF.

BUT HERE YOU HAVE TO PRESS ENTER OR USER INTERACTION TO CHECK THE EFFECT

REGARDS

SHIBA DUTTA

Message was edited by:

SHIBA DUTTA

Read only

Former Member
0 Likes
2,040

hi,

once u check,are u declared the fields vkorg and bukrs are using select-options or not.

select-options: s_vkorg for <refarence field>,

s_bukrs for <refarence field>.

<b>follow this code for making as mandatory fields dynamically..</b>

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF s_bukrs IS INITIAL and s_vkorg IS INITIAL.

IF screen-name = 's_vkorg-low'.

screen-active = '1'.

screen-input = '1'.

screen-required = '1'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

<b>or</b>

<b>follow this statement to make fields as mandatory</b>

<b>select-options: s_vkorg for <refarence field> obligatory.</b>

regards,

Ashokreddy.