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

Interactive Report

Former Member
0 Likes
750

Hi,

My program is

Write:/9 'City', /9

'Description', /9

'District'.

AT LINE-SELECTION.

CASE SY-UCOMM.

WHEN 'City'.

WRITE: 'CITY'.

WHEN 'Description'.

WRITE: 'DESCRIPTION'.

ENDCASE.

When i am double clicking on city i am expecting only city to display in my secondary list

and when i double click on description only description has to display.

But when i am doble clicking on City or description it is displaying City Description.

How to rectify this error.

6 REPLIES 6
Read only

Former Member
0 Likes
722

insted of AT LINE SELECTION use AT USER COMMAND.

Read only

0 Likes
722

I have already tried it with At- user-command too but no use.

Read only

Former Member
0 Likes
722

Hi Venkat,

If you use AT USER COMMAND instead of AT LINE SELECTION, you have to create a PF status & create a button on TOOLBAR or salect any function from menu.

OR else if you have to continue with AT LINE SELECTION, before using this you have to hide the records which you want to display. & then later display then on double click, using AT LINE SELECTION EVENT.

Please refer a sample code :-

TABLES: zreaders.
DATA: BEGIN OF itab OCCURS 1,
       readerid LIKE zreaders-readerid,
      firstname LIKE zreaders-firstname,
      lastname LIKE zreaders-lastname,
      deposit LIKE zreaders-deposit,
      END OF itab,
      itab1 LIKE zreaders OCCURS 1 WITH HEADER LINE.

SELECT * FROM zreaders INTO CORRESPONDING FIELDS OF TABLE itab.
SORT itab BY readerid.
LOOP AT itab.
WRITE:/ icon_calculation AS ICON, itab-firstname.
*--Here if i dont hide when i double click i will get the last record 
*--o/p because it will show header record
HIDE itab-readerid.
ENDLOOP.


AT LINE-SELECTION.
LOOP AT itab where readerid = itab-readerid.
WRITE:icon_calculation AS ICON, itab-firstname.
WRITE: /4 'Deposit of',itab-firstname,itab-lastname,':', itab-deposit,
'Rupees'.
ENDLOOP.

Kindly set to resolved if it helps you.

Regards

Abhii

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
722

use get cursor field in at line selection and then based on teh field clicked get the data.

AT LINE-SELECTION.

GET CURSOR FIELD fldname VALUE fldval.

CONDENSE fldname.

CONDENSE fldval.

WRITE : / 'You have clicked ', fldname, ' & its value is ', fldval.

or

GET CURSOR LINE l_linea.

READ TABLE itab_bsik_v INDEX l_linea.

Read only

Former Member
0 Likes
722

Hi,

Try giving the Function Codes in capitals ,

if AT LINE SELECTION is not working

then try using AT USER COMMAND.

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
722

Hi all thks for your answers.

Issue solved and the correct one is

Write:/ 'City', /

'Description'.

AT line-selection.

CASE syst-LISEL.

WHEN city.

WRITE: 'CITY'.

WHEN 'Description'.

WRITE: 'DESCRIPTION'.

ENDCASE.

Regards

VEnk@