02-03-2010 2:26 PM
Hi,
I am building a BDC to a transaction and commiting it. When i hit the database, i get the oder values.
I am not using any select query. Selection is done using FM.
When i call the BDC again, its happening perfectly.
Things i have tried.
1. Changed mode to S, A, L - Nothing worked
2. Used wait up to 4 seconds. - Didnt work
Any other pointers???
Regards,
Niyaz
02-03-2010 2:42 PM
02-03-2010 2:49 PM
Hi,
I have a report program developed using OOPS.
When i click on refresh button, the changes should be updated in database using call transaction method and the entire ALV needs to be refreshed with updated values.
I have coded like below.
When 'REFRESH'.
Perform save_to_database.
PERFORM save_to_database.
...... build BDC...
call transaction 'IW32' using mode 'N' update 'A' messages lt_messages.
if sy-subrc eq 0.
commit work and wait.
endif.
endform.
Now the above code is executed, the ALV is not refreshed with updated value. Where as when i call perform save_to_database again( twice ), the values are refreshed.
Edited by: Niyaz Ahamed on Feb 3, 2010 3:49 PM
02-04-2010 6:12 AM
Hi,
you have to refresh ALV after performing save_to_database. There are refresh methods for both CL_GUI_ALV_GRID, CL_SALV_TABLE.
Regards,
Adrian
02-04-2010 6:50 AM
The problem is not with the ALV refresh. The problem is with the Fm which retrives the data, its still returning old values.
I am using FM CY01_EXTERNAL_INTERNFACE.
02-04-2010 6:59 AM
So set importing parameter RESET_ALL_TABLES_IMP to 'X. Maybe also set FLG_RESET_PROFILES to 'X'. Alternatively call CY01_REFRESH_ALL_TABLES and CY27_INITIALIZE_LIMITED_PLAN after (or before) each call of CY01_EXTERNAL_INTERNFACE.
Adrian
02-04-2010 9:49 AM
02-04-2010 11:59 AM
When i Quit the program completely and execute again, it returns the correct data.
Any idea how to refresh the buffers???
02-04-2010 1:59 PM
It looks like some global variable is still remaining uncleared. I am sorry, but I have no other ideas. Only to debug it by first run and also by second run and find out on which place a program flow differs.
Adrian
02-04-2010 2:06 PM
Check whether u r clearing & refreshing ur BDCDATA table after your call tranmsaction statemnet.
02-04-2010 5:29 AM
Hi Niyaz,
When we are going for standard transactions the most reliable way to do it is by using a BAPI if available.
If any BAPI is available try using it and see the results.
Hope it helps you,
Regards,
Abhijit G. Borkar
02-04-2010 5:36 AM
Hi
After the BDC is sucessfull U have to modify the internal table whihc is dispalyed in the ALV and in the PBO event before dispalying the container Use the follwoing mehtod
CALL METHOD cl_gui_alv_grid->refresh_table_display.
Regards
Jyo
02-04-2010 5:41 AM
Hi,
Sometimes a normal committ statement doesnt work.
Instead use a BAPI and check.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = wait.
Regards,
Thoufique.
02-04-2010 2:12 PM
How are you calling the alv.
can you place the exact structure of code.
saving to database
Displayiung alv.