Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problems Validating User Fields in Change Lease-Out

Former Member
0 Kudos
132

Good Morning,

I've defined two Date Fields in Change Lease Out (transaction FOV2).

I need that when the first date field is empty the system returns a error message stating that the first data field should have data.

The second fill can be with or without data.

The problem is that, right now, the system returns the error message in every case except if both fields are filled.

Here is the code done by the developer:


FUNCTION field_exit_usrdate_1.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(INPUT)
*"  EXPORTING
*"     REFERENCE(OUTPUT)
*"----------------------------------------------------------------------
  DATA dt_usr08 TYPE vzsort-usr08.

  IF input IS INITIAL.
    MESSAGE e005(z3_re).
  ENDIF.

  SET PARAMETER ID 'DT_USR08' FIELD dt_usr08.

ENDFUNCTION.

Why the system always return the error message except if both the data fields are filled? Any clue?

Best Regards,

Pedro Gaspar

1 REPLY 1

Former Member
0 Kudos
105

Solved Myself