09-22-2006 10:05 AM
Hi,
I Have a Report Where In I Fetch Some Data And display the Output in A grid display.Double Click on Any Row takes me To A Transaction with The Input of Material of the selected Row skipping the initial Screen.If make any Changes In The Transaction and save and press Back i return to the Grid display.The Problem I am facing is ,I have A Refresh Button On The Application tool Bar.clicking on which the process of fecthing data is Done For The row which was double clicked.But i am Getting the same old Values not the modified One for the material.My code is as below for double click and refresh button
FORM display USING p_e_row.
READ TABLE t_final_finish INDEX p_e_row .
SET PARAMETER ID '/SAPAPO/VRSIOID' FIELD '000'.
SET PARAMETER ID '/SAPAPO/MAT' FIELD t_final_finish-matnr .
SET PARAMETER ID '/SAPAPO/LOCNO' FIELD p_loc.
CALL TRANSACTION '/SAPAPO/RRP3' AND SKIP FIRST SCREEN .
ENDFORM. " display
when 'REFRESH'.
perform refresh_table changing t_refresh[].
Thanks and Regards
Ahasan
09-22-2006 10:12 AM
09-22-2006 10:17 AM
Hi,
I have Tried that But It Does Not work.Submit program works but the selection screen is displayed again which i dont want.
regards
Ahasan
09-22-2006 10:22 AM
Hi,
In the refresh_table are you selecting all the data again from the db table.
You need to include the logic to select all the data from database into internal table and pass the same to ALV.
Best regards,
Prashant
09-22-2006 10:27 AM
Hi,
Yes I am Using the same Logic for selecting the data fron DB as done while display for the first time and modify the internal table passed to the ALV.
Regards
Ahasan
09-22-2006 10:31 AM
Write a method <b>handle_after_refresh FOR EVENT after_refresh OF cl_gui_alv_grid,</b>.
In that method select the data again pass that to the final table which u show in the ALV grid,
Sample Code:
METHOD handle_after_refresh.
DATA: lws_anlage TYPE anlage,
lws_status TYPE zzsptstatus.
CLEAR: lws_anlage, lws_status.
LOOP AT i_error_log INTO wa_error_log WHERE status EQ c_succ.
SELECT SINGLE anlage zzsptstatus INTO (lws_anlage, lws_status)
FROM eanl
WHERE anlage = wa_error_log-anlage.
READ TABLE i_install INTO wa_install
WITH KEY anlage = wa_error_log-anlage.
IF sy-subrc EQ 0.
ws_index = sy-tabix.
wa_install-zzsptstatus = lws_status.
MODIFY i_install FROM wa_install INDEX ws_index
TRANSPORTING zzsptstatus.
CLEAR: lws_anlage, lws_status.
ENDIF.
ENDLOOP.
ENDMETHOD. "handle_after_refresh
It will work.
Regards,
Prakash.
09-22-2006 10:41 AM
Hi,
The pbroblem i am facing is that the internal session is not getting commited .So I am getting the old values.
Regards
Ahasan
09-22-2006 10:43 AM
Mohammed try to use <b>wait statement</b> after saving the data. It may work sometime.
Prakash.
09-22-2006 10:45 AM
Hi,
I am not very sure that the internal session commit will solve the issue.
Can you try selecting the data again from DB by bypassing the buffer. I guess that should help since sfter commit work the data should be committed.
You can refresh all the internal tables and variables and then do a select to by-pass the buffer.
Regards
Nishant
09-22-2006 10:46 AM
Hi,
I even tried that.If i use submit program .I get the selection screen again and if i input the parametrs and execute i am getting the correct results.But I dont want it in that way.
Regards
Ahasan