Application Development 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: 

how to redirect to transaction and display relevent sales order detail

vikash_pathak
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos
  • In handler method, you forgot to read the current record
    (READ TABLE itab INDEX e_row-index)
  • You used a wrong parameter Id for VA03
    ('AUN' or use wrapper like FM RV_CALL_DISPLAY_TRANSACTION)

Regards,

Raymond

8 REPLIES 8

former_member249399
Active Participant
0 Kudos

Please refer program BCALV_TEST_FULLSCREEN_EDIT.

former_member289261
Active Contributor
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos
  • In handler method, you forgot to read the current record
    (READ TABLE itab INDEX e_row-index)
  • You used a wrong parameter Id for VA03
    ('AUN' or use wrapper like FM RV_CALL_DISPLAY_TRANSACTION)

Regards,

Raymond

Former Member
0 Kudos

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


0 Kudos

thanks ranjith,

but how to capture VBELN no in your ALV Output. please let me know?

0 Kudos

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

0 Kudos

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.

0 Kudos

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