Adding Custom Button on Maintenance View

8
Adding Custom button on Maintenance View By Anurag Shukla, JK Lakshmi Cement LTD Some times we might have to enhance the table maintenace generator to add additional button . While creating TMG for table, system generates own set of codes which we need to enhance . There is some events who especially handle PF status. Following are the steps to create our own push button on TMG. 1. Create Table maintenance generator for the table.

description

Adding Custom Button on Maintenance View

Transcript of Adding Custom Button on Maintenance View

Page 1: Adding Custom Button on Maintenance View

Adding Custom button on Maintenance View

By Anurag Shukla, JK Lakshmi Cement LTD

Some times we might have to enhance the table maintenace generator to add additional button .

While creating TMG for table, system generates own set of codes which we need to enhance .

There is some events who especially handle PF status.

Following are the steps to create our own push button on TMG.

1.     Create Table maintenance generator for the table.

Page 2: Adding Custom Button on Maintenance View

2.     Go to the Event tab on table maintenance generator as shown in below screen shot.

Environment->modification->events.  

3.     Enter the event name and form routine name and press enter .you will get error because it takes form routine name only starts with SAPL.

Page 3: Adding Custom Button on Maintenance View

4.     Now enter the correct routine name and press on editor button in front of routine name.

5.     On clicking editor tab, menu Painter screen will open.

Page 4: Adding Custom Button on Maintenance View

6.     Click on copy interface and copy the interface from SAPLSVIM to SAPLZSD_CUST_ROFF.

Add one more button.

Page 5: Adding Custom Button on Maintenance View

8.     Now go to the maintenance screen.

9.     Create a module in PAI.

Page 6: Adding Custom Button on Maintenance View

10.  Double click on the module name and create the include program as shown in below screen shot.

Page 7: Adding Custom Button on Maintenance View

11.  Write the below code in the include.

For demo purpose, we would display Hello in pop up window.

*----------------------------------------------------------------------****INCLUDE LZSD_CUST_ROFFI01 .*----------------------------------------------------------------------**&---------------------------------------------------------------------**& Module SET_PF INPUT*&---------------------------------------------------------------------** text*----------------------------------------------------------------------*MODULE SET_PF INPUT.

data count_er type i.

CASE function.WHEN 'POP'.CALL FUNCTION 'POPUP_TO_INFORM'EXPORTINGtitel = 'Information'txt1 = 'HELLOOOOOOOOOO............'txt2 = count_er.ENDCASE.

ENDMODULE. " SET_PF INPUT 12.  Now activate all development including function group. After activating you can see the pushbutton

‘POPUP’.

Page 8: Adding Custom Button on Maintenance View

13.  Click on pushbutton to display popup window.