2007 Oct 04 5:21 AM
Hi,
I have developed a ALV report using Grid Display.
NO oops concept has been used. So, I dont have a screen of my own.
after the alv output appears, i double-click on one of the rows and get a pop-up in which i modify some value and press ok to get a changed value for one of the fields in the alv output. Now, when i press the "BACK" button, i go back to the previous alv output (i.e. with the unchanged value for tht particular field), and then, again i have to press "BACK" button to go back to the selection-screen. Thus, i need to press the back button twice to go back to the selection-screen from the modified alv grid output.
My requirement is to go back to the selection-screen on pressing the "BACK" button just once.
I have tried using the Set pf-status thing, and user_command thing, but on pressing the "BACK" button the flow doesnt stop at user_command code in debugging mode.But if i try the same logic for double-click thing using When '&IC1', the flow stops at the user_command code. I am using the correct function code for the 'BACK' button.
I have even tried copying the standard gui status from se80-->function group SALV,still no positive result.
Please help me.
Thanks & Regards,
Tejas Savla
Hi,
I have developed a ALV report using Grid Display.
NO oops concept has been used. So, I dont have a screen of my own.
after the alv output appears, i double-click on one of the rows and get a pop-up in which i modify some value and press ok to get a changed value for one of the fields in the alv output. Now, when i press the "BACK" button, i go back to the previous alv output (i.e. with the unchanged value for tht particular field), and then, again i have to press "BACK" button to go back to the selection-screen. Thus, i need to press the back button twice to go back to the selection-screen from the modified alv grid output.
My requirement is to go back to the selection-screen on pressing the "BACK" button just once.
I have tried using the Set pf-status thing, and user_command thing, but on pressing the "BACK" button the flow doesnt stop at user_command code in debugging mode.But if i try the same logic for double-click thing using When '&IC1', the flow stops at the user_command code. I am using the correct function code for the 'BACK' button.
I have even tried copying the standard gui status from se80-->function group SALV,still no positive result.
Please help me.
Thanks & Regards,
Tejas Savla
2007 Oct 04 5:24 AM
Hi,
When u click on Back button try to write this code ie submit reportname using selection screen 1000 with parameters.
the parameters that the user inputs it.
regards,
Santosh .
2007 Oct 04 5:26 AM
Hi,
You can code for that in User command sub-routine.
check sy-ucomm and say LEAVE LIST PROCESSING,
it will go back to selection screen.
Regards,
Raghavendra
2007 Oct 04 5:46 AM
You need to pass USER COMMAND in the FM -- Marked in BOLD
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
<b>I_CALLBACK_USER_COMMAND = 'USER_COMMAND'</b>
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
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.
<b>FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.</b>
CASE R_UCOMM.
<b>WHEN 'BACK'.</b>
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
<b>ENDFORM. "user_command</b>
2007 Oct 04 5:58 AM
Hi,
After modifying the value please write below command.
rs_selfield-refresh = 'X'.
it refreshes the ALV screen. Now click on Back button and please check whether it is going back to selection screen or not?
Thanks,
Maheedhar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |