‎2007 Jun 11 11:50 AM
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...
‎2007 Jun 11 12:08 PM
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.
‎2007 Jun 11 11:53 AM
WHY DONT YOU MADE THE VKORG AS OBLIGATORY?
SELECT-OPTIONS : S_VKORG FOR VBAK-VKORG OBLIGATORY.
REGARDS
SHIBA DUTTA
‎2007 Jun 11 11:56 AM
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.
‎2007 Jun 11 11:55 AM
hi,
use SELECT-OPTIONS : S_VKORG FOR VBAK-VKORG OBLIGATORY.
regards,
Santosh.
‎2007 Jun 11 11:55 AM
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
\
‎2007 Jun 11 12:02 PM
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
‎2007 Jun 11 12:08 PM
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.