Skip to Content

Validating 2 date variables for Date2 should always be >Date1 , if not populating the error message

Hi Experts,

Kindly help me with the coding as I am new to ABAP,

I have 2 Characteristic variables in my query DATE1 and DATE2, Now i have requirement that my DATE2 should always be > DATE1 when user enters the date in Query variable screen, and if not then the system should populate a message that the DATE2 is not >DATE1, for this i have created 2 Customer exit variables in my query DATE01 and DATE02 , However I am not sure how will I be able to give the condition for these variables and the validation,

Please help me in archiving it,

Thanks and Best regards,

Kiran

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 05, 2020 at 09:20 PM

    This can be achieved in the following steps. You have to add logic in both the variables.

    1) Create a customized message as per requirement. (Reference: https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/1809BW.001/en-US/e82b394740b047ff8b86bb628f7a1ef2.html)

    2) Add a condition in step 2 of Date1 customer exit variable logic to show the above create message whenever the Date2 is greater than Date1.

    3) Add a condition in step 2 of Date2 customer exit variable logic to show the above create message whenever the Date2 is less than Date1.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.