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

Populate input in selection screen

Former Member
0 Likes
942
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
  SELECT-OPTIONS s_name FOR adsmtp-smtp_addr NO INTERVALS.
  PARAMETERS p_uname AS CHECKBOX DEFAULT ' '.
  SELECTION-SCREEN END OF BLOCK b1.

START-OF-SELECTION.
  IF p_uname IS INITIAL.
    PERFORM update
   ENDIF.

IF p_uname IS INITIAL.
  CLEAR v_name.
  CONCATENATE  sy-uname  INTO v_name
  TRANSLATE v_name TO LOWER CASE.
  IF NOT p_uname IS INITIAL.
"what should i code here so that
* my s_name input gets the name of the user logged in 
when i check the check box.
  ENDIF.
 endif.

Edited by: JohnMell02 on Feb 3, 2010 3:53 PM

Edited by: Rob Burbank on Feb 3, 2010 10:24 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
911

AT SELECTION-SCREEN OUTPUT.

IF p_uname IS INITIAL.

PERFORM update

ENDIF.

Please put in this event, it will automatically work.

6 REPLIES 6
Read only

vinod_vemuru2
Active Contributor
0 Likes
911

Hi,

Check below sample code.


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
SELECT-OPTIONS s_name FOR sy-uname NO INTERVALS." OBLIGATORY.
PARAMETERS p_uname AS CHECKBOX DEFAULT ' ' USER-COMMAND ucomm.
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN.
  REFRESH s_name[].

  IF p_uname EQ 'X'.
    s_name-sign = 'I'.
    s_name-option = 'EQ'.
    s_name-low = sy-uname.
    APPEND s_name.
  ENDIF.

Thanks,

Vinod.

Read only

0 Likes
911

Vinod@ p_uname is not a internal table. Its a check box.

Read only

0 Likes
911

HI,

Yes. Is there any problem with above code? I am using p_uname as check box only:-)


IF p_uname EQ 'X'.  "Here it is check box.
    s_name-sign = 'I'.
    s_name-option = 'EQ'.
    s_name-low = sy-uname.
    APPEND s_name.                         "This is select option
  ENDIF.

Thanks,

Vinod.

Read only

Former Member
0 Likes
912

AT SELECTION-SCREEN OUTPUT.

IF p_uname IS INITIAL.

PERFORM update

ENDIF.

Please put in this event, it will automatically work.

Read only

0 Likes
911

No it won't.

Read only

0 Likes
911

AT SELECTION-SCREEN OUTPUT should work.