‎2008 Jun 13 11:05 AM
I have displayed the ALV basic list using controls. I have handled the events and added the pushbutton.
Now if i place the cursor on the PO and click the button that i placed, i have to perform another action with that PO.
How can i get the PO on which i placed the cursor ?
‎2008 Jun 13 11:09 AM
if u want to click on button and process that po u need to select the row
and use get_selected_rows method then u will get selected row, read the index of output table with that row and get the PO.
‎2008 Jun 13 11:09 AM
It's far more easier to define the PO number as hotspot. Clicking on the PO number will raise the appropriate event where you can check your number and do any action needed.
Regards,
John.
‎2008 Jun 13 11:09 AM
if u want to click on button and process that po u need to select the row
and use get_selected_rows method then u will get selected row, read the index of output table with that row and get the PO.
‎2008 Jun 13 11:13 AM
Hi,
Use this method:
*Get the index of rows selected by User
CALL METHOD gr_alvgrid->get_selected_rows
IMPORTING
et_index_rows =
et_row_no = lt_row.
From lt_row you will get index of rows selected by user.
Using that u can read the records from the internal table which u r passing to ALV.
LOOP AT lt_row INTO wa_row.
READ TABLE lt_disapp_doc_copy INDEX wa_row-row_id INTO wa_disapp_doc .
APPEND wa_disapp_doc TO lt_disapp_doc_bdc.
CLEAR : wa_disapp_doc,
wa_row.
ENDLOOP.
Reward if helpful.
‎2008 Jun 13 11:25 AM
‎2008 Jun 13 11:28 AM
‎2008 Jun 13 11:45 AM
HI manjunath ,
Sorry I thought you are using SLIS.
In class based ALV
You can use
cl_gui_alv_grid
here you define event for double clicking
as DOUNLE_CLICK
use e_row to get the value
for detail
refer to standard program 'BCALV_GRID_02'.
regards,
Ani
‎2008 Jun 13 11:21 AM
Hi manjunath,
For trigerring the event you can use whatever you want.
i.e. if you want to trigger double clicking
use function code '&IC1'.
FOR TAKING VALUE OF THE PO NUMBER,
USE
SET PARAMETER ID .
like
CASE SY-UCOMM.
SET PARAMETER ID 'BES'.
WHEN '&IC1'.
CALL TRANSACTION 'ME21N'.
ENDCASE.
use this on user-command.
Regards,
Aniruddh
Edited by: aniruddha surve on Jun 13, 2008 12:22 PM
‎2008 Jun 13 11:59 AM
Hi Manjunath CN
Use get cursor field and take the value. There by process your required code.
Venkat.