Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

add one more push button

i want to add one more push button in the PF_STATUS of basic list as DISPLAY for interactve reporting using FM REUSE_ALV_GRID_DISPLAY .

Former Member
Former Member replied

U can have button on application toolbar.

You just have to use the new pf status in your report program.

You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.

Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.

Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.

Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.

Have a look at below code for using the new status.

TYPE-POOLS: slis.

DATA: i_qmel LIKE qmel OCCURS 0.

data v_repid type repid.

SELECT * FROM qmel INTO TABLE i_qmel.

v_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = v_repid

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

i_structure_name = 'QMEL'

TABLES

t_outtab = i_qmel

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

form set_pf_status using rt_extab type slis_t_extab.

set pf-status 'TEST'.

endform.

FORM user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

data lv_ucomm type sy-ucomm.

lv_ucomm

= sy-ucomm.

CASE lv_ucomm.

WHEN 'BUTTON'. "Double Click line Item

**Write ur functinality here

endcase.

endform.

Also have a look at below links.

http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm

ALV report

Best Regards,

Dheeraj Soni

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question