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: 

Selection of multiple lines in transaction

Former Member
0 Kudos

Hi all

Is it possible to select multiple lines in a transaction( z transaction) by selecting first and last lines(similar like in windows filemanager by press the shift button).

Any inputs towards the solution would be highly appreciated.

Thanks and regards

Dinesh Dhiman.

4 REPLIES 4

Former Member
0 Kudos

You mean like 'select all'? That should be pretty easy to program.

Rob

Former Member
0 Kudos

Hi

In windows we can select a number of items by keeping shift button pressed. Say we keep cursor on item 1 and keeping shift button pressed, if we click on item 10 then all the items in between 1 and 10 get automatically selected. My requirement is quite similar to that.

Any pointers to it would be highly appreciated.

Thanks and regards

Dinesh

0 Kudos

In your Z transaction you can plan something like this:

Set the first click line to variable L_LINE1 of the table control in the PAI, whenever user clicks that line.

Set the second click line to variable L_LINE2 of the table control in the PAI.

Now after the second variable set, you can loop through your table in the PBO and make the checkbox on for the line items which are in between L_LINE1 to L_LINE2.

Like:


LOOP AT ITAB FROM L_LINE1 to L_LINE2.
  ITAB-CHECK_bOX = 'X'.
  MODIFY ITAB.
ENDLOOP.

Regards,

Naimesh Patel

Former Member
0 Kudos

Thanks. Solved on my own