‎2010 Mar 10 4:15 AM
Hi all,
I have set respond to double click to 4 text elements in a screen. I have also give the PICK for F2 in GUI. Now I want to call 4 different screens on clicking those text elements. But how to call different screens. I have done
CASE sy-ucomm.
WHEN 'PICK'.
IF screen-name = 'T1'.
CALL SCREEN 1000.
ELSEIF screen-name = 'T2'.
CALL SCREEN 1001.
ENDIF.
ENDCASE.which is not working. Please help me.
Dev.
‎2010 Mar 10 4:50 AM
Hi
in TOP include declare
data : fnam type char40, fval type char40.
CASE sy-ucomm.
WHEN 'PICK'.
GET CURSOR FIELD FNAM VALUE FVAL.
IF fnam = 'T1'.
" You only get the Screen-Name when you say LOOP AT SCREEN
CALL SCREEN 1000.
ELSEIF fnam = 'T2'.
CALL SCREEN 1001.
ENDIF.
ENDCASE.Cheerz
Ram
‎2010 Mar 10 4:50 AM
Hi
in TOP include declare
data : fnam type char40, fval type char40.
CASE sy-ucomm.
WHEN 'PICK'.
GET CURSOR FIELD FNAM VALUE FVAL.
IF fnam = 'T1'.
" You only get the Screen-Name when you say LOOP AT SCREEN
CALL SCREEN 1000.
ELSEIF fnam = 'T2'.
CALL SCREEN 1001.
ENDIF.
ENDCASE.Cheerz
Ram
‎2010 Mar 10 4:54 AM
Hi,
Try this .Assign function code to F2 the way you have assigned.Now in PROCESS AFTER INPUT of your screen (On which you have text buttons ), write this code.
MODULE user_command_0100 INPUT.
Declare a field of length equal to the name of the text box.Here i have taken two text boxes namely 'TEXT1' and 'TEXT2'.I have declared a local field with length 5.
DATA : L_FIELD(5) TYPE C.
CASE sy-ucomm.
WHEN 'PICK'.
GET CURSOR FIELD l_field.
IF l_field = 'TEXT1'.
CALL SCREEN 1002.
ELSEIF l_field = 'TEXT2'..
CALL SCREEN 1003.
ENDIF.
ENDCASE.
ENDMODULE.
This is working.Hope this helps.
Thanks
Tejaswini Khante
‎2010 Mar 10 5:05 AM
hi,
use the GET CURSOR statement.
only then will you get the name of the screen element/field.
and code it in the PAI of the screen in user commmand.
hope it helps.
‎2010 Mar 10 5:27 AM
Hi,
Follow the below step.
1) Goto Element List in relevent screen then goto tab Display attr. and tick check box in column as Resp. to DblClk.
2) Goto GUI then enclolapes the Function keys and put function code in first position and assign the same in 'Recommended function key setting' for F2.
3) FLOW LOGIC
process after input.
module user_command_0100.
4)
module user_command_0100 input.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
case SAVE_OK.
when 'SELE'.
GET CURSOR FIELD FLD OFFSET OFF VALUE VAL LENGTH LEN.
if fld eq 'IT_PORELI-LIN'.
set pf-status 'POCON' immediately.
set titlebar 'PORECV' with sy-uname.
perform subscrnew.
CALL SCREEN 200 STARTING AT 25 10 ENDING AT 140 20.
endif.
endmodule. " user_command_0100 INPUT
Regards
Nehruu