2010 Mar 09 8:08 PM
hi
i have created a screen with table control with number of columns and rows. i want the user to drilldown to transaction IQ03 when he double click on secific cell.
is it possible ? if yes can i get an example ?
thanks
2010 Mar 09 8:16 PM
Hi,
Try to use following code :
*---------------------------------------------------------------------*
* Form user_command
*---------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm "#EC CALLED
rs_selfield TYPE slis_selfield.
* user command for calling tcode IQ03 (Material Serial Number Display).
CASE r_ucomm.
WHEN '&IC1'.
* Read the record from the internal table on which is double clicked.
READ TABLE gt_output INTO gw_output INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'MAT' FIELD gw_output-matnr.
CALL TRANSACTION 'IQ03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. " USER_COMMAND
Hope this helps.
Regards,
Chandravadan
Edited by: Chandravadan Jaiswal on Mar 9, 2010 3:17 PM
hi
i have created a screen with table control with number of columns and rows. i want the user to drilldown to transaction IQ03 when he double click on secific cell.
is it possible ? if yes can i get an example ?
thanks
2010 Mar 09 8:16 PM
Hi,
Try to use following code :
*---------------------------------------------------------------------*
* Form user_command
*---------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm "#EC CALLED
rs_selfield TYPE slis_selfield.
* user command for calling tcode IQ03 (Material Serial Number Display).
CASE r_ucomm.
WHEN '&IC1'.
* Read the record from the internal table on which is double clicked.
READ TABLE gt_output INTO gw_output INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'MAT' FIELD gw_output-matnr.
CALL TRANSACTION 'IQ03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. " USER_COMMAND
Hope this helps.
Regards,
Chandravadan
Edited by: Chandravadan Jaiswal on Mar 9, 2010 3:17 PM
2010 Mar 10 3:55 AM
thanks, but i want to know what do i have to do in order to creat a DOUBLE CLICK evet - i doubled click on a cell and nothing happened, even when i did "/H" and doubled click on the table in order to see what happemed after - it didnt start the debugger.
What else do i ahve to do ?
thanks
2010 Mar 10 4:04 AM
Hi,
In Screen Painter double click a Cell and in the Attribute window select the DISPLAY tab and select the check box for
RESPOND TO DOUBLE CLICK
Then go to the PF-STATUS In Expand Function Keys and Give a name like DBL For F2.
now in PAI
LOOP AT ITAB.
MODULE DOUBLE_CLICK.
ENDLOOP.
in Program.
module DOUBLE_CLICK input.
case ok_code.
when 'DBL'.
GET CURSOR FIELD ITAB-CARRID LINE LINE_NO " Declare line_no in TOP include
" Transfer these values into a Temp Work Area since the Line_no will not be the same on your ITAB
You can call the Required Transaction from within this loop if possible
otherwise do the same CALL TRANSACTION outside the loop
by SET PARAMETER ID as mentioned above.
" This give you the line on which the User Clicked. now proceed further
endcase.
" In module next to the LOOP ENDLOOP statement you can process this Temp Work Area to
display the Drill down Screens
Hope this serves your purpose.Cheerz
Ram
endmodule
2010 Mar 11 3:52 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |