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

Regarding screen handling

Former Member
0 Likes
671

Dear all,

can anyone tell, what is the difference between

screen-required = 0 and

screen-required = 1.

Regards

venkat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
644

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

Dear all,

can anyone tell, what is the difference between

screen-required = 0 and

screen-required = 1.

Regards

venkat

4 REPLIES 4
Read only

dhorions
Contributor
0 Likes
644

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

Read only

Former Member
0 Likes
645

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

Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
644

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.

Read only

Former Member
0 Likes
644

Dear all,

thanks for ur solution.

Regards

Venkata prasad