cancel
Showing results for 
Search instead for 
Did you mean: 

update dynpro field

Former Member
0 Kudos

Hi,

I am currently adding some dates validations on an user exit. When I validate a date, I call a pop-up window to tell the user the date is wrong and I also suggest a new one. My problem is that I can´t update the field in the dynpro with the new value for the date afther the user accepted to change the date with the one I suggested.

Is there anyone who can help me with this?

Thanks in advance,

Best Regards,

Ezequiel Martin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Martin,

It seems to me that you have given an error message when the value entered by the user has been found to be incorrect. In programming a Screen in ABAP, the error message ashould always be given in the FIELD MODULE.

For example, if the data field that you have on your screen is lv_datum, then your flow logic should have something like -

PROCESS AFTER INPUT.
  FIELD lv_datum MODULE validate_date.

Now, if ou give an error message in the <b>validate_date</b> module, then you will see that the data field is open for inout even after the error.

Do get back if I have not correctly assessed the problem.

Regards,

Anand Mandalika.

Former Member
0 Kudos

Hi, for reading the user inputted in the dynpro screen, call this function

TMP_FLD-FIELDNAME = 'XXXX'. * field name on dynpro

APPEND TMP_FLD TO IT_FLD.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = SY-REPID

DYNUMB = SY-DYNNR

DETERMINE_LOOP_INDEX = CNS_X

TABLES

DYNPFIELDS = IT_FLD

EXCEPTIONS

OTHERS = 01.

Hope it will be helpful