08-22-2007 5:31 PM
hi gurus
can anyone please advise me how to adjust the piece of code below as it is not validating correctly
IF zsalesdata-dateofsale LE '2005.01.01'.
PERFORM improvements.
ELSEIF zsalesdata-dateofsale GT '2005.01.01' AND zsalesdata-dateofsale LE '2006.12.31'.
PERFORM insert_itab.
PERFORM multiple_impr.
PERFORM inflation_display.
PERFORM total.
ENDIF.
ELSEIF zsalesdata-dateofsale GT '2006.12.31'. "CPI calculations with effect from year beginning 01.01.2007
PERFORM insert_itab.
PERFORM cpi_inflat.
PERFORM inflation_display.
ENDIF.
08-22-2007 5:35 PM
HI,
Check the date format in the field zsalesdata-dateofsale
data : lv_date1 type sy-datum,
lv_date2 type sy-datum,
lv_date3 type sy-datum.
lv_date1 = '20050101'.
lv_date2 = '20061231'.
IF zsalesdata-dateofsale LE lv_date1.
PERFORM improvements.
ELSEIF zsalesdata-dateofsale between lv_date1 AND lv_date2.
PERFORM insert_itab.
PERFORM multiple_impr.
PERFORM inflation_display.
PERFORM total.
ENDIF.
ELSEIF zsalesdata-dateofsale GT lv_date2. "CPI calculations with effect from year beginning 01.01.2007
PERFORM insert_itab.
PERFORM cpi_inflat.
PERFORM inflation_display.
ENDIF.
Thanks
mahesh
08-22-2007 5:35 PM
HI,
Check the date format in the field zsalesdata-dateofsale
data : lv_date1 type sy-datum,
lv_date2 type sy-datum,
lv_date3 type sy-datum.
lv_date1 = '20050101'.
lv_date2 = '20061231'.
IF zsalesdata-dateofsale LE lv_date1.
PERFORM improvements.
ELSEIF zsalesdata-dateofsale between lv_date1 AND lv_date2.
PERFORM insert_itab.
PERFORM multiple_impr.
PERFORM inflation_display.
PERFORM total.
ENDIF.
ELSEIF zsalesdata-dateofsale GT lv_date2. "CPI calculations with effect from year beginning 01.01.2007
PERFORM insert_itab.
PERFORM cpi_inflat.
PERFORM inflation_display.
ENDIF.
Thanks
mahesh
08-22-2007 5:46 PM
Hi Prince,
IF zsalesdata-dateofsale LE '2005.01.01'.
PERFORM improvements.
ELSE. "Means - Value is Greater than 2005.01.01 - Its Understood.
IF zsalesdata-dateofsale LE '2006.12.31'.
PERFORM insert_itab.
PERFORM multiple_impr.
PERFORM inflation_display.
PERFORM total.
ENDIF.
EndIF.
IF zsalesdata-dateofsale GT '2006.12.31'. "CPI calculations with effect from year beginning 01.01.2007
PERFORM insert_itab.
PERFORM cpi_inflat.
PERFORM inflation_display.
ENDIF.
Can you check the code in this way and let me know if you face some issues.
Regards,
Lijo Joseph