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: 

Shift Lines on the report

Former Member
0 Kudos

Hi,

I have one requirement and I want to do it in a simpler way as my core is not ABAP.

I have report which is done. I want to write a action on "AT LINE-SELECTION" and when I select a line, it should display something, like another small report. This will have around 3-6 lines.

It is easy to display it on the next screen as it is done automatically when the even is triggered.

I want to do it on the same screen by just shifting the lines below.

So If dbl-click a line it should shift the lines to below and make space for this new report. This way it will displayed on the same page. My base report is huge that is why I am looking for simpler way.

Is it possible? Please help me if possible.

I will appreciate it.

Best Regards,

SC

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

of course it can do it, but I don't know if it can be simple because it depends on your report.

The event AT LINE-SELECTION creates a new abap list, so it means it needs to write all again and add the text at the end.

I know it's possible to place a data in a particular page, row or colunm but in the same list:

WRITE: 'My name is Max'.

AT LINE-SELECTION.
  sy-lsind = sy-lsind - 1.          "<-- To keep the same abap list
  WRITE: 'My name is Max'.          "<-- Write old data again
  WRITE: / 'My sirname is Bianchi'. "<--- Write new data

Max

6 REPLIES 6

Former Member
0 Kudos

Probably best to use ABAP Tree Controls.

If you Google this, you will get plenty of examples.

Rob

Former Member
0 Kudos

Hi

of course it can do it, but I don't know if it can be simple because it depends on your report.

The event AT LINE-SELECTION creates a new abap list, so it means it needs to write all again and add the text at the end.

I know it's possible to place a data in a particular page, row or colunm but in the same list:

WRITE: 'My name is Max'.

AT LINE-SELECTION.
  sy-lsind = sy-lsind - 1.          "<-- To keep the same abap list
  WRITE: 'My name is Max'.          "<-- Write old data again
  WRITE: / 'My sirname is Bianchi'. "<--- Write new data

Max

0 Kudos

I saw the report tree concept but seems little high end stuff for me.

The sy-lsind is good but writing again same report is challanging as it is a long running report.

Any other thought.

Regards,

SC

0 Kudos

You would only have to re-write the report, not re-run the long running parts.

But if you did that, the report would re-display from the beginning, not where you add the lines.

Tree controls will give you what you want and there are simple demos available. Search SE38 with TREEDEMO* also the web.

Rob

0 Kudos

Hi Sume

just as Rob and I have said: you've no chance.

If you want to add a new part in the same screen (so list) in the event AT LINE-SELECTION: you need to write all again.

Just as Rob has written, that doesn't mean you need to repeat all report, but the part for the output only.

Sometimes the report is arranged in several parts, one for extraction of data and one for the output:

START-OF-SELECTION.

  PERFORM GET_DATA.
  PERFORM WRITE_DATA.

AT LINE-SELECTION.

  SY-LSIND = SY-LSIND - 1.
  PERFORM WRITE_DATA.
  PERFORM WRITE_NEW_DATA.

I don't know how you report was developed, but if you can't do it, you can only write the new data in a new list (so screen)

Max

Former Member
0 Kudos

Thank you all.

I would prefer to display on the next screen.

Much simpler for me.

Regards,

SC