06-11-2011 9:40 AM
Hi guys.
I want to know if there is a way to clear the screen fields cache via ABAP.
Like I want to remove all previously typed values in a text box field in a module pool screen in subsequent executions.
Thanks in advance.
09-19-2012 6:57 AM
By ticking the attribute No Input History for the field in the Screen Painter, no history will be maintained.
06-11-2011 10:41 AM
Hi,
don't know if I understood it well, anyway; you could try a CLEAN of the text box in the AT SELECTION-SCREEN OUTPUT section of your screen. You should then find a way to identify exactly the condition that should lead to the cleansing (sy-ucomm check?).
In example;
AT SELECTION-SCREEN OUTPUT.
IF <your_condition_is_met> EQ 'X'.
CLEAN <input_box_parameter>.
ENDIF.
06-11-2011 5:00 PM
06-11-2011 5:16 PM
06-13-2011 4:26 AM
I meant clearing the screen cache.
Eg : I have a text box for Production Order number .
1st time, I input 4000028.
Next time, I execute , the text box will be empty but when I press the space bar, I will have 400028. This is what I want to remove from my screen.
06-13-2011 5:31 AM
what you need to do is press space bar then go to that particular number which you want to be delete using the up and down keys from keyboard.
then after reaching that particular Order number click on delete button in the keyboard.
hope this solves your problem.
06-13-2011 5:36 AM
06-13-2011 7:05 AM
Hi,
My thoughts...The cached values that you are talking about are stored as local data within the GUI (or whwre the local data is stored - C:\Documents and Settings
\...
SapWorkDir) and i don't think there is a way for you to clear this using ABAP(i might contradict myself).
To see what i mean, just go to "Customize Local Layout"(ALT+F12) on SAP Gui system tool bar, and click on Options->Local Data.
You could try with CL_GUI_FRONTEND_SERVICES=>FILE_DELETE, once you have identified the cache files, not sure though all the best.
Regards,
Chen
06-13-2011 5:55 PM
Hi,
you can use "SAP GUI scripting". It allows to delete ALL input history (for all fields), and add entries programmatically; It is not possible to access input history outside SAP GUI, as explained in the "SAP GUI scripting" documentation -> http://www.synactive.com/download/sap%20gui%20scripting/sap%20gui%20scripting%20api.pdf
BR
Sandra
06-13-2011 11:36 PM
If you delete ALL input history (for all fields) then certain users will probably be pissed off after running the program since they lose their cached values they may rely on in various transactions.
I know I wouldn't be too happy
Perhaps it is possible to delete this history for just one field... that'd be much better.
06-14-2011 9:22 AM
Hi Tamas,
If you delete ALL input history (for all fields) then certain users will probably be pissed off after running the program since they lose their cached values they may rely on in various transactions.
>
> I know I wouldn't be too happy
>
> Perhaps it is possible to delete this history for just one field... that'd be much better.
I didn't say it was perfect (I agree, I was a little bit disappointed too, to not see any single deletion method). Note that in the documentation, it is said that only SAP GUI software itself can act on the input history. So my opinion is that only SAP GUI scripting methods can play with the input history. Sometimes there are limitations, and we must cope with it :-).
Sandra
07-24-2011 10:24 PM
Hi,
Hurrah, to disable or enable input history of only ONE field, we can do it programmatically using method cl_gui_frontend_services=>disablehistoryforfield (with flag true or false). It is available since at least release 7.0
Moreover, user can switch it on or off manually, by CTRL + right click (since at least SAP GUI 7.20).
BR
Sandra
06-17-2011 6:50 AM
try this
in application tool bar
click customize local layout (alt + f12)
click options
go to local data tab.
select of or on as per your requirement
09-19-2012 6:57 AM
By ticking the attribute No Input History for the field in the Screen Painter, no history will be maintained.
07-18-2019 6:52 PM
Hi,
Maybe it's later...
With this method it's possible:
CALL METHOD cl_gui_frontend_services=>disablehistoryforfield
Regards!