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 event

Former Member
0 Likes
549

Hi,

i have a internal table with data e.g

--


Itab--

plant orders

1 20

2 30

3 40

Total 821

----


for example, when i click on Plant '1' my report will display data for plant '1' in interactive way. By this way my report is working.

But now my requirement is when i will click on ''Total'' my Report should display data in interactive way for all plants.

i made logic for this but how i will identify user has selected particular "plant" or "Total''.

Is there any way by which i can analyze "total" is selected by user or particular plant number is selected.

plz tell me , it's very urgent.

<REMOVED BY MODERATOR>

Thanks & regards,

Gaurav

Edited by: Alvaro Tejada Galindo on Feb 27, 2008 10:56 AM

Hi,

i have a internal table with data e.g

--


Itab--

plant orders

1 20

2 30

3 40

Total 821

----


for example, when i click on Plant '1' my report will display data for plant '1' in interactive way. By this way my report is working.

But now my requirement is when i will click on ''Total'' my Report should display data in interactive way for all plants.

i made logic for this but how i will identify user has selected particular "plant" or "Total''.

Is there any way by which i can analyze "total" is selected by user or particular plant number is selected.

plz tell me , it's very urgent.

<REMOVED BY MODERATOR>

Thanks & regards,

Gaurav

Edited by: Alvaro Tejada Galindo on Feb 27, 2008 10:56 AM

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
527

During the WRITE operation, HIDE the value of plant for each line, and HIDE a value "*" for the field plant when writing the total.

Then when user double-click, if plant is "*" display the whole data.

Something like

  LOOP AT inttab.
    WRITE: / plant, nb_order.
    HIDE: plant.
  ENDLOOP.
  plant = '*'.
  WRITE: 'Total', nb_total.  
  HIDE plant.

Then in user processing

AT LINE-SELECTION.
  IF plant IS INITIAL.
    " do nothing
  ELSEIF plant = '*'.
    " each and every plant
  ELSE.
    " one plant
  ENDIF.

Regards

Read only

Former Member
0 Likes
527

Hi,

Please refer to the SAP standard program.


DEMO_LIST_HIDE

Thanks,

Sriram Ponna.

Read only

Laxmana_Appana_
Active Contributor
0 Likes
527

Hi,

If report developed using write statements use AT LINE-SELECTION event.

By checking the sy-lisel values you can identify user selected total or particular plant number

Example



if sy-lisel+0(1) EQ '1'

endif.


if sy-lisel+0(1) EQ 'T'

endif.
 

Regards

L Appana