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

Reg: Screen creation

Former Member
0 Likes
772

Hi,

This s a program for screen creation with login - name,password.I want the password text box should be disable in runtime and when i click yhe push button, it s not triggering.

Also the error message also not displaying..

So, can anyone give me the solution.

REPORT ZSCNCRN MESSAGE-ID z001.

selection-screen: begin of block b1 with frame title t1 no intervals.

parameter: Name(20) type c,

Password(10) type c,

SE11 as checkbox,

SE38 as checkbox.

  • SE51 radiobutton group g1,

  • SE38 radiobutton group g1.

selection-screen: end of block b1.

selection-screen: pushbutton 1(10) push1 user-command com1,

pushbutton 20(10) push2 user-command com2.

initialization.

t1 = 'LOGON'.

push1 = 'ENTER'.

push2 = 'EXIT'.

start-of-selection.

at selection-screen.

CASE SY-UCOMM.

when 'com1'.

if name = 'demo' and password = 'best123' and SE11 = 'x' and se38 = ' '.

call transaction 'SE51'.

elseif name = 'demo' and password = ' ' and SE38 = 'x' and SE11 = ' '.

call transaction 'SE38'.

else.

message a000.

endif.

leave to list-processing.

when 'com2'.

message i001.

leave program.

endcase.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

Hi,

You said you want the password should be disabled, but if that is the case then how will anyone enter any value in it?

And as for the pushbutton not working, in your statement where you check the value of sy-ucomm make sure that the fucntion code in single quotes shoud be caps on, so instead of 'com1' it should be 'COM1'. this will invoke the pushbutton.

If you want to disable the password field at runtime, write the code

loop at screen.

if screen-name = '<name of the password field>'.

screen-active = 0.

screen-invisible = 0.

modify screen.

endif.

endloop.

this code needs to be written in the event

at selection-screen output.

Regards,

Sachin

6 REPLIES 6
Read only

Former Member
0 Likes
734

Hi,

You said you want the password should be disabled, but if that is the case then how will anyone enter any value in it?

And as for the pushbutton not working, in your statement where you check the value of sy-ucomm make sure that the fucntion code in single quotes shoud be caps on, so instead of 'com1' it should be 'COM1'. this will invoke the pushbutton.

If you want to disable the password field at runtime, write the code

loop at screen.

if screen-name = '<name of the password field>'.

screen-active = 0.

screen-invisible = 0.

modify screen.

endif.

endloop.

this code needs to be written in the event

at selection-screen output.

Regards,

Sachin

Read only

0 Likes
733

Hi,

I had a correction n my question, password not disable.. it should be n asterix(**********), whereas the typed password shouldn't visible.

Read only

0 Likes
733

add the below code below initialization section

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'PASSWORD'.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

0 Likes
733

REPORT ZSCNCRN MESSAGE-ID z001.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE T1 NO INTERVALS.

PARAMETER: NAME(20) TYPE C LOWER CASE,

PASSWORD(10) TYPE C LOWER CASE,

SE11 AS CHECKBOX,

SE38 AS CHECKBOX.

SELECTION-SCREEN: END OF BLOCK B1.

SELECTION-SCREEN: PUSHBUTTON 1(10) PUSH1 USER-COMMAND COM1,

PUSHBUTTON 20(10) PUSH2 USER-COMMAND COM2.

INITIALIZATION.

T1 = 'LOGON'.

PUSH1 = 'ENTER'.

PUSH2 = 'EXIT'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'PASSWORD'.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

START-OF-SELECTION.

AT SELECTION-SCREEN.

CASE SY-UCOMM.

WHEN 'COM1'.

IF NAME = 'demo' AND PASSWORD = 'best123' AND SE11 = 'X' AND SE38 = ' '.

CALL TRANSACTION 'SE51'.

ELSEIF NAME = 'demo' AND PASSWORD = ' ' AND SE38 = 'X' AND SE11 = ' '.

CALL TRANSACTION 'SE38'.

ELSE.

MESSAGE A000.

ENDIF.

LEAVE TO LIST-PROCESSING.

WHEN 'COM2'.

MESSAGE I001.

LEAVE PROGRAM.

ENDCASE.

Read only

0 Likes
733

Hi Sachin & Sreekanth,

Thanks very much to both of u, u too solved my problem.

Read only

Former Member
0 Likes
733

REPORT ZSCNCRN MESSAGE-ID z001.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE T1 NO INTERVALS.

PARAMETER: NAME(20) TYPE C LOWER CASE,

PASSWORD(10) TYPE C LOWER CASE,

SE11 AS CHECKBOX,

SE38 AS CHECKBOX.

SELECTION-SCREEN: END OF BLOCK B1.

SELECTION-SCREEN: PUSHBUTTON 1(10) PUSH1 USER-COMMAND COM1,

PUSHBUTTON 20(10) PUSH2 USER-COMMAND COM2.

INITIALIZATION.

T1 = 'LOGON'.

PUSH1 = 'ENTER'.

PUSH2 = 'EXIT'.

START-OF-SELECTION.

AT SELECTION-SCREEN.

CASE SY-UCOMM.

WHEN 'COM1'.

IF NAME = 'demo' AND PASSWORD = 'best123' AND SE11 = 'X' AND SE38 = ' '.

CALL TRANSACTION 'SE51'.

ELSEIF NAME = 'demo' AND PASSWORD = ' ' AND SE38 = 'X' AND SE11 = ' '.

CALL TRANSACTION 'SE38'.

ELSE.

MESSAGE A000.

ENDIF.

LEAVE TO LIST-PROCESSING.

WHEN 'COM2'.

MESSAGE I001.

LEAVE PROGRAM.

ENDCASE.

Edited by: sreekanth reddy on Nov 6, 2008 3:29 PM