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: 

to field the field blank

Former Member
0 Kudos

i report i am calculating difference between start date and end date. if end date is not greater than start date then i need to leave the result field blank without specifiying any value.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Parameters : st_date like sy-datum,

ed_date like sy-datum.

diff = ed_date - st_date.

if diff LT 0.

Result = space.

else.

Result = populate some value.

endif.

2 REPLIES 2

Former Member
0 Kudos

Hi Josephine,

1. I don't know whether i understood ur question properly !

2. Its a simple logic.

3. try this (just copy paste)

see DIFF variable.

REPORT abc.

PARAMETERS : fdate TYPE sy-datum DEFAULT sy-datum..

PARAMETERS : tdate TYPE sy-datum DEFAULT '20051215'.

DATA : diff TYPE i.

*----


diff = tdate - fdate.

IF diff < 0.

diff = ''.

ENDIF.

BREAK-POINT.

I hope it helps.

Regards,

Amit M.

Former Member
0 Kudos

Parameters : st_date like sy-datum,

ed_date like sy-datum.

diff = ed_date - st_date.

if diff LT 0.

Result = space.

else.

Result = populate some value.

endif.