2007 Aug 01 10:20 AM
Dear all,
can anyone tell, what is the difference between
screen-required = 0 and
screen-required = 1.
Regards
venkat
2007 Aug 02 10:49 AM
when you change the screen required value from 0 to 1 for a particular field, the field becomes mandatory(Value must be entered).
If your query is answered kindly close the thread and award points.
Cheers
Shafiq
2007 Aug 01 10:42 AM
A quick search at help.sap.com tells me this :
quote http://help.sap.com/saphelp_nw70/helpdata/en/d1/801c54454211d189710000e8322d00/frameset.htm
required
Input/output fields must be assigned an input value at runtime. The system checks this input at once when processing the PAI event.
Required fields are indicated by a question mark "?" as the first character. (Exception: If the field lies in a table control or step loop, the question mark is not displayed.)
The selected value can be modified at runtime with LOOP AT SCREEN, field SCREEN-REQUIRED:
0 neither a recommended nor a required field
1 required field
2 recommended field
2007 Aug 02 10:49 AM
when you change the screen required value from 0 to 1 for a particular field, the field becomes mandatory(Value must be entered).
If your query is answered kindly close the thread and award points.
Cheers
Shafiq
2007 Aug 02 3:04 PM
hi,
screen-required = 1. ==> mandatory.
screen-required = 0. ==> not mandatory.
copy the below coding in se38 and click the "push button 2" see what happend.
tables: vbak, SSCRFIELDS.
DATA FLAG(10).
**SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK D1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN PUSHBUTTON /10(8) text-001 USER-COMMAND 1.
SELECTION-SCREEN PUSHBUTTON /10(8) text-002 USER-COMMAND 2.
SELECTION-SCREEN PUSHBUTTON /10(8) text-003 USER-COMMAND 3.
SELECTION-SCREEN PUSHBUTTON /10(8) text-004 USER-COMMAND 4.
SELECTION-SCREEN END OF BLOCK D1.
*SELECTION-SCREEN end of SCREEN 001.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
select-options: S_VBELN FOR VBAK-VBELN.
SELECTION-SCREEN END OF BLOCK B2.
********************************************************************
*INITIALIZATION
********************************************************************
********************************************************************
*AT-SELECTION-SCREEN
********************************************************************
at selection-screen.
CASE SSCRFIELDS-ucomm." EQ 'ABCD'.
WHEN 1.
FLAG = '1'.
WHEN 2.
FLAG = '2'.
WHEN 3.
FLAG = '3'.
WHEN 4.
FLAG = '4'.
when others. exit.
*set screen 1000. leave screen.
ENDCASE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'S_VBELN-LOW'.
CASE FLAG.
WHEN '1'.
SCREEN-LENGTH = 2.
SCREEN-DISPLAY_3D = 0.
SCREEN-VALUE_HELP = 0.
SCREEN-REQUIRED = 0.
.
WHEN '2'.
SCREEN-LENGTH = 2.
SCREEN-REQUIRED = 1.
WHEN '3'.
SCREEN-LENGTH = 10.
SCREEN-VALUES_IN_COMBO = 1.
SCREEN-INVISIBLE = 0.
WHEN '4'.
SCREEN-LENGTH = 2.
SCREEN-COLOR = 6.
ENDCASE.
MODIFY SCREEN.
ENDIF. "COLOR
ENDLOOP.
2007 Aug 03 9:39 AM