‎2007 Oct 17 2:15 PM
Hi all,
Wht is the purpose for SET HOLD DATA ON. in module pool and also supress dialog in module pool.Kindly explain with an example..
Thanks in advance,
alex
‎2007 Oct 17 3:31 PM
Check this out -
SET
Basic form 20
SET HOLD DATA ... .
Variants:
1. SET HOLD DATA ON.
2. SET HOLD DATA OFF.
Effect
Sets or resets the screen attribute 'Hold data allowed' dynamically at runtime. The statement overwritees the corresponding static screen attribute.
If 'Hold data allowed' is selected, the user can choose the 'Hold data' option from the System → User profile menu to save the data in all of the fields on the screen that the user changed. If the user then calls the same screen within the same terminal session, the saved values are placed in the corresponding screen fields and displayed as default values.
The user can also choose 'Set data' and 'Delete data'. 'Set data' is the same as 'Hold data', but the fields are additionally not ready for input. 'Delete data' deletes all held data and makes the screen fields ready for input again.
SUPPRESS
Basic form
SUPPRESS DIALOG.
Effect
Suppresses output of the current screen.
However, flow control continues normally and dialog resumes on the next screen.
Note
SUPPRESS DIALOG should only be used in a PBO (PROCESS BEFORE OUTPUT) module.
Additional help
Screens
Hope this helps.
ashish
‎2007 Oct 17 3:31 PM
Check this out -
SET
Basic form 20
SET HOLD DATA ... .
Variants:
1. SET HOLD DATA ON.
2. SET HOLD DATA OFF.
Effect
Sets or resets the screen attribute 'Hold data allowed' dynamically at runtime. The statement overwritees the corresponding static screen attribute.
If 'Hold data allowed' is selected, the user can choose the 'Hold data' option from the System → User profile menu to save the data in all of the fields on the screen that the user changed. If the user then calls the same screen within the same terminal session, the saved values are placed in the corresponding screen fields and displayed as default values.
The user can also choose 'Set data' and 'Delete data'. 'Set data' is the same as 'Hold data', but the fields are additionally not ready for input. 'Delete data' deletes all held data and makes the screen fields ready for input again.
SUPPRESS
Basic form
SUPPRESS DIALOG.
Effect
Suppresses output of the current screen.
However, flow control continues normally and dialog resumes on the next screen.
Note
SUPPRESS DIALOG should only be used in a PBO (PROCESS BEFORE OUTPUT) module.
Additional help
Screens
Hope this helps.
ashish
‎2007 Oct 17 3:51 PM
Hi,
In the attributes of a screen, you can enable the following standard menu entries by setting the Hold data attribute:
· System ® User profile ® Hold data
Hold data allows users to retain values that they have entered on a screen so that they appear the next time they start the same transaction. Only values actually entered by the user are retained. These values are again set as default values in the corresponding input fields every time the screen is reprocessed. In this process, the values transported from the ABAP program at PBO are overwritten.
· System ® User profile ® Set data
This has the same effect as Hold data. Additionally, when the held data is placed in the screen fields, these fields are no longer ready for input.
· System ® User profile ® Delete data
This deletes the held data, and makes the relevant fields on the screen ready for input again.
If Hold data is not activated in the screen attributes, the above menu entries have no effect.
In the PBO event of a screen, you can overwrite the Hold data attribute dynamically using the statement:
SET HOLD DATA ON|OFF.
. The ON addition activates the attribute, OFFdeactivates it.
Example
Hold data
REPORT demo_dynpro_set_hold_data.
DATA field(10) TYPE c.
CALL SCREEN 100.
field = 'XXXXXXXXXX'.
CALL SCREEN 100.
MODULE hold_data OUTPUT.
SET HOLD DATA ON.
ENDMODULE.
The statically-defined next screen for screen 100 is 0, and it contains a single input/output field called field.
The flow logic is as follows:
PROCESS BEFORE OUTPUT.
MODULE hold_data.
PROCESS AFTER INPUT.
In the PBO event, the Hold data attribute is activated dynamically. If the user enters a value and then chooses System ® User profile ® Hold data or Set data, the same value is displayed in the field when the screen is next displayed. This value is displayed each time the screen is called until the user chooses Delete data. This overwrites any value assigned to the field field in the ABAP program.
Regards
Sudheer