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: 

Interactive Reoprt

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi

Yes you can!

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

Max

Former Member
0 Kudos

yes it is possible ..

Regards,

Santosh

Former Member
0 Kudos

HI,

you can do that in secondary list.

Regards,

Laxmi.

Former Member
0 Kudos

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

Former Member

Former Member
0 Kudos

Hi,

follow below logic

at line-selction

if sy-lsind = 2.

set pf-status 'test' excluding...

endif.

Regards

amole

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.