‎2010 Jun 27 10:57 PM
Hi,
I need to add a new button say "Display All" in ALV report at top.
This is what I have done as per the above link. But the button is not being displayed in the report when I executed it. Please help.
1. SE80 - copied the GUI status "STANDARD" to my zprogram.
2. SE41 - added new function key "&DISP" with description "Display All". I did not specify any icon name though.
3. Added the following lines in FM
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
4. Created new forms SET_PF_STATUS & USER_COMMAND.
FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'YSTANDARD'.
ENDFORM. " SET_PF_STATUS
Thank you,
mk
‎2010 Jun 28 6:39 AM
Hi,
U created the Ystandard GUI status , on double clicking 'Ystandard' is it going to the ystandard ?
or u can check in the status tat if the dispall text is in red then keep the cursor on tat DISPALL and press the button in the application toolbar 'FUNCTION CODE'
‎2010 Jun 28 6:44 AM
Hi mkan74 ,
Everything you did is fine, now you must include only simple form is USER_COMMAND .
Copy paste below code at the end of your report and write your own logic for user command.
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '"&DISP'.
Write your code here.
ENDCASE.
ENDFORM.
Regards
Kasturi
‎2010 Jun 28 7:13 AM
Hi,
You can add button on ALV toolbar...Plz visit these links:
1. http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
May this helps you.
Regards.
Deepak Sharma
‎2010 Jun 28 7:19 AM
Hi,
Just check that after clicking on the button is it going to the user-command form . If you dont created that form create and built your logic inside that for displaying .
With Regards,
Sumodh.P
‎2010 Jun 28 7:27 AM
Hi,
Try creating the PF-Status using the below approach:-
Goto SE41, create a pf-status for your alv report program.
On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
Delete the unwanted buttons and also you can add new buttons if reqd.
Activate pf-status --> and apply in alv program.
Then code for the custom button in the report program.
Or; try and change the function code of the button.
Hope this helps you.
Regards,
Tarun