‎2012 Jan 17 6:16 PM
Hi,
I am creating an execute button in my ALV report output.
I have created a z status named ZSTANDARD_FULLSCREEN (a copy of standard_fullscreen) through se41 and added the execute button named BDC. While in coding i have made the following changes
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = 'GENERATE DISCONNECTION ORDERS'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FCAT "FIELDCAT
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_SORT = I_SORT[]
* IT_EXCLUDING = IT_MENU
TABLES
T_OUTTAB = I_FINAL.
DATA: RS_SELFIELD TYPE SLIS_SELFIELD.
.
SET PF-STATUS 'ZSTANDARD_FULLSCREEN'.
AT USER-COMMAND.
IF SYUCOMM = 'BDC'.
EXIT.But the execute button is still not coming. I have read almost all the post related to this topic but none of them suffice. Please help.
Added code tags
Edited by: Rob Burbank on Jan 17, 2012 1:30 PM
‎2012 Jan 17 6:32 PM
Well, you have to put the button logic in a form named USER_COMMAND.
Rob
‎2012 Jan 17 6:32 PM
Well, you have to put the button logic in a form named USER_COMMAND.
Rob
‎2012 Jan 17 7:42 PM
This is a basic question you can find lot of threads if you search properly
eg:
‎2012 Jan 18 12:22 PM
Hi Shahruk,
I understood your problem. See are using I_CALLBACK_USER_COMMAND = 'USER_COMMAND'.
Here whatever you give after I_CALLBACK_USER_COMMAND must be a subroutine name.
So create a subroutine named USER_COMMAND and in that subroutine write your logic for user interaction.
Hope this helps....
Best Regards.
Aswath.
‎2012 Jan 18 12:26 PM
SET PF-STATUS 'ZSTANDARD_FULLSCREEN'.
where have you written this?
there should be a subroutine named SET_PF_STATUS in your program inside which you should write this line
‎2012 Jan 18 5:20 PM
Hi,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = 'GENERATE DISCONNECTION ORDERS'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FCAT "FIELDCAT
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_SORT = I_SORT[]
* IT_EXCLUDING = IT_MENU
TABLES
T_OUTTAB = I_FINAL.
DATA: RS_SELFIELD TYPE SLIS_SELFIELD.
.SET PF-STATUS 'ZSTANDARD_FULLSCREEN'
AT USER-COMMAND.
IF SYUCOMM = 'BDC'.
EXIT.
For this, you need to create 2 new forms(subroutines).
One for PF-status named SET_PF_STATUS
and other for User command named USER_COMMAND
then write
SET PF-STATUS 'ZSTANDARD_FULLSCREEN'. in set_pf_status form
&
DATA: RS_SELFIELD TYPE SLIS_SELFIELD.
.
AT USER-COMMAND.
IF SYUCOMM = 'BDC'.
EXIT. in user_command form.
Regards,
Harsh Bansal
‎2012 Jan 18 6:10 PM
Hi
As Many Have already specified: Here is the solution:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = 'GENERATE DISCONNECTION ORDERS'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FCAT "FIELDCAT
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_SORT = I_SORT[]
IT_EXCLUDING = IT_MENU
TABLES
T_OUTTAB = I_FINAL.
New Performs in urProgram:
FORM set_pf_status USING fp_extab TYPE slis_t_extab. "#EC CALLED
SET PF-STATUS 'ZSTANDARD_FULLSCREEN' EXCLUDING fp_extab.
ENDFORM. " set_pf_status
FORM user_command USING fp_ucomm TYPE syucomm
fp_slfld TYPE slis_selfield.
CASE fp_ucomm.
WHEN 'BDC'.
XXXXXXXX
ENDCASE.
ENDFORM.
‎2012 Jan 20 6:57 AM