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: 

"AT LINE-SELECTION" event in a Query (SQ01 or SQ02)

Former Member
0 Kudos

Hi there

I want to know if it's possible to put "AT LINE-SELECTION" event in an ABAP Query? I'm trying that in SQ02 - the infoset - but nothing happens when I double-click on the output lines. I cannot find any place to type codes in SQ01.

The purpose is to call a transaction VA03 when people double-click on the output field "sales order number" and here is the code I put in "Free coding" section of SQ02.

AT LINE-SELECTION.

  DATA: w_cucol TYPE sy-cucol.

  w_cucol = sy-cucol + sy-staco.

  w_cucol = w_cucol - 2.

  IF w_cucol BETWEEN 103 AND 119.

    SET PARAMETER ID 'AUN' FIELD vbkd-vbeln.

    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

  ENDIF.

yu

1 ACCEPTED SOLUTION

Former Member

Hi ,

You can use Goto - Report assignment  option in SQ01.

Regards

9 REPLIES 9

Former Member

Hi ,

You can use Goto - Report assignment  option in SQ01.

Regards

0 Kudos

Thanks Boris but it's not what I need. I know this Report Assignment but it doesn't give me a chance to specify input parameters.

yu

0 Kudos

Hi ,

In your case you do not need a code for " SET PARAMETER ID 'AUN' "

if the line of your Query contains a field  " vbkd-vbeln ".

You only have to specify the desired line and press the icon.

The system automatically installs the parameter id.

Regards

0 Kudos

Hi Boris

Thank you for your time. I have now put VBKD-vbeln as a column output and assigned transaction code VA03 to the report. Then I try double clicking on a line. But still it's not coming up with the sales order number at calling up the transaction VA03. Do you know where could be wrong?

Yu

0 Kudos

Hi ,

You must create infoset based on join VBKD with VBAK.

Also you must put VBAK-VBELN as a column output.

This works.

Regards.

0 Kudos

Then I will lose my report assignment for Delivery Display (VL03N). I wish to have both of them and that's why I want to put some ABAP code at line-selection

0 Kudos

Hi ,

You must create infoset based on join VBKD with VBAK and LIPS.

Also you must put VBAK-VBELN and LIPS-VBELN as a column output.

There is no problem to use 2 report assignment ( there is no loss ).

There is no necessity to use " some ABAP code at line-selection ".

This works.

By the way is more correct from the beginning to formulate the issue including all the data about your problem and not include them by adding a little at a time.

Regards.

0 Kudos

Thanks a lot Boris. In the beginning I didn't expect the query double-click could work this way. Yes you are right, the table-join gives what I need. But why it didn't work with table join LIPS-VBKD-VBAK?

Sorry for my curiosity, what if I really need to do a double-click with "AT LINE-SELECTION" code? Is it doable?

yu

0 Kudos

Hi ,

I think it is impossible.

In function group AQRUNT there is method HANDLE_DOUBLE_CLICK for event "double-click".

In the call stack sequence you can see that in the end method REPREP_INTERFACE

is called.

Regards.