on 07-03-2015 7:25 PM
Hi Experts,
In the class: CL_HRESS_PER_DETAIL we have added some code to set the default value of a calendar input to today's date.
FIELD-SYMBOLS: <FS_DISDT> TYPE DISDT.
ASSIGN COMPONENT 'DISDT' OF STRUCTURE cs_data TO <FS_DISDT>.
<FS_DISDT> = SY-DATUM.
EV_DATA_CHANGED = ABAP_TRUE.
This works fine and when you open the screen, you can see the value in the calendar input field.
The problem is that when we click Save, we get a validation error that a date is required. The screen does not recognize the change until you manually choose a date and then click save.
Is there something else we need to do in order to set a default value that is also set to dirty so it can be saved?
Has anyone run into this same issue? Please let me know if I am missing something additional that needs to be done.
Thanks!
-Kevin
Hi Kevin,
this validation error is the error of the Webdynpro itself, or does it come from the backend?
If it comes from webdynpro, it can be a bug.
But if it comes from the backend then it can happen that you need to set the value in the backend buffer as well, otherwise the backend "doesn't know" that you already filled the value in the feeder class.
How does the FLUSH implementation look like?
This should be responsible to sync between the UI and backend (buffers).
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, that appears to have done the trick.
I added the following and I saves now. Thanks Peter!!
GET REFERENCE OF <FS_DISDT> INTO ls_change_log-new_value.
ls_change_log-name = 'DISDT'.
INSERT ls_change_log INTO TABLE lt_change_log.
CLEAR:ls_change_log.
CALL METHOD IF_FPM_GUIBB_FORM~FLUSH
EXPORTING
IT_CHANGE_LOG = LT_CHANGE_LOG
IS_DATA = IS_DATA.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.