Application Development and Automation 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: 
Read only

AT LINE SELECTION.

Mula
Associate
Associate
0 Likes
2,196

Dear Friends,

<u>Could you please help me with the following problem.</u>

I am getting a Report(list) which are some programs in the system. I should go to that program if I double click on that line or on the program name.

Thank you very much,

Best Regards,

Subramanyeshwer

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,148

Check this sample code.



report zrich_0001.

tables: trdir.

data: itrdir type table of trdir with header line.

select-options: s_name for trdir-name.

start-of-selection.

  select * into table itrdir
            from trdir
               where name in s_name.

  loop at itrdir.
<b>    format hotspot on.
    write:/ itrdir-name.
    hide itrdir-name.
    format hotspot off.</b>
  endloop.


<b>at line-selection.

  editor-call for report itrdir-name display-mode.</b>

Regards,

Rich Heilman

Check this sample code.



report zrich_0001.

tables: trdir.

data: itrdir type table of trdir with header line.

select-options: s_name for trdir-name.

start-of-selection.

  select * into table itrdir
            from trdir
               where name in s_name.

  loop at itrdir.
<b>    format hotspot on.
    write:/ itrdir-name.
    hide itrdir-name.
    format hotspot off.</b>
  endloop.


<b>at line-selection.

  editor-call for report itrdir-name display-mode.</b>

Regards,

Rich Heilman

15 REPLIES 15
Read only

Former Member
0 Likes
2,147

at line selection.

you can read the contents of the selected line from sy-lisel.

and using the program name from there call transaction SE38 if you wish to view the code

or SA38 to execute it with the particular pgm

or surely u can submit the same and return.

Message was edited by: Anurag Bankley

Read only

Former Member
0 Likes
2,147

Hi,

You can use

SET HOTSPOT ON.

Write :/'Report1'.

Write :/'Report2'.

SET HOTSPOT OFF.

Then use SET PARAMETER AND GET PARAMETER to get the report name which user has clicked.

Use SUBMIT <reportname> via selection-screen.

Please let us know whether fair idea is enough or you want a code.

Best regards,

Prashant

Read only

Former Member
0 Likes
2,147

YOu should go to the program? or you should run that program?

if you want to go to that program,

then:

read current line.

progname = sy-lisel+0(15) (Give the exact offset)

set parameter id 'RID' field progname.

call transaction 'SE38' and skip first screen.

Regards,

ravi

Read only

0 Likes
2,147

Hello Ravi,

Thank you very much for your help. It is working perfectly for me. I could jump to editor but somehow its not skipping the first screen.

I clicked on the Problem solved because it worked for me.

Could you help me, if it is possible to jump to a particular line in that code. becasue when I open the abap editor from my code it should jump to a particular line in that code.

Thank you very much,

Best Regards,

Subramanyeshwer.

Read only

0 Likes
2,147

Check Rich's code. It works perfect for me.

Regards,

Ravi

Read only

0 Likes
2,147

Hello Ravi,

I got it. Thank you for your reply. Rich code worked perfectly. it is working. Could you please let me know if we can jump to a particular line in a code.

Thank you,

Best Regards,

Subramanyeshwer

Read only

0 Likes
2,147

I don't think you can with that particular statement, you could if you were to implement the editor as a text editor control.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,147

Hy

If it is only report you could use the event "At Selection screen"

If you want to jump in the SE38 Try this

Call Transaktion SE38 with <REPORT_NAME>

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,149

Check this sample code.



report zrich_0001.

tables: trdir.

data: itrdir type table of trdir with header line.

select-options: s_name for trdir-name.

start-of-selection.

  select * into table itrdir
            from trdir
               where name in s_name.

  loop at itrdir.
<b>    format hotspot on.
    write:/ itrdir-name.
    hide itrdir-name.
    format hotspot off.</b>
  endloop.


<b>at line-selection.

  editor-call for report itrdir-name display-mode.</b>

Regards,

Rich Heilman

Read only

0 Likes
2,147

HEllo Rich,

I could solve the problem. Thanks for your help. I clicked on "Problem Solved".

could you please let me know if it is possible to jump to a particular line in a Code.

Thank you,

Best Regards,

Subramanyeshwer

Read only

0 Likes
2,147

Hello Rich,

could you please let me know why am I getting the error when I am trying to jump to the ABAP Editor using Editor-call. I am getting this error. "Unable to find a tool to process the request".

Thank you,

Best Regards,

Subramanyeshwer

Read only

Former Member
0 Likes
2,147

hi,

SET HOTSPOT ON.

Write :/'Report1'.

Write :/'Report2'.

SET HOTSPOT OFF.

Now as you enabled the hotspot on the report names. You can capture the names and call the transaction se38 or editor with the name of the report at line-selection event.

Regards,

Richa

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,147

Please be sure to award points for helpful answers and mark as solved when solved completely. Thanks.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,147

hi

you can read the contents of the selected line from sy-lisel for futur operations on it...

Read only

Former Member
0 Likes
2,147

HI,

Scrolling is possible in case of lists by using statement <b>SCROLL LIST</b>.

I think it is not possible with abap editor.

Regards,

Sailaja.