09-09-2014 6:45 AM
Hi Experts,
i have created on alv using oops
now my requirement is that when i will click on
vbeln no. so it should call transaction VA03 and should show
relevent details on which vbeln no. i have clicked in my report.
i created on local method for this
CLASS event_class DEFINITION.
*Handling double click
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .
ENDCLASS. "lcl_event_receiver DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS event_class IMPLEMENTATION.
METHOD handle_double_click.
set parameter id 'vbln' fileld wa-vbeln.
Call transaction "va03' and skip first screen.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
please help me to achieve the right answer
Thanks
Vikash
09-09-2014 7:07 AM
Regards,
Raymond
09-09-2014 6:54 AM
09-09-2014 6:58 AM
Hi,
You double click handler method has an importing parameter E_ROW. This is a structure having the index of the row clicked.
Now using the index you got in the importing parameter read the ALV data table ( internal table ). Now you will have the row which the user double clicked. I suppose the work area you will use to read the table will be same as used above i.e WA.
Insert this logic before the statement SET PARAMETER ID.
Regards,
Ashish
09-09-2014 7:07 AM
Regards,
Raymond
09-09-2014 7:10 AM
Hi Vikas,
Once you click on VBELN no in your ALV Output , capture the sales order number ,
then use SET PARAMETER ID AUN Field VBELN_NO.
then write
CALL TRANSACTION VA03 AND SKIP FIRST SCREEN.
Hope this solves your query.
Regards ,
Ranjit
09-10-2014 6:57 AM
thanks ranjith,
but how to capture VBELN no in your ALV Output. please let me know?
09-10-2014 7:16 AM
Hi Vikash,
FORM f_handle_double_click USING e_row TYPE lvc_s_row.
*Data Declarations
DATA: ls_inv_hdr TYPE zmms_inv_log_hdr.
* read selected row from ALV Internal table
READ TABLE gt_inv_hdr INTO ls_inv_hdr INDEX e_row-index.
ENDFORM. " F_HANDLE_DOUBLE_CLICK
In the above example ls_inv_hdr contains the data of row you have clicked on .
Please check if this helps.
Thanks
Sri
09-10-2014 8:55 AM
METHOD handle_double_click.
set parameter id 'vbln' fileld wa-vbeln.
Call transaction "va03' and skip first screen.
ENDMETHOD. "handle_double_click
ENDCLASS.
Before you SET parameter you need to read which SO has been double click. Now your EVENT DOUBLE_CLICK has importing parameter erow which is a structure with 2 fields.
ROWTYPE &
INDEX.
Use the index to read your internal table and get the SO number then Set AUN parameter id (VA03- SO number) and call trx.
09-12-2014 5:15 AM
Hi,
Inside Method Handle_double_click
use tihs
Read 'internal table' INDEX e_row-index into 'WA'.
then follow the code motioned earlier.
Regards
Ranjit