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 Reoprt

Former Member
0 Likes
968

Hi,

Can we put Push buttons in the secondary list screens in an Interactive Report?

Please do possible help to do the same.

Regards,

U.Khan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
949

Hi

Yes It is possible-

TRy this code-

START-OF-SELECTION.

WRITE: 'Basic List',

/ 'sy-lsind:', sy-lsind.

TOP-OF-PAGE.

WRITE 'Top-of-Page'.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

CASE sy-pfkey.

WHEN 'TEST'.

WRITE 'Self-defined GUI for Function Codes'.

ULINE.

ENDCASE.

AT LINE-SELECTION.

SET PF-STATUS 'TEST' EXCLUDING 'PICK'.

PERFORM out.

sy-lsind = sy-lsind - 1.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'FC1'.

PERFORM out.

WRITE / 'Button FUN 1 was pressed'.

WHEN 'FC2'.

PERFORM out.

WRITE / 'Button FUN 2 was pressed'.

WHEN 'FC3'.

PERFORM out.

WRITE / 'Button FUN 3 was pressed'.

WHEN 'FC4'.

PERFORM out.

WRITE / 'Button FUN 4 was pressed'.

WHEN 'FC5'.

PERFORM out.

WRITE / 'Button FUN 5 was pressed'.

ENDCASE.

sy-lsind = sy-lsind - 1.

FORM out.

WRITE: 'Secondary List',

/ 'sy-lsind:', sy-lsind,

/ 'sy-pfkey:', sy-pfkey.

ENDFORM.

Hope this helps u.

Seema.

9 REPLIES 9
Read only

Former Member
0 Likes
949

Hi

Yes you can!

You do that in the same way for the primary list.

Max

Read only

Former Member
0 Likes
949

yes it is possible ..

Regards,

Santosh

Read only

Former Member
0 Likes
949

HI,

you can do that in secondary list.

Regards,

Laxmi.

Read only

Former Member
0 Likes
949

Hi,

Yes it is possible.

use the system variable sy_ucomm to get the event triggred by the user on the secondary list.

regs

rams

Read only

Former Member
0 Likes
949
Read only

Former Member
0 Likes
949

Hi,

follow below logic

at line-selction

if sy-lsind = 2.

set pf-status 'test' excluding...

endif.

Regards

amole

Read only

Former Member
0 Likes
949

Hi,

yes, you can have a button on secondary list too. it is same as creating a button on primary list. you can have many button and check the function code using sy-ucomm system variable.

Regareds,

Richa

Read only

Former Member
0 Likes
949

Hi

Here is one ex:

let say the user is on 2nd list

here value of system variable sy_lisind will be 1 or more depending upon the list.

case sy_lisind.

when 1.

if sy_ucomm = 'PUSHBUTTON1'.

do.

....

else.

......

endif.

when 2.

and so on.

Read only

Former Member
0 Likes
950

Hi

Yes It is possible-

TRy this code-

START-OF-SELECTION.

WRITE: 'Basic List',

/ 'sy-lsind:', sy-lsind.

TOP-OF-PAGE.

WRITE 'Top-of-Page'.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

CASE sy-pfkey.

WHEN 'TEST'.

WRITE 'Self-defined GUI for Function Codes'.

ULINE.

ENDCASE.

AT LINE-SELECTION.

SET PF-STATUS 'TEST' EXCLUDING 'PICK'.

PERFORM out.

sy-lsind = sy-lsind - 1.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'FC1'.

PERFORM out.

WRITE / 'Button FUN 1 was pressed'.

WHEN 'FC2'.

PERFORM out.

WRITE / 'Button FUN 2 was pressed'.

WHEN 'FC3'.

PERFORM out.

WRITE / 'Button FUN 3 was pressed'.

WHEN 'FC4'.

PERFORM out.

WRITE / 'Button FUN 4 was pressed'.

WHEN 'FC5'.

PERFORM out.

WRITE / 'Button FUN 5 was pressed'.

ENDCASE.

sy-lsind = sy-lsind - 1.

FORM out.

WRITE: 'Secondary List',

/ 'sy-lsind:', sy-lsind,

/ 'sy-pfkey:', sy-pfkey.

ENDFORM.

Hope this helps u.

Seema.