2007 Apr 09 4:39 PM
hi ,
i created my own pf status by using following function modue. it is showing pf status correct. in my pf status i keep back and exit buttons only. when i execute the following report it is showing back and exit buttons only. when i click back button action is not performing . any body can tell why the action is not working . i activated my pf status also. if possible send me the sample code.
iam sending my code below....
selection-screen: begin of block b1.
parameters : p_appln type mara-matnr.
parameters : p_user type marc-werks.
selection-screen: end of block b1.
data: begin of exclude occurs 0,
func(10) type c,
end of exclude.
At selection-screen output.
set pf-status 'SELK'. <-- Comment this line
if sy-dynnr eq '1000'.
call function 'RS_SET_SELSCREEN_STATUS'
exporting
p_status = 'SELK'
tables
p_exclude = exclude
exceptions
others = 1.
endif.
thanks,
maheedhar.t
2007 Apr 09 4:43 PM
hi ,
i created my own pf status by using following function modue. it is showing pf status correct. in my pf status i keep back and exit buttons only. when i execute the following report it is showing back and exit buttons only. when i click back button action is not performing . any body can tell why the action is not working . i activated my pf status also. if possible send me the sample code.
iam sending my code below....
selection-screen: begin of block b1.
parameters : p_appln type mara-matnr.
parameters : p_user type marc-werks.
selection-screen: end of block b1.
data: begin of exclude occurs 0,
func(10) type c,
end of exclude.
At selection-screen output.
set pf-status 'SELK'. <-- Comment this line
if sy-dynnr eq '1000'.
call function 'RS_SET_SELSCREEN_STATUS'
exporting
p_status = 'SELK'
tables
p_exclude = exclude
exceptions
others = 1.
endif.
thanks,
maheedhar.t
2007 Apr 09 4:43 PM
2007 Apr 09 4:47 PM
2007 Apr 09 4:50 PM
if you see in debugging sy-ucomm becomes blank. enthough it wont work. i already tried with this statement.
thanks,
maheedhar.t
2007 Apr 09 4:55 PM
2007 Apr 09 4:44 PM
Are you setting the status for your selection screen and want the BACK button to work in the selection screen? Since it is your own pf-status, you will have to write the code for it in AT SELECTION-SCREEN.
TABLES: sscrfields.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
2007 Apr 09 4:48 PM
Please assign the function codes to the back button and use the function code in your program for a particulat action.
Check this piece of code might help you.
----
call the ABAP list viewer *
----
FORM list_display TABLES a_output.
pgm = disvariant-report = sy-repid.
disvariant-variant = variant.
call list viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = pgm
i_callback_pf_status_set = 'SET_PF_STATUS'
it_fieldcat = fieldcat
is_layout = layout
is_print = print
i_save = 'A'
it_events = eventcat
it_sort = sortcat
i_callback_user_command = '<b>USER_COMMAND'</b>
TABLES
t_outtab = a_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "LIST_DISPLAY
*----
FORM SET_PF_STATUS *
*----
FORM set_pf_status USING extab TYPE slis_t_extab.
SET PF-STATUS 'STATUS1'.
ENDFORM. "set_pf_status
*----
FORM USER_COMMAND *
*----
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
DATA t_difference TYPE i.
CASE ucomm.
WHEN 'ENT1'. <--The function code.
Shreekant
2007 Apr 09 4:49 PM
Hi mahender,
Here is the you need to add at AT SELECTION SCREEN event
TABLES: sscrfields.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
Regards
Sudheer
2007 Apr 09 4:54 PM
Hi,
when you are not excluding any std buttons functionality.Try to use the set pf-status and set the function for the back button as "BACK" and clear the sy-ucomm after list display.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |