Application Development 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: 

Date comparison

Former Member
0 Kudos

Dear All,

I create done the bdc recording in that recording i have a one date field i have validate that field ,field date can not be less then 01.04.2009 if that is then i have to thrw the message in that

I am not able to do that comparison kindly help me to resolve this issue.

thanks

3 REPLIES 3

kesavadas_thekkillath
Active Contributor
0 Kudos

The flat file data will be having the date field, validate the entries after uploading the date.

Former Member
0 Kudos

Hi Sandeep,

Suppose your file uploaded date variable is w_date_file(8) TYPE c.

You need to make both dates of type system date, and do the comparison.


DATA: w_date                         TYPE   d,
            w_comparison_date    TYPE   d,
            w_formatted_date(10) TYPE   c.

MOVE w_date_file TO w_date.
w_comparison_date = '20090401'.           "YYYYMMDD format

IF w_date LT w_comparison_date.
      MESSAGE ....
ELSE.
     "use write statement 
     WRITE w_date to w_formatted_date.
     PERFORM fill_bdc USING .... w_formatted_date ....
ENDIF.

Regards,

Nisha Vengal.

Former Member
0 Kudos

Moderator message - Please see before posting - post locked