How to copy/change BCALV program for custom button toolbar?

Question: Hi All,

I am a beginner and trying to copy/change the BCALV program to add two custom buttons on ALV report I have written. So far I am not successful to add a button. Can some one please help me step by step with simple code? Something is missing and can not find what is it.

thanks for your help in advance.
Abaper99

Answer:
Which program are you trying to copy? It will be different to add a button if it is function module or grid based.

Thanks,
Tom01
_________________
If it's on your resume, you should know how to do it.

Answer:
Hi Tom01,

I have written the ALV report/executable program which calls the ALV grid display FM 'REUSE_ALV_GRID_DISPLAY'. I am trying to add two custom buttons on the toolbar (next to i icon) on the ALV output generated. To do so, I copied the code from the program BCALV_GRID_05 and tried to modify the icon text and quick info but not successful in setting custom buttons in the report. Please help me if you can with some detailed instructions. Do I need to use screen painter to add button on the toolbar? Not sure how to achieve this.

thanks for all help you can provide me with
abaper99

Answer:
You need not using screen painter,
when CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY',using a importing parameter 'I_CALLBACK_PF_STATUS_SET = 'FRM_STATUS''.
Then you should creat a form as follow:

FORM FRM_STATUS.
SET PF-STATUS 'STANDARD'.
ENDFORM.

Then you should copy a standard status of ALV report to your report,you can get it from function group 'SAPLSALV'.

At last, you can added custom buttons in the status 'STANDARD'.

Answer:
BCALV_GRID_05 does not use the function module in my system, it uses the alv grid object. For an example using the function module you mention look at program ERGP2080, status HALF_TOOLBAR.

Good Luck,
Tom01
Copyright ?2007 - 2008 www.jt77.com