2008 Mar 05 7:14 AM
Hello All,
Iam doing alv report , i want to display custom icon (Ex: Select all icon) along with grid (standard icons ) icons. For this what code should be and where i have to write the code .
Pls reply soon.
Hello All,
Iam doing alv report , i want to display custom icon (Ex: Select all icon) along with grid (standard icons ) icons. For this what code should be and where i have to write the code .
Pls reply soon.
2008 Mar 05 7:18 AM
1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.
2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.
Status names can have a maximum of 20 characters.
-
In transaction SE41,
1) Give the program name and the status name and click on the Create button.
2) Go to 'Function keys' and expand.
3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.
Whatever you have typed now becomes the function codes of these icons and can be used in your program.
-
SET PF-STATUS 'Example'. "Example is the name of the GUI status
regards
ramya
2008 Mar 05 11:43 AM
Hi,
You dont have to write code for that You just open SE41 there click the icon for copy status it will open one window in Frm u have to give
Program--> SAPLKKBL
Status--> STANDARD
in to u give
Prg name--> Your program name
Status-->Your Own Status Name
And press copy.
Then In your created status go to application toolbar and Add your Button
Then In the program Create a Form
FORM pf_status "#EC *
USING p_extab TYPE slis_t_extab.
SET PF-STATUS 'STAT1' EXCLUDING p_extab.
ENDFORM. "PF_STATUS
Here 'STAT1 is your own Status Name
Then in the FM -->CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
Pass i_callback_pf_status_set = 'PF_STATUS' this.
In case any problem please tell me.
Rewards Points If helpful
Edited by: Sandipan Ghosh on Mar 5, 2008 12:46 PM
Edited by: Sandipan Ghosh on Mar 5, 2008 12:49 PM
2008 Mar 05 11:49 AM
Hi,
Please refer to the SAP standard demo program BCALV_EDIT_05.
Thanks,
Sriram Ponna.
2008 Mar 05 11:57 AM
hi,
Follow this link.
How can I display an icon in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
Hope this helps, Do reward.
2008 Mar 05 12:07 PM
hi,
do like this
first u need to copy standard toolbar of alv into ur toolbar (z*) for ur report....
for this u need to copy status into SE41.
Go to SE41.
click on copy status button....
now into FROM
Program SAPLKKBL
Status STANDARD_FULLSCREEN
Into TO
Program ZALV_DS (ur program name)
Status ZSTAT ( ur status name)
now go to ur program.....
FORM display_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZALV_DS'
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_STAT'
is_layout = st_layout
i_save = 'X'
it_fieldcat = t_fcat
it_events = t_eve
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_data
FORM set_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
ENDFORM. "SET_STAT
FORM user_command USING u_comm LIKE sy-ucomm sel_fld TYPE slis_selfield.
CASE u_comm.
WHEN 'TEST'.
CALL TRANSACTION 'MM03'.
ENDCASE.
ENDFORM. "user_command
after copying a status into SE41, open ur Z status, add button u want to add and activate it.
I have added button named TEST...
reward if usefull....
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |