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

Custom Button on Copied Standard Program

former_member207873
Participant
0 Likes
7,041

Hi Experts,

I need to have a custom button on the application toolbar of the copied standard program. (ZRM07MLBD) I have tried adding the button on the 'STANDARD' status of the program ZRM07MLBD. But it is not showing on the list output. Am I missing anything? Moreover in the program (ZRM07MLBD) where should i write the coding to enable the function of the button.

BR.

18 REPLIES 18
Read only

former_member188219
Participant
0 Likes
6,220

goto se41 and then copy the standard status into ur program and do the necessary changes as per rqrmnt...

Read only

0 Likes
6,220

Since it is a copy of the standard program the PF-STATUS naming will be as that of the standard in the copied program.

Read only

0 Likes
6,220

yes u can keep it same not an issue as it is copied.

Read only

0 Likes
6,220

Hi Anurag,

I added  the button to the STANDARD' status itself. But I feel something more has to be done on the program side. But I am not getting what to do on the Zprogram to make it appear and to add function code to it.

BR.

Read only

Former Member
0 Likes
6,220

Hi,

  Copy the standard in se41 and can make changes in that in the way you need.

  Did you pass this PF-STATUS in your report in Reuse FM Dispaly.. Please check it.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
6,220

Please copy the PF status using SE41 from the standard program to Z progrm and pass it your fM

Read only

0 Likes
6,220

Hi Nabheet,

Thanks for your answer. But I feel what I am missing is the changes to be done to the ZRM07MLBD. Why I have to pass it in my FM since it will be already passed as it is the copy of the standard program.

Read only

0 Likes
6,220

SAP standard program is using status STATUS creted in standard program RM07MLBD. You goto sE41 give stadnrd program name and PF status. Then make a copy to your Z program. You will see ZSTATUS in your custom program in left hand side. Then you can create your own button

Read only

0 Likes
6,220

In SE41, it says,

But STANDARD is available. I am successfully adding the Custom button now. (With the help of Standard). But while coding which PF Status I have to make use of STANDARD or STATUS. In RM07MLBD you could see two list function modules. In one it is passing the status and in another it is not. I have to make use of the function module which is getting the G_T_TOTALS_FLAT.

BR.

Read only

0 Likes
6,220

Basically for your case status is getting set in sub routine PF_STATUS_SET_TOTALS via EVENT. SO in this sub routine put your new status name..

Read only

0 Likes
6,220

Thanks Nabheet. But where to add the user command ?  The one user command available is 'USER_COMMAND'. But it is attached with ''STATUS'' PF.

Read only

0 Likes
6,220

 

USER_COMMAND_TOTALS

Read only

0 Likes
6,220

Hi Nabheet Madan,

I have put my perform statements inside the FM USER_COMMAND_TOTALS. When I put break point it is not triggering the button function. Instead its showing a status message 'Place the cursor on a table  line'.

NB: I need the mail to get generated with excel attachment while clicking on the button.

Read only

0 Likes
6,220

This is not the FM this is the sub routine name

USER_COMMAND_TOTALS to be passed to ALV grid.

Read only

0 Likes
6,220

Please note that what ever user command name you will pass to the FM or via event will be used. I will suggest yoou to put a break point in all user command speacially the one you have passed to FM to see what is the issue. I guess you are mixing two things

Read only

Former Member
0 Likes
6,220

Dear Abap,

                        I have added the button on its button it is working appearing on the application toolbar during the result.

  • copy the RM07MLBD to ZZRM07MLBD.
  • Now goto se80.
  • Write down the ZZRM07MLBD.
  • open the gui status folder and dbl click on the standard status.
  • Now go to application toolbar area and in my case I have give the name &NEW and press continue.
  • press continue button.
  • give the text according to your requiremnts.
  • press contiue button save and activate the GUI STATUS.
  • Now run the MB5B report. you will get the desire button.
  • By pressing the button the program SAPLKKBL->include LKKBLF00-> user_command_new.
  • now do the implicite enhancment and write down your code .
  • NOTE:But I will not recomend this. This is a standard report and alot of other reports are also linked to the same program.

Regards,

Read only

0 Likes
6,220

Hi Hameed,

Till the navigation you have mentioned ie to the program SAPLKKBL I have done. But I do not understand why we have to go to the program SAPLKKBL and do the enhancement. Are there any better ways of achieving the same?

Thanks.

Read only

0 Likes
6,220

Dear,

        I dont think so but you can naviagate and look at the program how they program with in the include. then you can use the same code to add your functionality.

regards,