‎2004 Nov 03 9:33 AM
Hi All,
My ALV code is running successfully,but I just wanna add few customer specific functionality and my own PF status.Can you suggest me something for this.
Thanks and Regards.
Rajarshi.
‎2004 Nov 03 1:10 PM
Hi Rajarshi,
If you are using REUSE_ALV_GRID_CONTROL, Here is how you add
custom functionality.
1) In the fM REUSE_ALV_GRID_CONTROL pass the parameters
i_callback_user_command = 'USER_COMMAND' i_callback_pf_status_set = 'SET_PF_STATUS'. This are form name.
2) Create a form in your program as below.
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'PFSTAT1' EXCLUDING rt_extab.
ENDFORM. "SET_PF_STATUS
PFSTAT1 is a copy of the Pf-status STANDARD_FULSCREEN of the program SAPLKKBL (copy it using SE41).
Once PFSTAT1 is created you can modify it just like any other PF status and add your own menu or command buttons.
3) To handle the functioanlity create a form of name user_command in your program as below.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
The field "R_UCOMM" will contain the current value of *"SY-UCOMM"
"RS_SELFIELD" will hold contents of the selected line
CASE r_ucomm.
ENDCASE.
ENDFORM. "USER_COMMAND
Hope this helps
‎2004 Nov 03 9:38 AM
‎2004 Nov 03 9:58 AM
Hi Rajarshi,
Have a look at the excellent tutorial Serdar wrote on ALV Grid:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an easy reference for alv grid control.pdf
Regards,
John.
‎2004 Nov 03 1:10 PM
Hi Rajarshi,
If you are using REUSE_ALV_GRID_CONTROL, Here is how you add
custom functionality.
1) In the fM REUSE_ALV_GRID_CONTROL pass the parameters
i_callback_user_command = 'USER_COMMAND' i_callback_pf_status_set = 'SET_PF_STATUS'. This are form name.
2) Create a form in your program as below.
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'PFSTAT1' EXCLUDING rt_extab.
ENDFORM. "SET_PF_STATUS
PFSTAT1 is a copy of the Pf-status STANDARD_FULSCREEN of the program SAPLKKBL (copy it using SE41).
Once PFSTAT1 is created you can modify it just like any other PF status and add your own menu or command buttons.
3) To handle the functioanlity create a form of name user_command in your program as below.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
The field "R_UCOMM" will contain the current value of *"SY-UCOMM"
"RS_SELFIELD" will hold contents of the selected line
CASE r_ucomm.
ENDCASE.
ENDFORM. "USER_COMMAND
Hope this helps
‎2004 Nov 05 5:00 AM
Hi Rajesh,
Thx for your help,but u have mentioned that I have to copy the PF status of SAPLKKBLO that is STANDARD_FULLSCREEN from the T-Code se41,this portion is not clear to me.
Asking for your kind reply.
Regards.
Rajarshi.
‎2004 Nov 05 1:18 PM
ALV Comes with built in functionalities like filter, sort etc. If you still want these functionalities in your program without having to code for these functionalities, then copy the PF status (STANDARD_FULLSCREEN) from the program SAPLKKBL. (For copying the PF status you can use SE41)
You can add additional functionalities to the existing ones by modifying the copied PF status.
Regards
Rajesh
Message was edited by: Rajesh R
‎2004 Nov 08 4:28 AM
Hi Rajesh,
Thank you very much for your kind help.My problem is over.
Regards.
Rajarshi.